PopcornFX v2.19

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
  1. Home
  2. Docs
  3. PopcornFX v2.19
  4. Debugging
  5. Particle debugger

Particle debugger

Overview

Particle values can be inspected by using PopcornFX Editor’s particle debugger.

Particle debugger

All renderers support selection in the viewport (draw a selection rectangle with the mouse) and are rendered in wireframe when selected.

When selecting particles with the viewport paused, the debugger automatically captures and displays all values for selected particles (the currently debugged particle is displayed in red).

Captured values are displayed for each pin where available in the graph containing the selected particles (layer containing the selected renderer).

Particle debugger controls

  1. Captured values are displayed in the graph when available (evolve only)
  2. Allows cycling between debugged particles
  3. Pausing the viewport is required
  4. Selected/debugged particles are drawn in wireframe with the currently debugged particle outlined in red
  5. The Editor mode is required to debug particles

GPU particles

The debugger supports debugging for CPU and GPU simulated particles.

Particle debugger (GPU)

Compute shaders for GPU particle graphs are augmented with debugger specific code in order to capture GPU particles data. Debugger specific compute shaders contain a lot more instructions. This can lead to:

  • The shader compiler (DXC, FXC) taking too much time to compile the shader causing PK-Editor to detect the compilation task to have timed out. This is particularly the case with the D3D11 GPU simulation compiled with DXC.
  • The shader compiler itself not being able to compile the debugger compute shader(s)

You can expect a PopcornFX Editor freeze when selecting GPU particles. Its duration can be up to the shader compiler timeout time, specified in your user settings.

Once the editor becomes responsive again, if no values are displayed in the graph, this usually means the debugger compute shaders could not be compiled or timed out, so the debugger won’t work.

We recommend to increase the timeout to 5000ms (5 seconds):

Particle debugger: increase timeout

We plan in future PopcornFX Editor versions to schedule debugger compute shaders compilation on asynchronous tasks to avoid freezing the editor.

Limitations summary

  • Only evolve values are captured. It is not currently possible to debug particle spawn data.
  • Capturing values in Shipping will not work, make sure to be in Editor mode (specified in the viewport’s toolbar)
  • GPU particles can be debugged, increasing the shader compilation timeout is recommended

Debug checks

Asserts are a powerful debugging tool allowing to break PopcornFX simulation when a condition is not met. Assertion nodes can be placed in the graph with values evaluated per-particles.

When the simulation is paused, particles that did not meet the assert conditions are automatically captured and selected in the viewport.

Particle debugger asserts

Similarly to assertion nodes, Error nodes can be used and produce the same result, however the condition is inverted:

Assertion and Error nodes

Debug check nodes can be placed in custom templates to sanitize their usage by VFX artists.

Limitations summary

  • Assertion and Error nodes currently have no effect when used by GPU particles or when in Shipping.
Was this article helpful to you? Yes No

How can we help?