General
TOP nodes define a workflow where data is fed into the network, turned into “work items” and manipulated by different nodes. Many nodes represent external processes that can be run on the local machine or a server farm.
File paths
Most TOP nodes that do work let you specify input and/or output file paths. In TOPs, each scheduler node can specify a working directory. This is because different render farm software may use different shared network filesystems. In the case you are using a farm scheduler, you should make sure that all files you output are reachable by the farm machines relative to this PDG_DIR directory.
- Set the PDG_DIR (base working dir)
- You can set the PDG_DIR (base working directory) on the scheduler node. This directory is available to jobs as the PDG_DIR environment variable.
- localscheduler (Node)
- Scheduler > Paths > Working Directiry : $HIP (the default)
- localscheduler (Node)
- This will later be used in outputs like $PDG_DIR/your/file/path.bgeo.sc
- Read paths docs
- You can set the PDG_DIR (base working directory) on the scheduler node. This directory is available to jobs as the PDG_DIR environment variable.
Wedge geo variations
Lets setup a TOP network to write out geo variations to disc. We will do this using a Wedge node.
Pull vs Push
For each wedged attribute, you can use it to set a parameter on the render node in one of two ways:
- Pull
- On the render node or any other node cooked by the render, you can use @attribute references in parameter expressions to “pull” attribute values from the work item.
Pull references are very convenient and flexible. However, it does require using TOPs-specific expressions, so it may not be appropriate if you want the ROP node to also be usable manually or without TOPs.
- On the render node or any other node cooked by the render, you can use @attribute references in parameter expressions to “pull” attribute values from the work item.
- Push
- On the Wedge TOP, you can explicitly specify node parameters in the scene to “push” the attribute value into at render time. This creates special attributes the render node knows to use at render time to override the specific node parameters.
This lets you wedge values in the scene without having to use TOPs-only expressions in its parameters, so the node can still be rendered manually or without TOPs.
- On the Wedge TOP, you can explicitly specify node parameters in the scene to “push” the attribute value into at render time. This creates special attributes the render node knows to use at render time to override the specific node parameters.
Push
On the Wedge TOP, you can explicitly specify node parameters in the scene to “push” the attribute value into at render time. This creates special attributes the render node knows to use at render time to override the specific node parameters.
This lets you wedge values in the scene without having to use TOPs-only expressions in its parameters, so the node can still be rendered manually or without TOPs.
Source Geo
- In the obj context create a Geometry node and step in
- Create a Box node
- Append a Null node and give it the name “OUT”
Setup Wedge
- In the Geometry node (that we just created) create a TOP Network
- We could also go to the Tasks context and dive in the default topnet or create a new Top Network there.
- Create a wedge node
- Set the Wedge Count to 5
- Add one wedge attribute
- Enable the Target Parameter and click the chooser icon next to the target parameter field to choose a parameter to override interactively. The Wedge creates special attributes that tell render TOPs to render with the overrides at runtime, so the HIP file is not affected.
- Set the start and end values to 1 and 5.
- Enable Overwrite Target Parameter on Work Item Selection If you use the Target parameter checkbox on a variable to “push” the variable into a ROP parameter, you can turn this on to do that push whenever you select a work item in the network editor. This gives you the same previewing effect as using “pull” references. However, the way this works is to actually change the value of the target parameter, so it will cause recooks and mark the HIP file as unsaved, and saving the HIP file will save the “previewed” changes. The current value of the parameter is saved on the wedge TOP when the target parameter is selected, and is restored on work item deselection. It is possible to manually capture or restore values using the Capture and Restore buttons.
Note that this parameter only affects the active Houdini Session. When the network actually runs, it calls the ROP with the “pushed” values without affecting the current HIP file.
- To create the work items select the wedge node and choose Dirty and Cook This Node from the RMB menu. Or press Shift V
- If you click the work items on the wedge node you will see the geo update in the viewport. When you click outside the node the attributes will go back to the captured value.
- Note you can click the Capture All button in the top part of the wedge parameteter pane to capture all the current values of the wedge node. This will then be the value that is the “default” values of the wedge node. You can also capture individual parameters using the Capture button on the right hand side of each parameter.
Pull
pass
Write the wedges to disc
- Append a ROP Geometry Output node to the wedge.
- set the SOP Path to point to the OUT null in the geo context.
- Set the Output File path to where we want to write the geo. Lets use:
$HIP/geo/box_bevel.`@wedgeindex`.bgeo.sc
- Dirty and cook the node (Shift V)
Wedgeing & contact sheet
Using Image Magick to create a contact sheet of still images of wedges.
- Make sure Image Magick is installed. https://imagemagick.org/script/download.php and download an installer. I downloaded ImageMagick-7.0.10-60-Q16-HDRI-x64-dll.exe Win64 dynamic at 16 bits-per-pixel component.
- Run the installer and make sure that Add application directory to seystem path and install FFMpeg is checked.
- To verify that the installation was successfuöl open the cmd promt and run magick witout and args. If the program was installed and is on the path you will get an Error: Invalid argument or not enough arguments. But it shows that the pogram is available.
- If you have problems with the environment variables you can explicitly point to magick.exe and ffmpeg.exe in houdini. The path to magick.exe and ffmpeg.exe is: C:\Program Files\ImageMagick-7.0.10-Q16-HDRI (Depending on which version you installed)