This tutorial presents a shader called
Attribute "user" "int num_verts"  Attribute "user" "point vertices" [-16.64263019 13.10327724 16.1911456 followed by 120 xyz values and additional "padding" values to define the array of 1000 elements]
The first attribute,
The mel script,
Step 1 - Installing the Scripts
It is assumed the reader has followed the recommendations on customizing RenderMan for Maya presented
in the tutorial, "RfM: Customizing".
Copy the OSL shader source code to your
Open the .osl and compile it in Cutter.
Copy the mel script to your to your
Step 2 - Create the Object(s) whose Vertices will Effect the Target Geometry
Create, say, a polyPlane and group it (
Step 3 - Assigning the Shading Network to the Target Geometry
Create, say, a sphere (polygon or nurbs). Scale it and use the Modify menu to "Freeze Transforms".
Create an instance of PxrOSL node and browse for the previously compiled
Step 4 - Assigning the PreShape Mel Procedure to the Target Geometry
On the Shape Tab of the sphere go to the Attributes->RenderMan->Manage Attributes... menu item.
From the "Add/Remove Attributes" Window add the item named "PreShape MEL". An extra "RenderMan"
panel will be added to the sphere's Shape Tab panel. Enter this text in the textfield labeled
"Pre Shape MEL",
Step 5 - Add Lights and Render the Scene
If the target object renders uniformly purple it is an indication the mel script was not found. Save the scene, restart Maya and try again.
© 2002- Malcolm Kesson. All rights reserved.