Parameter to nurbs surface node

A simple deformer that reprojects a source mesh (considered as UVW coordinates)
onto a (series of) nurbs surfaces.

Inspired by “It’s a UVN Face Rig”

It takes an array of nurbs surfaces which must be at least length 1,
a polygonal mesh where the point positions are considered parameters on the nurbs surface; Z being an offset in the normal direction (hence UVN),
and an optional int array where there can be one entry per input vertex, stating which nurbs surface this vertex should project onto.

The default surface for every vertex is 0, so for a single nurbs surface projection no array is needed and only overrides have to be specified.

This includes full source + a project compiled using VS2015 for Maya2015 x64.
Download zip

Python test code:

PLUGIN = r'UVNDeformer.mll'

cmds.loadPlugin(path)
node = cmds.createNode('UVNNurbsToPoly')
nurbs = cmds.sphere()[0]
uvn = cmds.polyPlane()[0]
cmds.select(uvn + '.vtx[*]')
cmds.rotate(90, 0, 0, r=True)
cmds.move(0.5001, 0.5001, r=True)
result = cmds.createNode('mesh')
cmds.connectAttr(nurbs + '.worldSpace[0]', node + '.ins[0]')
cmds.connectAttr(uvn + '.outMesh', node + '.iuvnm')
cmds.connectAttr(node + '.outMesh', result + '.inMesh')

cmds.select(uvn + '.vtx[*]')

One thought on “Parameter to nurbs surface node

  1. Hi Trevor!
    Thanks for the code!
    just tried it out..but i dont really understand how this is meant to be used in a praktical sense.. so the mouuth shapes for example are supposed to be modeled in a 2D Plane and then being warped to the final Shape with a nurbs_plane for example? That makes modeling kind of difficult… how would you proceed with a premodeled mesh? or maybe i didnt get the principle right?Do you have a demo scene where i can see better how its supposed to work? Thanks for the work, David

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>