Subdivision Surfaces: Shading Sets


MTOR supports this feature for subdivision surfaces and polygon meshes. This is an antiquated method which may prove useful if the preferred method of attaching shaders to Maya Shader Groups fails. Basically, you create Maya sets which contain facets from your mesh. Next, by attaching RenderMan shaders to the facet sets, you signal MTOR to output each facet collection as a different RenderMan primitive, each with its own appearance. 

Because subdivs rely on neighboring vertex locations and connectivity to define the smoothing process, you can't go willy-nilly breaking up the mesh into component polygons. Rather, you must carefully pick which neighboring facets must be considered during the smoothing process, even though those facets won't necessarily be shaded the same. In order to smoothly shade a subdiv with multiple appearances, you must group facets according to your needs, then add neighboring facets to your shading sets to provide the neighborhood information required by the smoothing operation.

Thus a single facet will typically reside in more than a single shading set. This is quite different from polygon meshes where, thanks to Maya's set partitioning, a facet can only be associated with a single shading group set. When you select polygon facets and apply a Maya shading group, Maya automatically ensures the feality of a single facet to a single shading group. As we now know, this would not be a good thing for subdivision surfaces. Thus, we've provided a menu item: Pixar Subdivs->Create Shading Set. This command causes the currently selected facets to be associated with a newly-minted Maya set. In creating this new set, MTOR makes sure that Maya not perform the usually desireable cleanup and book keeping for facet set membership.

Yes, but how about an example? eh?

Below we've got a polygonal torus with 36 facets - 6 in u and 6 in v. Let's assume that we wish to assign two shaders to our humble torus. The obvious thing to do is to create two shading sets by splitting the torus down the middle like so:


After creating these shading sets and assigning RenderMan shaders to them, here's what we get:


As you can set lots of our little torus is missing. Hrrm, you think, could this be because we're not interpolating the boundaries? Associated with each shading set is an MTOR attribute governing the interpolate boundary attribute of each sub-subdivision surface. By changing this attribute from off to on, we can recover the missing portions of our poor torus. Yikes, but at what cost?


In the images above we notice that our mild-mannered torus has undergone major reconstructive surgery. And, while we're most greatful to the surgeon, it's probably not exactly what we expected. While our surface is now continuous, exhibiting no unsightly holes, it's lost its pleasantly curvacious qualities. In techie-jargon, its tangents are no longer continuously varying. In some situations, this result may be desireable and that is precisely why we've provided the Mtor Subdiv Interp flag. However, when you feel seduced by smooth curves, you must press on:


In these images, we've disabled the interp flags and extended our original sets to include neighboring facets on both sides. As you see, there is now a considerable overlap between set memberships. That is, several facets are present in both shading sets. But wait! our efforts have borne a smooth fruit. The careful co-mingling of facets gives us our ideal result. And after adding a few creases and a corner, the result is still smooth across our shading sets.


Below, you can see the contents of the Maya Set Editor for our happy torus. This window provides most of the functionality needed to construct and manipulate MTOR's shading sets. For a thorough discussion of the functionality of Maya's Set Editor we refer you to the Maya docs. Briefly, the key features we used for this example were:

So, to summarize: you can attach different RenderMan shaders to components of your Subdivision Surface polygon mesh. We leave it to you to define the appropriate set membership to obtain the correct result For our purposeful torus, this task was quite simple. However for more complex topologies it will likely prove more difficult. At this time, various Maya limitations outlined below may get in the way of an entirely satisfying experience. Save often. Restart Maya when needed.


Pixar Animation Studios
(510) 752-3000 (voice)   (510) 752-3151 (fax)
Copyright © 1996- Pixar. All rights reserved.
RenderMan® is a registered trademark of Pixar.