On this page |
Overview ¶
This shelf tool creates a very simple explosion 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 ¶
Note
Currently, the minimal pyro solver runs slower in the Vulkan viewport than it does in OpenGL.
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 Ground Explosion ¶
The shelf tool creates a node network consisting of only three nodes.
-
pyroburstsource
generates the pyro sources. This node also captures the initial shape of the explosion. You can change Shape Offset under Burst Shape to quickly modify the shape of the explosion.Note
The simulation must start over to pick up changes to the sources. To force this, you can press the button on the playbar to rewind the timeline or use the Reset Simulation button on the pyro solver.
-
volumerasterizeattributes
takes the source points and converts their attributes into volumes. The rasterizedburn
,density
, andv
volumes drive the pyro simulation. -
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.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.