There are two types of procedurals:
- ASS files
- Compiled procedural plugins that generate Arnold nodes.
The Mandelbulb is an example of a compiled procedural plugin. There's no ASS file involved. Instead, the Mandelbulb uses the Arnold API to create Arnold nodes.
For ASS files, you use an Arnold Procedural node.
For a compiled procedural plugin like Mandelbulb, you need to create a Geo object as a placeholder in your Houdini scene, and tell HtoA to translate that Geo object into a Mandelbulb node. Don't worry, it's not as a hard as it sounds.
Let's get started...
Creating the Mandelbulb Node
- Create a geo object from the TAB Menu: Geometry -> Geometry
- Inside the geo node:
- Remove the file1 node
- Create two Null objects: one for display and one for render.
- Rename the Nulls to OUT_display and OUT_render.
- Set OUT_display to be visible on display (ALT-click the visibility flag of the node).
- Set OUT_render to be visible on render (CTRL-click the visibility flag of the node)..
- Create box and Arnold Edges nodes, and set the box size to be 2 in X, Y, and Z.
Edit the Parameters Interface
Select the geo node and click on the gear icon and choose Edit Parameter Interface...
Add a new Folder
Drag Folder from the Create Parameters list over to the root above the Render folder and name it Mandelbulb
Add the mandelbulb parameters
To add parameters, click the By Type tab on the left side. Select the type of parameter you want to add, then drag it into the Existing Parameters pane, or click the “move right” button.
Use the options under Parameter Description on the right side of the window to customize the parameter's Name and Label. HtoA detects user parameters that start with ar_ and uses them to translate to the parameters of the procedural in Arnold.
First, add the parameters that tell HtoA to translate this Geo object into a mandelbulb node.
- ar_translate_as tells HtoA that this is a compiled Arnold procedural
- ar_procedural_type is the name of the procedural. In this case, "mandelbulb"
The mandelbulb compiled procedural ships with HtoA, and is in the HtoA arnold/plugins folder.
Default Value *
Now add the parameters that control the mandelbulb:
Default Value *
This is a Python expression, so you need to set the channel by changing the default language from literalto python
Float Vector 3
-0.161224, 1.04, 0.183673
Set the defaults by going to the channels tab and putting the value into the appropriate field.
Once completed, the parameters should be listed as below.
Test the Procedural
Assign the material /shop/arnold_vopnet1 in the Render tab of the mandlebulb node
Now look through cam1 and render the scene using your preferred context. The procedural will calculate the mandelbulb and render the following image.
Export as Digital Asset
With the procedural working you can now create a reusable asset,
First right click on the geo node and choose Create Digital Asset ...
A dialog will pop up asking what you want the asset to be called.
After this you may be presented with another dialog for you to confirm the parameters and remove any "spare" ones, it should be safe to allow the spare parameters to be removed. Once this is all done you should see your new Asset available in the Digital Assets menu.
The next part of this tutorial discusses the Mandelbulb parameters and the effects of changing them.