ParticleCache

The ParticleCache node allows you to store the geometry simulation for a particle system to file. It can then be read back in different sessions of Nuke or on different machines without the need for recalculation.

This allows a particle system to be produced by an artist and then used by a render farm without recalculation, speeding up render times.

Caching does not replace the particle system rendered, as it relies on its inputs.

Note:  ParticleCache nodes must be placed at the bottom of a single particle system or multiple merged particle systems. They cannot be placed beneath a Scene node connected to two separate streams or in the middle of a string of particle nodes.

Inputs and Controls

Connection Type

Connection Name

Function

Input

particles

The particle system you intend to write to cache.

Control (UI)

Knob (Scripting)

Default Value

Function

Cache Tab

file

file

none

Sets the file path to save the particle system to using the .nkpc file extension.

Note:  ParticleCache may need to render up to 100 sub-frames. To account for this, it adds decimals to the file name's frame number. For example, if the file name in the file field is particle_cache.####.nkpc, ParticleCache may generate files called particle_cache.0001.01.nkpc, particle_cache.0001.02.nkpc, and so on.

padding

particle_cache_padding

1

The number of extra frames added to the start and end of the ParticleCache render. This is required if you have nodes downstream requesting frames outside the normal frame range due to motion blur (for example, if you have increased the shutter value in a downstream ScanlineRender node).

If you get a "Particle cache data not found" error when you enable read from file, you need to increase this value.

Render

Render

N/A

Click to render the particle system to the location specified in the file control.

read from file

particle_cache_read_from_file

disabled

When enabled, use the particle system rendered to the location specified in the file control.

When disabled, re-evaluate the particle system as normal.

Python Tab (These controls are for Python callbacks and can be used to have Python functions automatically called when various events happen in Nuke.)

before render

beforeRender

none

These functions run prior to starting rendering in execute(). If they throw an exception, the render aborts.

before each frame

beforeFrameRender

none

These functions run prior to starting rendering of each individual frame. If they throw an exception, the render aborts.

after each frame

afterFrameRender

none

These functions run after each frame is finished rendering. They are not called if the render aborts. If they throw an exception, the render aborts.

after render

afterRender

none

These functions run after rendering of all frames is finished. If they throw an error, the render aborts.

render progress

renderProgress

none

These functions run during rendering to determine progress or failure.

Step-by-Step Guides

Caching Particles

Video Tutorials