Oct 30, 2024 2:52 AM
Dec 29, 2025 9:18 AM

Houdini Solaris Sink

· Houdini MOC · #note/sink ·

TOC

Attribute conversion

v@P      >>> points 
v@Cd     >>> primvars:displayColor 
f@Alpha  >>> primvars:displayOpacity 
i@id     >>> ids
v@uv     >>> primvars:st // think of STMaps in Nuke
v@N      >>> normals 
v@v      >>> velocities 
v@w      >>> angularVelocities
v@accel  >>> accelerations 
f@width,
f@widths,
f@pscale >>> widths

Scene graph

Detail text colors

The values are color-coded as in Pixar’s usdview utility.

Grey Not set Value is not set.
Orange Fallback Default values provided by the schema where no value was explicitly set.
Blue Set Attribute/primvar value (without time samples).
Green Time sampled Animated value (read from time samples).
Violet Value clip Time sampled value from a value clip.
Indigo Computed Read-only intrinsic or computed values.
Red Relationships Pointer to another prim with some relationship to the selected prim(s).

Primitive matching patterns

Match subsets of BasisCurves

%type(BasisCurves,strict=true) & %type(GeomSubset,strict=true)
/Kitchen/* & %Props & %Static
/house/* + /yard/* + /garage/*
/Kitchen/* - %Lights
/Kitchen/*Chair ^ /Kitchen/HighChair

Assigning materials with VEX

Using partitions

This is the case when you have materials already assigned in SOPs. It solves 2 problems at once. First, getting rid of the unindexed shop_materialpath attribute, it saves memory and is more robust. And secondly, it automatically reconstructs the new LOP material primitive path from the subset primitive names (which have the material paths in them).

  1. Import/create SOP geometry, and set shop_materialpath as partition attribute.
    Disable Prefix Subsets with Attribute Name for shorter names.
    This will create GeomSubset primitives under each of your Mesh primitives, and their names will contain the path to each material (with slashes replaced with underscores). We'll use these names to get our materials re-assigned in LOPs.
  2. If it is a few objects, you might want to create a separate Material Library with unique path to each geo's material set.
  3. Use Assign Material node with Vexpression.

To iterate through the GeomSubset primitives set Primitives field to:

%type:GeomSubset

Use vexpression:

string separator = chs("separator"); // the name of material network in SOPs
string submat = chs("submat"); // the name of LOPs material subprimitive
string mat = split(@primpath, '/')[-1]; // extract the subset name from the full primitive path
mat = re_replace(".*" + separator + "_", "/materials/" + submat + "/", mat); // replace the path with the LOPs material path
return mat;
  1. Add 2 string field to the node interface for separator and submat values. Or hard-code them instead.

SOPtoLOPautomat.jpg|600

Getting stage values

Python expression to get the Stage's start/end frames. This call re-cooks the tree.

stage = hou.pwd().inputs()[0].stage() # reads stage from the input
return stage.GetStartTimeCode() 
# or
return stage.GetEndTimeCode()

LOPs python examples from docs

Multishot workflow