RenderMan Procedural Primitives
|
|
This tutorial follows on from the tutorial
"Procedural Primitives: Basics".
Procedural primitives, or helper apps, are ideal when complex surfaces
can be defined procedurally. A procedural primitive can be loosely described
as a shape made from geometry that has been assembled according to the application
of one or more rules. This tutorial introduces a simple procedural primitive
made from light-weight ie. fast to render, RenderMan points. The spherical shell
shown in figure 1 consists of 5000 points.
|
|
|
|
||||
|
The rib statement that requests the renderer to produce, say, three points of uniform radius, colored red, green and blue is, Points "P" [-0.5 0 0 0 0 0 0.5 0 0]
"constantwidth" [0.01]
"Cs" [1 0 0 0 1 0 0 0 1]
There can be any number of xyz's following the " |
||
Spherical Shell of PointsThe method for producing a spherical shell of randomly placed colored points is,
By repeating these steps we obtain a spherical shell of points. The cloud proc uses three functions that were developed in other tutorials, Rib File for TestingListing 1 is a rib file that can be used to test both the python and the Tcl implementations of the helper app. The rib file is setup for use on MacOSX. Refer to the tutorial "Procedural Primitives: Basics" for examples of how python and Tcl helper apps should be called when using Windows and Linux. Listing 1 (ripoints.rib)
Python ImplementationListing 2 (ripoints.py)
|
||||||
Tcl ImplementationListing 3 (ripoints.tcl)
|
||||
AnimationIf radius of the cloud is increased over several frames it would create the illusion of a fireworkds explosion. The ripoints scripts implemented in this tutorial could be instanced by each particle in a Maya or Houdini particle system. When viewed within the modeler, such a particle system might look relatively unimpressive, however, when rendered the final particle system would appear to be very complex. |
||
© 2002- Malcolm Kesson. All rights reserved.