The render method is called when the procedural is required to either generate geometry or split into more procedurals. Inside the render() method you should make calls to open/add/close geometry or sub-procedurals.

The way that a procedural splits is critical to the performance of mantra's ray tracer. For optimal performance, make sure that sub-procedural bounding boxes overlap as little as possible - which allows mantra to build more optimal trees for ray tracing.

that is, the render() method on different RAY_Procedural objects may be called simultaneously by different threads. This means that you should design the code in your procedural such that global data structures are protected by a thread lock (for example, a UT_Lock).

Note

The render method may be called more than once during a render to regenerate the geometry.