Simulation basics
What the simulation nodes have in common: the GPU engine, the cache folder, caching, Bullet Time and stopping a simulation.
The simulations
They simulate on the GPU inside Nuke and render next to your plate, under Nodes > ANR > Simulations:
- Fire and smoke: 3D Fire Simple, 3D explosion, 3D scene fire (NukeX or Nuke Studio), 2D fire smoke sim, Muzzle Flash, Clouds and Sparks from Alpha 3D.
- Blood: Blood Sim 3D, with Blood Mesh 3D and Blood Mist 3D working on its particles.
- Lightning: Lightning 3D.
Each node's page says what to connect. Most start from an alpha: a Roto, a key or a matte of the area that burns, bleeds or sparks.
Running one
- A simulation steps forward with the timeline: play or step through frames to watch it build. Its first frame is the node's start frame.
- Most GPU simulations start with their engine stopped, so a new node costs nothing until you start it: Fire Engine on 3D Fire Simple, 3D explosion and Muzzle Flash, Start / stop engine on Sparks, Start / stop blood engine on Blood Sim 3D. Pressing it again stops the engine and frees its graphics memory.
- Changing a control that shapes the simulation (emission, motion, the source) simulates again from the start. Look, light and render controls change the picture without simulating again. The tooltips say which is which.
- In 3D Fire Simple and 3D explosion, pressing the Viewer's Stop while a frame simulates pauses the simulation at the frame it reached; the next frame carries on from there.
Cache folder and caching
2D fire smoke sim, 3D Fire Simple, 3D explosion, Muzzle Flash and Blood Sim 3D can save their simulation to disk and play it back without simulating: fast to scrub, the same on every render, ready for a render farm, and a reopened script just plays. 3D scene fire keeps its simulation in its Project folder instead.
- Set the node's Cache folder first. Nothing is written until it is set, and nothing is written anywhere else. Choose a fast local drive with room: fire takes about 1.2 to 1.3 GB per 100 frames. Generate Autofill fills in a fresh folder for the node on each click.
- Press Build / rebuild cache. Each build writes a new folder; older ones are kept.
- Read cache then plays it. Look and render controls still work on a cache; controls that change the simulation need a new build.
Bullet Time
2D fire smoke sim, 3D Fire Simple, 3D explosion, 3D scene fire, Muzzle Flash, Sparks from Alpha 3D, Blood Sim 3D and Blood Mist 3D have Bullet Time on their first tab (Blood Mesh 3D freezes with the Blood Sim it meshes). Tick it, and set Freeze at to the frame to hold. Before that frame the simulation plays normally; from it on, it stays still while the camera, the transforms and the lights keep following the timeline, so you can move around a frozen explosion or a splash of blood in mid-air.
- Holding costs no simulation time: the frozen frame is not simulated again.
- The frozen frame keeps its motion blur.
- Both controls can be animated, to freeze, release and freeze again.
Memory
A simulation keeps its engine on the graphics card while you work on it. An engine nobody has viewed for 10 minutes is released by itself, or after a minute when the card is short of memory. More in AI models and the GPU.