ANR Tools

ANR Blood Sim 3D

Simulates blood in 3D on the GPU: gunshot hits, spurts, fountains and blood running down a surface, ready to mesh with Blood Mesh 3D and mist with Blood Mist 3D.

Overview

Blood Sim 3D is a GPU liquid simulation for blood. It throws blood from a nozzle or from the alpha of an image and lets it break up, fall, splash and pool on a floor, or cling to a surface and run down it. Four presets start you off: Gun hit, Blood fountain, Surface flow and Arterial spurt.

The Sim shows the particles only: its picture is a fast point preview, and in the 3D Viewer (press Tab) the particles show as points. The liquid look comes from ANR Blood Mesh 3D, which turns the particles into a lit, wet mesh, and ANR Blood Mist 3D adds fine spray and haze. Both read the Sim through their Particles input, so one simulation feeds both: Sim to Blood Mesh 3D for the liquid, Sim to Blood Mist 3D for the mist, then merge both over the plate.

Place the blood in your shot with a tracked camera on Camera: Source XY is the wound in the picture at the Reference frame, and the blood then lives in world space while the camera moves. You can also place the nozzle in 3D with an Axis on Axis. For blood running over a body, connect a matte to Surface (and a depth relief to SurfaceDepth if you have one), or load an OBJ collider.

Time scale slows the simulation down or speeds it up (animate it for speed ramps), and Scene scale (cm per unit) tells the node how big a world unit is in your scene. A live simulation steps forward from the Start frame; build a cache on the Cache tab to scrub freely, to reopen the script with the result, and to render on a farm.

Bullet Time freezes the blood at a frame while the camera keeps moving, so you can move around a frozen splash. Blood Mesh 3D freezes with it and keeps its motion blur; give Blood Mist 3D the same Freeze at frame.

Inputs

SourceCameraSurfaceSurfaceDepthAxisBlood Sim 3DOutput
  1. Sourceoptional

    Optional. An alpha to emit from: blood is born where the alpha is, at Source depth, and less where it is soft. With Emitter on Automatic it is used as soon as it is connected, and Source XY is then ignored.

  2. Cameraoptional

    Optional. Your tracked shot camera (a classic perspective Camera). Source XY and the Source alpha are placed through it at the Reference frame and Camera distance; its animation then moves the view over the same liquid, on a cache too. Without it, the built-in camera on the View tab is used.

  3. Surfaceoptional

    Optional. A matte of the surface the blood runs on (a neck, an arm, a wall), used when Collision surface is Alpha + depth input. The surface ends at the matte's 50 percent edge, so a matte that never reaches 0.5 gives no surface (the node warns).

  4. SurfaceDepthoptional

    Optional. A relief for that surface in the red channel: red times Depth scale moves the surface towards the camera. Connected without a Surface matte, the relief covers the whole frame.

  5. Axisoptional

    Optional. An Axis (or any node with a world position) that places the nozzle in 3D: the blood starts at the Axis and the launch direction turns with it. Create 3D source handle makes one for you.

Output. A fast point preview of the particles seen through the camera, carrying the simulation in a private layer that Blood Mesh 3D and Blood Mist 3D read. Press Tab in the Viewer to see the particles as points in 3D.

Quick start

  1. Add ANR Blood Sim 3D. A new node starts from the Gun hit preset; choose another Preset on the Setup tab to change the starting look.
  2. Connect your shot camera to Camera and set Reference frame to the frame you place the wound on, or work with the built-in camera.
  3. Set Source XY on the wound and aim the spray with Direction X/Y/Z, or drag the emission handle in the Viewer: the centre moves the source, the yellow arrow aims it. To emit from a shape, connect a matte to Source.
  4. Click Start / stop blood engine and play forward from the Start frame.
  5. With the Sim selected, add ANR Blood Mesh 3D and view it to judge the liquid. Add ANR Blood Mist 3D the same way for fine spray.
  6. On the Cache tab, choose a Cache folder (or click Generate Autofill), check Last frame and click Build / rebuild cache. When it finishes, Read cache turns on and the engine stops.
  7. Merge Blood Mesh 3D, and Blood Mist 3D if you use it, over the plate.

The panel

The node's panel as Nuke shows it, with the values of a new node. Click any control to see what it does; tabs and sections work as in Nuke.

ANR_Blood_Sim_3D1

Bullet Time, the preset, the engine and particle count, start frame, time scale and scene scale.

Bullet TimeFreeze at1
PresetGun hit
Start / stop blood engineReset simulation
Refresh particle count
EngineNVIDIA FleX CUDA liquid. Start engine, then advance frames. Preview changes rendering only.
Start frame1
Time scale1
Scene scale (cm per unit)10

All controls

Setup10 controls

Bullet Time, the preset, the engine and particle count, start frame, time scale and scene scale.

Bullet TimeCheckboxbulletTime

Freezes the blood at the Freeze at frame. The camera and the look keep following the timeline, so you can move around the frozen blood (Blood Mesh 3D and Blood Render 3D downstream freeze with it). Holding a frame costs no simulation time. Ticking it freezes at the current frame. Animate it off to let the simulation go on. Works live and on Read cache; off while a cache is built.

Default: off

Freeze atSliderbulletFrame

The simulation frame Bullet Time holds. Before it the blood plays normally; from it on it stays still. Animatable.

Default: 1

Engine

PresetMenupreset

Picking a preset sets the emission, launch, liquid, gravity, collision and noise values for that look and clears their animation. Source XY, Start frame, Seed, Floor height, the camera, Time scale and Scene scale (cm per unit) stay as they are.

Default: Gun hitOptions: Gun hit Blood fountain Surface flow Arterial spurt

Start / stop blood engineButtonbloodEngine

Starts or stops the simulation. New nodes start stopped; stopping frees the engine's GPU memory. Not needed while Read cache is on.

Reset simulationButtonresetSimulation

Throws the simulation state away and simulates again from the Start frame. Use it after fixing a bad input, such as a missing collider OBJ.

Refresh particle countButtonrefreshStats

Writes the live particle count and the effective particle spacing of the last finished frame into the Engine line, plus the time scale, scene scale or wall when they are in use.

EngineStatusstatus

The engine line: what the engine is doing, or the particle count after Refresh particle count.

Timing & scale

Start frameSliderstart

The slider is a convenient display range. Type higher values directly; available memory and the SDK integer representation are the remaining limits.

First frame of the emission; the simulation runs from here. Changing it re-simulates.

Default: 1

Time scaleSlidertimeScale

Simulated seconds per frame = Time scale / frame rate. 1 is real time, .25 is 4x slow motion, 2 runs twice as fast. Animate it for speed ramps. Emission, lifetimes, turbulence and post noise follow simulated time; the output motion (and motion blur downstream) stays per real second. Re-simulates.

Default: 1

Scene scale (cm per unit)SlidersceneScale

Centimetres per world unit of your scene: 10 is the presets' scale (1 unit = 10 cm), 1 a centimetre scene, 100 metres. Simulation spacing, Nozzle radius, Launch speed, Gravity, Turbulence, Post noise and the sphere/capsule size keep their values at the 10 cm reference and are converted for you. Placement is in your scene's units: Source XY and depth, Camera distance, Floor height, Surface X/Y/Z, Depth scale and the OBJ. Re-simulates.

Default: 10

Source19 controls

Where the blood comes from (nozzle, Source alpha or Axis), how much, how fast and in which direction.

Placement

EmitterMenuemitter

Automatic emits from the Source alpha when Source is connected, otherwise from the point nozzle at Source XY. Point nozzle and Source alpha force one or the other.

Default: AutomaticOptions: Automatic Point nozzle Source alpha

Source XYPositionsourcePoint

Nozzle position in the reference camera. Source alpha emission ignores it: alpha blood is born where the alpha is.

Default: 1024 855.8

Source depthSlidersourceDepth

Depth behind the reference image plane. XY stays aligned in the reference camera.

Default: 0

Nozzle radiusSliderradius

World-space emission radius. Larger values make broader jets/sheets.

Default: 0.15

Show emission gizmoCheckboxshowGizmo

Drag the yellow arrow to aim freely, colored rings to rotate world X/Y/Z, or the center to move the source. Release commits one edit; Escape cancels.

Default: on

Create 3D source handleButtoncreateSourceAxis

Makes an Axis node at the source and connects it to the Axis input: the nozzle then sits at the Axis and the launch direction turns with it. Press Tab in the Viewer for the 3D view and drag the Axis handle (its panel open) to place the blood in your 3D scene, or snap it to tracked points. Any Axis (or a node with a world matrix) connected to the Axis input does the same; disconnect it to go back to Source XY.

Emission

Flow rateSliderrate

Requested particles per second. Source alpha weights emission. Nozzle resolution automatically refines to deliver the requested flow.

Default: 0

Impact amountSliderburst

Requested particles in the impact, distributed over Emission duration. Nozzle resolution automatically refines to deliver the requested count.

Default: 16000

Emission durationSliderduration

Seconds of emission after Start frame; existing liquid continues falling.

Default: 0.1

Liquid lifetimeSliderlifetime

Seconds until liquid particles expire. Limits memory and accumulated pools.

Default: 6

Launch

Launch speedSliderspeed

World units per second.

Default: 13

Spray angleSliderspread

Cone half-angle in degrees.

Default: 50

Direction XSliderdirectionX

Launch direction in world space. With an Axis input, in the Axis's space: rotating the Axis turns the spray.

Default: 0.8

Direction YSliderdirectionY

Launch direction in world space. With an Axis input, in the Axis's space: rotating the Axis turns the spray.

Default: 0.35

Direction ZSliderdirectionZ

Launch direction in world space. With an Axis input, in the Axis's space: rotating the Axis turns the spray.

Default: 0.5

Variation

Flow variationSliderrateVariation

Seeded, smoothly changing variation in continuous emission. 0 is constant; 1 is full variation.

Default: 0.2

Speed variationSliderspeedVariation

Coherent seeded launch-speed variation across the source and over time.

Default: 0.45

Lifetime variationSliderlifeVariation

Seeded variation of each particle's lifetime.

Default: 0.1

SeedSliderseed

The slider is a convenient display range. Type higher values directly; available memory and the SDK integer representation are the remaining limits.

Picks another variation of the emission with the same settings.

Default: 1

Fluid10 controls

Particle spacing, viscosity, cohesion, surface tension, gravity and solver accuracy.

Liquid

Simulation spacingSliderspacing

Maximum world-space spacing. Dense nozzle emission automatically uses finer spacing to preserve the requested count.

Default: 0.025

ViscositySliderviscosity

FleX liquid velocity smoothing. Higher values produce thicker flow.

Default: 2.5

CohesionSlidercohesion

Attraction between liquid particles; keeps streams connected.

Default: 0.04

Surface tensionSlidertension

Resists small surface wrinkles and holds droplets together.

Default: 0.002

Gravity

Gravity XSlidergravityX

World acceleration.

Default: 0

Gravity YSlidergravityY

World acceleration.

Default: -98.1

Gravity ZSlidergravityZ

World acceleration.

Default: 0

Accuracy

Fluid iterationsSlideriterations

The slider is a convenient display range. Type higher values directly; available memory and the SDK integer representation are the remaining limits.

Solver passes per substep. More passes hold the liquid together more firmly and cost time.

Default: 4

SubstepsSlidersubsteps

The slider is a convenient display range. Type higher values directly; available memory and the SDK integer representation are the remaining limits.

The smallest number of solver steps per frame. The node adds more by itself for fast or finely spaced liquid.

Default: 3

Initial particle reserveSliderlimit

Initial allocation, not a particle ceiling. Grows automatically to fit emission while memory is available.

Default: 30000

Collision15 controls

Wetting, the floor, shadows for Blood Mesh 3D, and the collision surface: sphere, capsule, matte and depth, or OBJ.

Wetting

Surface adhesionSlideradhesion

Liquid attraction to colliders. Surface flow uses this to cling and run.

Default: 0.4

Surface frictionSliderfriction

Tangential resistance against the collision surface.

Default: 0.6

Floor

Floor collisionCheckboxfloor

Lets the blood land and pool on an infinite floor at Floor height. The floor is not rendered; it only stops the liquid, and Blood Mesh 3D can shade shadows on it.

Default: on

Floor heightSliderfloorY

World Y of the infinite floor. 0 is Nuke's ground plane (the grid in the 3D viewer); new nodes start there. Presets never change it.

Default: 0

Shadows on floor and surfacesCheckboxshadows

Blood Mesh 3D darkens the floor and the collision surface (sphere, capsule, Alpha + depth surface or wall, OBJ) where the blood blocks its lights: soft contact shadows with Skylight, sharp ones from the key light. The shadow is in the Mesh's alpha, so Merge over darkens the plate. Render only: never re-simulates, and works with Read cache.

Default: off

Shadow strengthSlidershadowStrength

How dark the blood's shadows on the floor and the collision surface are. 1 is the physical shadow of Blood Mesh 3D's own lights; above 1 deepens it, up to black. Render only.

Default: 1

Surface

Collision surfaceMenucollider

Alpha + depth input: the Surface alpha (50 percent contour) and the SurfaceDepth red relief make the surface. SurfaceDepth without a Surface alpha: the relief covers the whole frame. Neither connected: an invisible flat wall, vertical and facing the camera, one particle spacing behind the source with Surface at source depth (else at Surface Z), that the blood clings to and slides down.

Default: NoneOptions: None Sphere Curved surface (capsule) Alpha + depth input OBJ mesh

Surface at source depthCheckboxsurfaceAtSource

Alpha + depth input: put the surface one particle spacing behind Source depth, so blood born on the Source alpha (or at the nozzle) touches it and runs down it. SurfaceDepth red x Depth scale then moves the surface and that blood towards the camera together. With no Surface input the flat wall sits one spacing behind the nozzle (or the Source alpha's centre). New nodes start with it on. Off (and in scripts saved before it existed): Surface Z is the surface's (or the wall's) base depth, as in older versions.

Default: on

Surface XSlidersurfaceX

Built-in collider center.

Default: 0

Surface YSlidersurfaceY

Built-in collider center.

Default: 0

Surface ZSlidersurfaceZ

Collider center, or with Alpha + depth input and Surface at source depth off the base Z of the alpha/depth surface (or of the wall when nothing is connected).

Default: -0.7

Surface radiusSlidersurfaceRadius

Sphere/capsule radius.

Default: 0.7

Surface lengthSlidersurfaceHeight

Length of the capsule's straight central section.

Default: 1.5

Depth scaleSliderdepthScale

SurfaceDepth red values multiplied by this world distance move the surface towards the camera from its base (Source depth with Surface at source depth, where the blood born on it moves with it; else Surface Z). Black is the base plane. SurfaceDepth without a Surface alpha: the relief covers the whole frame. Neither connected: a flat wall, and this is not used.

Default: 1

Collider OBJFilemeshFile

A static, triangulated OBJ collider in the same world coordinates as the simulation, for Collision surface > OBJ mesh. Textures and materials are ignored.

Default: empty

Noise8 controls

Turbulence inside the simulation, and post noise on the finished particles.

Turbulence (simulated)

TurbulenceSliderturbulence

Strength of a smooth swirling force (divergence-free curl noise) in world units/s^2. Part of the simulation: it re-simulates and is cached. 0 is off.

Default: 50

Turbulence sizeSliderturbulenceSize

World-space size of the turbulent swirls.

Default: 0.2

Turbulence evolutionSliderturbulenceEvolution

How quickly the turbulence pattern changes, in pattern changes per second. 0 keeps a fixed swirl field.

Default: 2

Turbulence seedSliderturbulenceSeed

The slider is a convenient display range. Type higher values directly; available memory and the SDK integer representation are the remaining limits.

Picks another turbulence pattern.

Default: 1

Post-sim noise (no re-simulation)

Post noiseSliderpostNoise

Moves the finished particles by smooth curl noise of this world-space amplitude. Applied after the simulation and after Read cache: never re-simulates or changes the cache. 0 is off.

Default: 0

Post noise sizeSliderpostNoiseSize

World-space size of the post-simulation noise pattern.

Default: 0.15

Post noise evolutionSliderpostNoiseEvolution

How quickly the post-simulation noise changes, per second. 0 freezes the pattern in space.

Default: 1

Post noise seedSliderpostNoiseSeed

The slider is a convenient display range. Type higher values directly; available memory and the SDK integer representation are the remaining limits.

Picks another post-noise pattern.

Default: 1

View8 controls

Reference frame and distance for a connected camera, the built-in camera, and the point preview.

Camera

Reference frameSliderreferenceFrame

Frame used to place the source and alpha/depth surface in world space.

Default: 1

Camera distanceSlidercameraDistance

Reference image plane distance from the tracked camera.

Default: 10

Built-in camera

Orbit YSliderorbitY

Built-in camera horizontal orbit.

Default: 0

Orbit XSliderorbitX

Built-in camera vertical orbit.

Default: 0

ZoomSliderzoom

Built-in lens zoom. Render only.

Default: 1

Camera heightSlidercameraHeight

Height of the built-in camera (and of the point it orbits) above Nuke's ground plane. New nodes start at 2.2 so the floor at 0 sits low in the frame, as before. Not used with a Camera input.

Default: 2.2

Point sizeSliderpointSize

Size of the dots in the Sim's own point preview, in pixels. Display only.

Default: 1.5

Create connected render nodeButtoncreateRenderer

Adds a Blood Render 3D node connected to this Sim: a simpler liquid render straight from the particles, with a key light and no mesh, skylight, shadows or OBJ export. For the full look, use ANR Blood Mesh 3D.

Cache5 controls

Cache folder, Generate Autofill, building the cache and playing it back.

Generate AutofillButtonanrCacheAutoFill

Create a fresh node-type/footage_letter_4digits subfolder on every click, then stop. Previous caches are kept.

Fills Cache folder with a new folder named after the node type and the footage, inside the folder you typed there, or else next to the saved script (or next to the footage, if you chose that under ANR > Cache Folders > Location). Each click makes a new folder and keeps the old ones; it does not build anything.

Cache folderFilecacheFolder

Required for Build / rebuild cache. Each build writes a new cache_ folder here; the previous one stays until you delete it. Use a local NVMe folder.

Default: empty

Last frameSlidercacheLast

The cache runs from the Start frame to this frame.

Default: 100

Read cacheCheckboxcacheOnly

Plays the active particle cache and never simulates or overwrites it. Saved with the script. Turn off for a live simulation; Build / rebuild cache applies simulation edits.

Default: off

Build / rebuild cacheButtonbuildCache

Simulates from the Start frame to Last frame with a progress bar and writes every frame into a new folder inside Cache folder, at full resolution. On success Read cache turns on and the engine stops; Cancel or a failure keeps the previous cache.

Tips

  • View the Sim while you tune the motion: the point preview is fast. Switch the Viewer to Blood Mesh 3D to judge the liquid.
  • Refresh particle count shows the live particle count and the actual particle spacing of the last finished frame.
  • For blood running down a neck or an arm, start from Surface flow, connect a matte of the body part to Surface and set Collision surface to Alpha + depth input. Surface adhesion makes the blood cling, Surface friction slows its run and Viscosity thickens it.
  • Alpha + depth input with nothing connected is an invisible flat wall just behind the source: aim the spray at it (a negative Direction Z) for a splat that runs down the wall.
  • Post noise adds wobble to the finished particles without re-simulating and works on a cache; Turbulence swirls the liquid inside the simulation and needs a rebuild.
  • Tick Shadows on floor and surfaces to let Blood Mesh 3D darken the floor and the collision surface under the blood. The shadow is in the Mesh's alpha, so a Merge over darkens the plate.
  • For a scene in other units, set Scene scale (cm per unit) (1 for centimetres, 100 for metres) instead of changing speeds and sizes by hand; placement stays in your scene's units.
  • Animate Time scale for a speed ramp: motion blur downstream keeps following the motion as it plays.
  • Create 3D source handle puts an Axis at the nozzle and connects it: press Tab in the Viewer and drag the Axis, or snap it to tracked points, to place the blood in your 3D scene.
  • After moving a project, point Cache folder to where the cache now is: the node finds its build there.

Good to know

  • Needs an NVIDIA GPU.
  • Cache folder has no default: nothing is written until you choose one, and it must be a full path. Each build writes a new folder there and keeps the earlier ones until you delete them.
  • A live simulation runs forward from the Start frame: going back to an earlier frame simulates again from the start. Build a cache to scrub, and to reopen the script without starting the engine.
  • Read cache plays the saved particles only: simulation edits apply after Build / rebuild cache, and the Cache status says so. The camera, Post noise, Point size and the shadows still work on a cache. Before the cached range there is no blood; after it the last frame holds. A cache plays only at the script format it was built at.
  • Connect Blood Mesh 3D and Blood Mist 3D directly to the Sim (Dots are fine). A grade, reformat or crop in between breaks the particle data.
  • The Camera input takes a classic perspective camera; orthographic cameras and window translate, scale or roll are not supported.
  • Bullet Time works live and on a cache, but not while a cache is being built. When it turns off, the blood shows the current frame again: the frozen frames are skipped, not added.
  • An engine nobody is viewing frees its GPU memory by itself after about 10 minutes, or after a minute when the GPU is nearly full. Viewed again, a cache plays at once; a live simulation starts again from the Start frame.

Something unclear or missing? Write to [email protected].