Houdini 20.0 Shelf tools

Simple GPU Torch shelf tool

Creates a torch fire that can be fully simulated on the GPU.

On this page
Pyro simulation in the viewport. Colorspace: ACES, Voxels Size: 0.005.

Overview

This shelf tool creates a very simple torch fire setup that uses the Pyro Solver’s Minimal OpenCL Solve to perform the simulation on your GPU. This ensures that the simulation runs as fast as possible and allows for live parameter manipulation during the simulation. To achieve this, some features must be disabled on the solver.

Minimal OpenCL Solve

The Pyro Solver SOP has the ability to perform a Minimal OpenCL solve, which is useful for very rapid prototyping. This option is located on the General tab in the Simulation Type dropdown menu. It allows for interactive manipulation of parameters during a running simulation, which can give you quick feedback of their effects on the simulation.

When this option is selected, some features of the solver are turned off to to ensure that all simulation data can stay in video memory, avoiding costly copies that are necessary when only Use OpenCL is turned on.

Tip

Turn on Live Parameter Display during Playback in the Edit menu to make sure the solver interface updates as you are tweaking parameters in the midst of a simulation.

Tip

You can animate the Center parameter on the Pyro Solver SOP to move the simulation container. For example, you can do this to track the world-space motion of a moving torch as you are simulating its fire.

To produce fast simulations, Minimal OpenCL uses the OpenCL device and imposes the following limitations.

  • Simulation caching is disabled. This means that you cannot scrub the timeline to view saved results.

  • Advection-Reflection is not supported.

  • Only a dense simulation can be performed.

  • Dynamic resizing of the container is turned off. A static size needs to be set under the Bound tab.

  • The solver will not dynamically substep based on the CFL Condition.

  • Sourcing and collider support are more restricted. A frame range needs to be specified for both, and the solver will loop these input sources throughout the simulation. Additionally, the collider must be converted into a signed distance field (called collision) and a velocity field (v).

There is more you can do to increase performance:

  • The use of a Pyro Bake Volume SOP node should be avoided during look development to maintain performance.

  • Make sure that the Pyro Solver SOP node’s field and shape guides are turned off: Fields ▸ Field Guides ▸ Field Guide ▸ No Guide and the appropriate parameter in the Shape tab.

  • Use looping sources where possible.

  • If you use microsolvers, check if the Use OpenCL option is turned on to avoid bottlenecks.

Tip

The Simple GPU Ground Explosion is a very good start to test performance and solver settings.

Note

Best performance is achieved when the OpenCL device is set to the GPU that is responsible for rendering the viewport.

Understanding Simple GPU Torch

The shelf tool creates a node network consisting a couple of nodes.

  1. sphere generated the shape for the torch to lit on fire.

  2. pyrosource generates the attributes for pyro sources.

  3. attribnoise_density further modifies the generated density attribute before the points are rasterized to volume sources.

  4. attribadjustvector_velocity generates a v attribute to generate initial velocity for the torch fire simulation.

  5. volumerasterizeattributes takes the source points and converts their attributes into volumes. The rasterized density, and v volumes drive the pyro simulation.

  6. pyrosolver performs the simulation. Parameters on this node have the greatest influence on the dynamic behavior of the simulation. You can interactively adjust the majority of parameters in the Solving and Look tabs as the simulation is running.

    Note

    The incoming volume source’s position is fixed over time at the origin. The animation of a torch source is driven by the animate_transform node, which then drives the Source Location Offset parameter on the pyrosolver.

    Tip

    Turn on Live Parameter Display during Playback in the Edit menu to make sure the solver interface updates as you tweak parameters during simulation.

    To...Do this

    Increase container size

    Change Center and Max Size parameters under the Setup tab.

    Larger containers simulate slower and take up more video memory.

    Change how fast the sources cycle

    Modify Cycle Length under Sourcing.

    This parameter controls how frequently the sources are restarted. Lowering its value will leave less uninterrupted time between bursts for the explosion to develop.

Shelf tools

Using the shelf

  • Customize the shelf

    How to change the look of the shelf, change and rearrange its contents, and create your own shelf tools.

Technical