Houdini to Glowstick

Houdini to Glowstick

Use Houdini to create scenes that can be exported to OpenUSD for rendering inside Glowstick. When done correctly (i.e. understanding the current limitations of Glowstick), rendering seamlessly is possible.

Houdini is a challenging software to learn and is unlike other 3D applications, but there are great learning resources available from SideFX themselves as well as other educators. Check out the learning content from SideFX and make use of their extensive documentation
Foundations | Getting Started Learning Path | SideFX

Houdini 21.0

Things to Know Before You Start

  • Save your Houdini file, textures, and USDs on your local drive while you work, rather than in the Ubuntu network drive. Trying to save or export to the network drive directly can cause problems.

  • Houdini is primarily a procedural, node-based 3D application. You will be working mostly in the node graph rather than directly in the 3D view like in most other software.

  • Houdini works on the basis of Operators which are used as nodes in various Networks. Here is a list of the network folder types.

image-20250605-153348.png

The operators are abbreviated as various OPs. For example, geometries and simulations may be created using SOPs (Surface Operators) and DOPs (Dynamics Operators) in the obj (Object) network folder. Expand the list below to see all the operators and their uses.

SOPs = Surface OPerators or geometry nodes that are inside an object folder. These are used to construct and modify geometry. Any kind of geometry from polygons to volumes.

DOPs = Dynamic OPerators or simulation/solver nodes that are used to construct simulations. Simulations read in geometry from SOPs and passes this data in to the DOP solvers.

LOPs = Lighting OPerators that are used to create lights and layout USD render scenes in the Solaris stage folder.

SHOP = SHading Operators are materials that represent a shader to apply to geometry. Some are hard coded with vex and others are folders that you can dive in to and modify the VOPs inside.

VOPs = Vector OPerators inside VOP network nodes are used for everything from building shaders to modifying geometry, volumes, pixels, and more.

VEX = Vector Expression Language. The code language used to write shaders. VOPs are wrappers around VEX code snippets.

CVEX = Context agnostic Vector Expression Language. This has replaced all the VEX specific contexts throughout Houdini. It is a generalized language that uses the same environment and functions anywhere inside Houdini.

COPs = Composite OPerators in composite type folders. Used in image compositing operations.

ROPs = Render OPerators in side ROP Output directories which are used to create render output dependency graphs for automating output of any type of data and for triggering external processes like rendering. Commonly used to generate sequences of geometry, simulation data and trigger Render tasks that generates sequences of images to disk.

CHOPs = CHannel OPerators used to create and modify any type of raw channel data from motion to audio and everything in between.

We’ll primarily be using SOPs to create geometry objects, SHOPs to create materials, LOPs to assemble our USD scene, and ROPs to output our scene to USD.

image-20250605-164039.png
Default Houdini Window Layout

This is what you’ll see when you open Houdini. Below is a key for the colored regions and numbered annotations of useful tools/options.

3D View

Alt navigation

  1. Perspective/orthographic views and viewpoints

  2. Camera and light viewpoints

  3. Viewport shading mode, object visibility, and multiview options

  4. 3D viewport tools

  5. Selection modes

Node Graph

  • Double click to jump into a node or network

  • U to jump up a level or out of a network

  • Tab to search for and add nodes

  1. Nodes (add with Tab key)

  2. Network folder and current path (click to change between network folder types)

Node Parameters (control the effects of each node here)

Timeline

  1. Playback controls

  2. Enable/Disable Simulation Calculations

Creating or Importing Your Geometry

  • In the node graph, make sure you’re in the obj (Object) network folder and drop down a geometry node by pressing Tab then searching for “geometry.” You will build or import your geometry inside this node network. Double click the geometry node to ‘dive in.'

image-20250605-165429.png
Two different geometry nodes within the obj network folder
  • Build your geometry using SOPs or import geometry with a File node.

image-20250605-165653.png
Custom geometry built using SOPs
image-20250605-165957.png
Imported geo. Use the button to the right of the Geometry File box to navigate to your file

 

  • Since we’ll be referencing this geometry elsewhere to build our scene, it’s useful to append a Null node to stay organized and make it easy to find. Name it something like OUT_name.

Setting up Materials & Textures

  • Navigate to the mat (Materials) network folder

  • We’ll be using specific shading nodes that work well with USD Preview Surface, but in order to preview materials and textures in the 3D view you’ll need a standard shader like the Principled Shader

  • Add a Principled Shader and in the node parameters window, under the Textures tab, link your texture(s). Adjust the other parameters in the Surface tab.

image-20250605-184157.png
  • To preview this material on your object, it needs to be assigned. Navigate back to the obj network folder and into your geometry network. Append a Material SOP and choose your PrincipledShader material.

image-20250605-184448.png
Assigning a material at the SOP level
  • Once you’re happy with your material, create the equivalent USD compatible shader.

  • Back in the material network, drop down a USD Material Preview Builder node.

    image-20250605-171713.png
    USD Material Preview Builder node in the mat network
  • Jump inside the material builder node. You’ll find a USD Preview Surface VOP already connected to the output for you. Expand the Surface menu to expose the available inputs and make any adjustments you’d like in the node parameters window.

  • Use a USD UV Texture node to add input textures and a USD Prim Var Reader node to source the UVs into the st input

IMPORTANT: The Signature of the primvarreader must be set to Float 2 in order work with Glowstick’s current OSL library.

image-20250605-185720.png
  • To assign this material for use in our exported USD, we’ll have to link it in the Solaris stage network.

Assembling the USD Scene

  • Navigate to the stage network folder, drop down a LOPnet (Lighting Operator Network), and dive in. This is where we’ll build out the scene with our geometry, materials, lights, and camera, and export to USD.

image-20250605-191356.png

 

Linking Geometry & Materials

  • Inside the LOPnet, drop down a SOP Import node. This is where we’ll reference any geometry objects we’ve imported or created.

  • Pick your geo object in the import node, making sure to choose the null OUT_name before any non-USD material had been assigned in the node chain.

  • Switch the Sublayer Style to Merge SOP Layer Into Existing Active Layer. This will write the geometry into the scene USD file rather than creating another file for the geo to be referenced by the USD.

image-20250605-192844.png
  • If you have multiple geometries to import, repeat the SOPImport process and plug them all into a merge node.

  • Alternatively, if you’d like to use USD geo that you have on your drive, add a Reference node and select your USD.

Note: If you use this method, the geometry USD should be located in the same directory as your scene USD when you go to render in Glowstick

  • To assign your USDPreviewSurface material, append a Material Library node and pick your material in the Material VOP path. This only creates the material library in the LOPnet, so to attach the material to the geometry tick the Assign to Geometry checkbox and choose your SOPImport in the Geometry Path. You can also use a Material Assign node instead.

image-20250605-194037.png

 

Setting Up Cameras

  • To add a camera and immediately snap it and lock it to the view, click the No Cam button in the top right of the 3D View and choose New Camera.

  • Camera properties can be tweaked in the View tab of its node parameters.

  • Since the MaterialLibrary node makes the objects very dark in the viewport, you can temporarily mute it with the yellow bypass toggle. This will help you better preview your lights as you place them.

image-20250605-194815.png

Adding Lights

  • Create Glowstick-compatible lights by adding Area Light nodes. You can add and place multiple lights with the transform gizmos in the 3D view, then merge them with a Merge node. Use another merge node to add them to your main scene node stream.

  • Light properties like color and intensity can be tweaked in the node parameters.

image-20250605-195149.png

Exporting USD from Houdini

  • Drop down a USD ROP node at the end of your network and select an output file path.

  • If you want to pack the imported SOP geometry into the scene USD, change the Save Style to Flatten All Layers. If you’d like to export a separate layer USD file for the geometry to be referenced by the scene/render USD, leave it on Flatten Implicit Layers.

Note: If you use this method, the geometry USD should be located in the same directory as your scene USD when you go to render in Glowstick

  • Click Save to Disk to export.

image-20250605-195451.png

Rendering with Glowstick

  • Copy your USD and any textures and HDRIs from your local drive to your Ubuntu network home, making sure that the folder structure is identical as to maintain relative file path references.

  • Render by entering the code below. Switch the .usd file, HDRI, and resolution to your files and render settings.

    • bolt_server --backend /usr/share/bolt_server/libbolt_embree_backend.so -i ./pathtoUSD/USDFile.usd --sky 0,0,0 -h 1080 -w 1920 --iters 400 --bounces 5
  • When rendering with an HDRI, use --hdri

    • You must specify which folder your HDRI is in like below since HDRIs are not part of the USD export.

      • --hdri ./pathtoHDRI/HDRIFile.exr

      • bolt_server --backend /usr/share/bolt_server/libbolt_embree_backend.so -i ./ZeusBust/USD/ZeusBust.usd --hdri ./ZeusBust/Textures/HDRI/brown_photostudio_01_1k.exr -h 1080 -w 1920 --iters 400 --bounces 5
    • You can hide the HDRI image in the background by using: --alphacolor 1

      • This also exports a -alpha image that you can use as a mask for replacing the background in a photo editor

  • You can change the location of your render output with --dest ./foldername/

    • Be sure to include the / at the end of the path to avoid exporting one level up

  • Lighting Differences

    • Lights can appear bright or dim when rendering with Glowstick. Set --lightmul to correct the intensity.

  • bolt_server --help for documentation on commands and how to use them