Maya Python Procedural: Wisterias
Pixar's RenderMan system allows geometry to be created by the PRMan renderer - in addition to objects explicitly modeled in Maya. PRMan can use plugins written in python or C++. This page shows the results of using one or more python scripts to generate geometry at render-time.
- style images obtained from internet -
The first step was to prepare two base models for the scene. I modeled a whole branch of wisterias. And the butterfly model (texture included) was downloaded from here.
Next step was shading and texturing. I used a PxrRamp node to create the color gradient of wisteria petals. Below is the shading network in Hypershade. After all assets are complete, make sure to freeze transformation every model and then export them separately as RIB file into the project folder.
Script Development & Scene Setup
Using a basic python script provided by Prof. Malcolm Kesson, we now are able to generate Renderman geometry procedurally by utilizing Rif Archive.
Click here for the script file.
The scene setup is pretty straight forward. I used 4 RenderManArchive nodes to reference the existing baked assets. The program allows me to import the shaded model archives without the need to reference any shading network in the current scene.