Houdini 21.0 Pyro

Pyro Configure Color Smoke

On this page

Overview

There are several Pyro Configure examples available through the tab menu. These are similar to shelf tools that put down networks of nodes for learning purposes. The Pyro Configure Colored Smoke example illustrates 3 colored smokes interacting. It also demonstrates how to use the feedback wires to add additional fields to the simulation.

Important nodes

SOURCE

Wire a Mono layer into this to adjust where the smoke emits from. A value of 0 will have no fire and 1 will have the full thickness.

COLOR

Wire an RGB layer into this to set the color of newly emitted smoke.

pyro_configure1

Adjust the resolution of the smoke. This is the number of voxels across the default imaging window. Higher resolutions will take considerably more time and memory.

layertovdbleafpoints6, pyro_sourcefromlayer10

The VDB has to be activated so you can source into it. Layer to VDB Leaf Points handles the activation from the SOURCE layer, while the Pyro Source from Layer handles the actual sourcing. The thickness and inputs for these two nodes should match.

pyro_block_begin6

The start of the simulation loop. All nodes inside the convex hull (highlighted area) will run every simulation step. The simulation is clipped from -1 to 1 by default, and can be controlled by modifying the Clip X/Y/Z parameters.

The feedback input port is only read on the first frame of the simulation. After that, the feedback output port will contain what was passed into the feedback input port of pyro_block_end6 on the previous frame. Note that the cable structure must be the same. The types and names of the wires must not change.

All feedback wires that match the VDBs to Activate pattern will be activated for new sources, and all feedback wires that match the VDBs to Advect will be advected by velocity. These both are the default *, so the VDBs passed through named Cd and Cd_weight will be resized and advected. Note this pattern is also used to decide if the default density and temperature VDBs will be updated.

extra_Cd_fields, cableunpack3, cablepack2

To properly simulate color, two VDBs are needed. One is a vector VDB of the pre-multiplied color, the other is a scalar VDB of the amount of color present. These nodes combine these two VDBs into a cable, extract them, and ensure they are named the same so the feedback is consistent.

inward_velocity

Takes a 2d velocity field that points inward generated by the previous nodes and projects it onto the VDB to create a 3d inward pointed velocity field.

pyro_buoyancy6

Instead of having hot air move upwards, the direction of buoyancy is controlled by the direction input. The smoke in this simulation rises to the center of the layer.

vdbfromlayer1

Transfers the colors of the COLOR layer to a VDB by projecting the layer onto the VDB.

add7, multiply1, add8

Perform a weighted sum of the previous Cd and Cd_weight with the newly sourced values.

pyro_lightambient6

Computes lighting for the fire’s smoke using an ambient light source. Increasing smoke density (with the Density Scale parameter) increases the contrast of self-shadows.

pyro_lightfrompoints1

Computes lighting from the top left of the smoke, providing directional shadows.

regularize

Color weights close to zero can generate NANs or Infinity when divided out. You can avoid this by boosting the weight slightly.

normalize

Un-premultiply the color by dividing by the color weight. This provides the absolute color of the smoke.

mix_in_color

The light field from the lighting nodes is multiplied by the smoke color to get the effective color of the smoke.

rasterizevolume6

Renders the flame into a layer. The camera_ref can use an imported camera from the Camera Import COP to change the view or resolution of the render.

Learning from this example

To...Do this

Change what colors are used

Change the input of the COLOR node.

Create different smoke sources

Change the input of SOURCE.

Control the amount of smoke emitted

Change or animate the Brightness parameter on the bright2 node to control how much smoke is created.

Create other 2d patterns for the smoke to rise along

Change the input of inward_velocity.

Pyro

Sparse Pyro

Pyro instancing

Legacy Pyro

COP Pyro