|
Pixar Photorealistic RenderMan -
Artist tools (RAT) Tutorials
Testing NURBS surfaces conversion to Maya
Subdivision surfaces, RAT Subdivision surfaces and trying to achieve
similar results.

Softwares used: Alias Maya 7.0.1, Pixar RAT 6.5.2,
Pixar Renderman server pro 12.5.2
Click here to
download the Maya scene file.

Suppose you have modeled a NURBS head and want to
convert it to RAT subdivision to have benefits of polygons when
rigging and have a higher speed PRman rendering than using Maya
native SubD surfaces. This is what we're looking for here.
1. We start with creating two simple NURBS
planes and using soft modification tool to change their shape to
organic form, then we attach the two surfaces, rebuild them
uniformly with "keep CV's ON", delete the history, select the
isoparam that was the two surfaces former boundary and detach the
surfaces, rebuild both surfaces with "keep CV's ON" and again delete
the history.
This operation is called socking and is usually used in modeling
organic objects using NURBS.
Details:
-
Click on Create>NURBS primitives>Plane[]*
Set patches number to 4 along both U and V sides.
Scale the plane to 10.
-
Click on Edit>Duplicate[]
Reset duplicate menu settings and click on Duplicate button
-
Go to component mode and select some vertices
-
Click Soft modification tool in left
vertical toolbox and use it to form organic shapes on both
surfaces.
-
bring the two surfaces close to each other so
they can be attached
-
Click on Edit Nurbs>Attach surfaces[].
Reset the tool and deselect "Keep original".
Click the attach button. If they are not attached move their
borders closer and try again.
-
Click on Edit Nurbs>Rebuild surfaces tool[].
Reset the tool and click on "keep CV's" checkbox.
Click on parameter range from 0 to #spans. Now click the rebuild
tool button.
Now press Q to quit the tool.
-
Click on Edit> Delete all by type> History.
-
Go to isoparam mode and select the two surfaces
former boundary by clicking and dragging over it. Make sure no
other isoparam is selected. Avoid clicking directly on isoparam
since there is always a chance of creating a new isoparam by
doing so.
-
Click on Edit Nurbs>Detach surfaces[].
Reset the tool and click on detach.
-
Click on Edit Nurbs>Rebuild surfaces.
-
Click on Edit> Delete all by type> History.
*: [] means click on the square button which
brings the option box of the tool.
If section 1 seemed to be
complicated, please download the
Maya scene file
to see the result. It's a modeling procedure and is not directly
related to our subject.
The result of socking method is two surfaces with G2
continuity (It means it has both position and tangent continuity).

2. Now that we have our NURBS surfaces, we
try to convert it to Maya SubDivision surface to see if they look
similar.
-
Click on Modify>Convert>NURBS to SubDiv []
-
Move the new surfaces to the left of your
screen so that you can compare them to original NURBS surfaces.
This is what the Maya SubD surface looks like.
Please not that although our original NURBS surfaces had continuous
corners where they meet, Maya SubD surfaces have round corners.
Other than this, Original NURBS surfaces and Maya SubD surfaces look
identical.

Even if you had stitched the two NURBS surfaces
before converting them to Maya SubD surfaces, they would have round
corners.
3.Now we try to convert our NURBS surfaces
to polygons to use RAT SubD surfaces.
First try:
-
Select the two Nurbs surfaces.
-
Click on Modify>Convert>NURBS to
Polygons[]
Reset the tool.
Set Type to Quads. Remember that a Quad face is made of two
triangle face and renders two times faster than them in PRman.
Set Tessellation Method to “General”.
Set Number U and Number V to 5.
Click the convert button.
Now we must have something similar to Nurbs surface if isoparams
were replaced by polygon edges.
-
Click on Edit> Delete all by type> History.
-
Go to Rendering menu set and Click on
RenderMan>Pixar SubDivs>Mesh as Subdiv[]
Click on all check boxes but the one that says "Expose mesh
to Maya".
Click apply.
We come up with this result:


ooops! It is not what we had in mind. The RAT SubD
result is not the same as Original Nurbs Object. It's somehow
softened. So a polygon with edges exactly the same as Nurbs
isoparams does not give us a SubD surface identical to Original
Nurbs surface.
Second try:
Lets try another options when converting from NURBS
to Polygons.
-
the two Nurbs surfaces.
-
Click on Modify>Convert> NURBS to Polygons[]
Reset the tool.
Set Type to Quads.
Set Tessellation Method to “Control points”.
Click the convert button.
-
Click on Edit> Delete all by type> History.
-
Go to Rendering menu set and Click on
RenderMan>Pixar SubDivs>Mesh as Subdiv
This is the result:

The new RAT SubD surfaces look identical to the
original Nurbs surfaces. Please also note that RAT SubD surfaces
corners are not round like Maya native SubD surfaces.
Third try:
Lets see what happens if we convert our Maya native
SubD surfaces (Section 2 of this tutorial) to polygons and then to
RAT SubD surfaces.
-
Select the two Maya SubD surfaces and duplicate
them using current settings so you can compare new objects to
Maya SubD surfaces.
-
Click on Modify>Convert>SubDivs to
Polygons[]
Reset the tool.
Set tessellation method to “Vertices”
We use "Level 0 vertices" option since RAT subDivs don’t use
higher level information.
Click the convert button.
-
Click on Edit> Delete all by type> History.
-
Click on RenderMan>Pixar SubDivs>Mesh as
Subdiv.
This is the result:

It looks similar to the original NURBS surfaces and
does not have round corners anymore.
4. Now lets see what has happened to UV's.
Since we had set UV range from 0 to #number of spans when
rebuilding the NURBS surfaces, the UV range of NURBS surfaces is 0
to 4.
To see what happens in rendering we make a simple
Blinn shader (palette) in RAT Slim and assign a texture to it and set manifold
type to ST. We use Slim background picture which can be found in
PRman documents tutorial files as the texture.

Now put some lights there to render it!
This is the final result:

As you can see using ST manifolds, PRman ignores
NURBS UV range which is 0 to 4. The texture completely covers the
two original NURBS surfaces.
The Maya native SubD UV is totally weird and has no round corner as
what could be seen in view port but the one which is converted from
Maya SubD to polygons and then to RAT SubD has something like 0 to
#number of isoparams UV range! but PRman only recognizes 0 to 1 UV
range using ST manifold, doesn't it?
The one that is converted to Polygons using "4 poly per span in 3D"
option has weird UV too.
The one that is converted to Polygons using "Control points" option
has real 0 to #number of isoparams UV range since the texture is not
tiled.
Now it is only a matter of using Polygon UV editing
tools to correct these all!
Sepehr Dehpour
Feb 06 2006
Freelance Maya /RenderMan
Rich media designer

Copyright - 2006 - Sepehr Dehpour - All right
reserved.
CGTAL active media
|