An Introduction to Procedurals

Procedurals allow you to keep your working scene light and workable by deferring the loading of geometry data until render time. It is possible to add huge levels of complexity to your scene with very little effort. In this introductory tutorial, we will show you the steps required to set up a complex scene, very simply, using procedurals.

The scene can be downloaded here.

The following steps introduce several useful points about using procedurals (you might like to follow them using a suitable model of your own). Note that this tutorial is only an introduction to procedurals, which are a very powerful tool.

Export model as a Procedural from the Arnold menu

Export .Ass File

Create Procedural

Procedural

Soldier.ass file loaded in Procedural

Lighting

So, with one instance of our Procedural geometry, you should have something like the following image.

Instancing the Procedural

Move Procedural away from the center but move its pivot to 0 0 0

Procedural's instanced in a circle

This should result in something like the following image.

You should now have two rows of the Procedural model. Using the same method, we have created another Procedural for the standing soldier. However, the number of copies has been increased to 72 to compensate for the larger circumference. Also, note that the standing soldier Procedural is intersecting the sitting soldier procedurals. In this case, it does not matter as it is only his gun that is overhanging the sitting soldiers.

The procedurals can be instanced many times with little overhead to rendering (the original model has around 20,000 polygons so without instancing using procedurals the following scene with hundreds of soldiers would be quite large). Arnold, of course, has no trouble rendering the scene.

Conclusion

It's worth pointing out that this introductory tutorial has only covered the basics of using procedurals. For example, as well as using .ass archive files, procedurals also work with pre-compiled custom procedural programs which you can provide in the form of a dynamic library, allowing you to use parameterized procedural geometry. Procedurals can also be recursive, and you can defer loading of the procedural geometry until it is needed during rendering (i.e. the geometry is not loaded, and uses no memory until a ray enters the object's bounding box). These techniques make it possible for you to assemble scenes in a modular way.

You can see the creative potential that procedurals can give you. Below are some further examples that will hopefully inspire you to create your own. Have fun with procedurals!

Note:

For more details about procedurals in MAXtoA see the main Procedurals description.