Houdini misc

A collection of various Houdini related things that doesn´t fit anywhere else.

POP

Birth Rate

A good way to control the amount of particles being emitted is to keyframe the Const. Birt Rate (Birth tab) with values between 0 and 1. Then we can use the Scale Point Count by Area (Source tab) as a multiplier of points emitted.

Rest attribute

If we want to store the position where the particle was spawned we can create a rest attribute to the geo that we use as source. This attr can then be used at the sop level so do various things, maybe use as Cd. All attributes are inherited by default, we might axplicitly set which attrs to inherit.

POP Advect by Volumes

Lets use a velocity volume to advect particles.

  • In the popnet after the source append a POP Advect by Volumes.
    • Velocity source: point to the velocity volume
    • Advection Type: Update Position
      • This will explicitly set the position (instead of update force that implicitly will affect the position). We might want to set the position if we have nice, detailed velocity noise and would like to use this. (might be worth testing the other options as well)
      • Velocity Update: Final Velocity
        • We want to store the velocity if we want motion blur.

SOP

Wrangle

  • Output Selection Group: group_name
    • The name of a group to use as the output selection. When the highlight flag is enabled for this node, this group will be the output selection used by later modeling tools (if it exists).

UI

Default desktop

  • Edit > Preferences > General User Interface
    • Startup in Desktop : Build

Flags

Flags represent some state information on the node, such as which node represents the output of the network. Different network types have different flags.

Selectable template flag

If you LMB ctrl click the template flag you will set the selectable template flag. This makes the geometry visible and allows you to select components from the templated geometry in the viewport, in addition to components on the geometry with the Display flag.

Volume

VDB Analysis

Gradient

We can use the vdb analysis node to calculate the gradient of an SDF. The value of a SDF is 0 at the surface, negative on the inside and positive on the outside. When we calculate the gardient of an SDF we will get a vector that points in the direction of where the values of the sdf increases. Then we can for instance use this vector field to drive particles.

  • Append a VDB from Polygons node to the geo.
    • Use World space for Band: Enabled
      • It might be easier to use world space to decide how large padding we want instead of voxels.
    • Exterior Band:
      • Set the desired size
    • Interior Band:
      • If we do not fill the interior we can set this
  • Append a VDB Analysis node
    • Operator: Gradient
    • Custom Name: vel
      • Here we can give the filed a custom name if we want
  • Now we have a vel vector filed that we can use for various things, for instance use in a popnet to advect particles using a POP Advect by Volume.
  • We can noise up the volume using a volume vop.

Curl field (velocity)

  • Append a bound sop to the geo that we wish to create a curl field around. Add panning if needed. The bound will be the size of our velocity volume.
  • Append a volume sop to the bound.
    • Rank: Vector
    • Name: vel
    • Dimensions
      • Uniform Sampling Divs: 100
        • Note, the more subdivs we use the more detail we can get in our curl noise.
  • Append a VDB from Polygons to the input geo.
    • Use Worldspace for band
    • Exterior Band: 2
    • Interior Band: 1
  • Append a Volume VOP and connect the volume sop to the first input and the VDB from Polygons to the second and dive in.
    • Create a Vector to Vector4 and connect P and time.
    • Create a Curl Noise and connect the hvec from the Vector to Vector4 and connect the OpInput2 (our vdb that created the sdf) to the sdf input of the curl noise.
    • Create a Bind Export node and set the name to vel and connect the noise output to the input of the bind export.
    • We will promote Frequency, Roughness and Surface Effect Radius
      • Note that the Surface Effect Radius will control how for the curl noise will be affected from the sdf surface. Larger value means it will reach farther out.
  • We have now created a velocity volume with a curl noise. We can for instance use this inside a pop simulation to advect the particles.