RifPlugin
Mesh2Blobby


return to main index


Code

    RifPlugin Mesh2Blobby_Rif.cpp as html.



Introduction

The rif plugin presented by this tutorial is intended to demonstrate a few techniques the reader might find useful when developing their own plugins. The Mesh2Blobby_Rif plugin enables one or more polymesh surfaces, with or without a "subdiv scheme", to be converted to Blobbies at render-time. For example, figure 1 shows a Maya scene consisting of a distorted poly cube and a truncated poly sphere. Figure 2 shows the objects rendered (occlusion) with and without blobby conversion.



Figure 1 - basic mesh geometries



Figure 2 - Rollover without and with the rif.



Compiling the Rif

Follow the instructions presented in "Cutter: Compiling and Building Plugins"



Applying the Rif in Maya


Figure 3 - assigning the rif in Maya



Tagging a Mesh to be Rendered as a Blobby

1   Select a polymesh object and go to it's shape tab in the Attributes Editor.
2   From the Attributes menu choose RenderMan->Manage Attributes...



Figure 4


3   Add a Pre-Shape MEL attribute.



Figure 5


4   Copy and paste the following RiMel command.
        RiAttribute("user", "float[2] _blob_range", 0.1, 0.4);
    Edit the values of 0.1 and 0.4 to your preferred min and max blob sizes.



Figure 6


5     Render the scene.








© 2002- Malcolm Kesson. All rights reserved.