ANR Tools

ANR Blood Sim 3D

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

Overview

Blood Sim 3D is a native 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 stick to a surface, run down it and leave a wet trail behind. Four presets start you off: Gun hit, Blood fountain, Surface flow and Arterial spurt.

The Sim shows a fast point preview in the Viewer and carries the 3D particle data under the frame for the render nodes downstream. ANR Blood Mesh 3D turns the particles into a lit, wet liquid mesh (including the wet trail and contact shadows), 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.

With the Sim's panel open, use the yellow emission arrow directly in the Viewer: drag the centre cross to place Source XY, drag the arrow tip to aim the spray and set Launch speed, or drag the red, green and blue rings to rotate around world X, Y and Z. Connect a tracked camera to Camera so Source XY sits on the wound at the Reference frame and stays locked in world space while the camera moves, or click Create 3D source handle to place and aim the nozzle with a 3D Axis.

For blood running over a body or wall, connect a roto or matte to Surface: with Stick to surface on, blood clings to the matte, slides down along its shape slowed by Slide drag, drips off where the matte ends, and leaves a Wet trail that Blood Mesh 3D renders as a thin glistening film.

Time scale slows the simulation down or speeds it up (animate it for speed ramps), and Scene scale (cm per unit) sets your scene units. Build a cache on the Cache tab to scrub freely, reopen the script with the result, and render on a farm. Bullet Time freezes the blood at a chosen frame while the camera keeps moving.

Inputs

SourceSurfaceSurfaceDepthCameraBlood 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. Surfaceoptional

    Optional. A matte of the surface the blood hits or runs down (a neck, an arm, a wall), used when Collision surface is Alpha + depth input. With no SurfaceDepth, Stick to surface lets blood cling to this matte, slide down inside its shape and drip off its edge.

  3. 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.

  4. 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.

Output. A fast point preview of the particles seen through the camera, with the particle data carried under the frame for Blood Mesh 3D, Blood Mist 3D and Blood Render 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. With the panel open, drag the yellow handle in the Viewer: the centre cross moves Source XY onto the wound, the arrow tip aims the spray and sets Launch speed (longer is faster), and the RGB rings rotate it in 3D. To emit from a shape instead, connect a matte to Source.
  4. Click Start / stop blood engine and play forward from the Start frame.
  5. On the View tab (or with the Sim selected in the Node Graph), click Create Blood Mesh 3D and view the Mesh node to judge the wet liquid. Click Create Blood Mist 3D for fine impact 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

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

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

All controls

Setup10 controls

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

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.

statusStatusstatus

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

Bullet Time

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

Timing and 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 with Viewer arrow, Source alpha or linked 3D 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

Screen position of the point nozzle in pixels at the Reference frame (or in the built-in camera view). Drag the centre cross of the yellow Viewer handle to place it interactively. Ignored when emitting from Source alpha or when a 3D source Axis is linked.

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 links it: 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 (its panel open) to place the blood in your 3D scene, or snap it to tracked points. With an Axis selected when you click, that Axis is linked instead. Delete the Axis 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

Collision19 controls

Wetting, the floor, the collision surface (sphere, capsule, matte and depth, or OBJ), Stick and slide on a Surface matte, and Wet trail.

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 cast shadows onto 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

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

Stick and slide (Surface alpha, no SurfaceDepth)

Stick to surfaceCheckboxstickToSurface

Alpha + depth input with a Surface alpha (a roto) and no SurfaceDepth: blood that reaches the surface or is born on it sticks to it and runs down and along it, slowed by Slide drag, following the alpha's shape, and drips or falls off where it leaves the alpha. Blood thrown hard away from the surface still flies. New nodes start with it on; off (and in scripts saved before it): the blood only collides with the surface. Re-simulates.

Default: on

Stick strengthSliderstickStrength

How firmly the surface holds blood that reaches it or is born on it: 1 pulls it onto the surface within a fraction of a frame and keeps anything moving away slower than 30 cm/s; higher holds faster throws too. 0 lets go. Re-simulates.

Default: 1

Slide dragSliderslideDrag

How slowly held blood runs down and along the surface, per second: it runs at about gravity / Slide drag (40: about 25 cm/s at the presets' scale; 20 twice as fast, 80 half). Blood that lands moving still smears along the surface first. 0 slides freely. Re-simulates.

Default: 40

Capture distanceSliderstickCapture

How far in front of the surface blood is caught, in particle spacings (about 1.5-2.5 mm each at the presets' scale). Blood further out falls or flies free until it reaches the surface. Re-simulates.

Default: 4

Wet trail

Wet trailCheckboxwetTrail

Alpha + depth input (a roto, a SurfaceDepth relief or the wall): blood that touches the surface leaves a thin wet film along its path, like blood running down a wall. Blood Mesh 3D draws it (Look tab, Wet trail). The film never changes the simulation. New nodes start with it on; off (and in scripts saved before it): no trail. Re-simulates.

Default: on

Trail widthSlidertrailWidth

How wide a streak each drop leaves where it touches the surface, in particle spacings (1: about the drop's own width). A running blob leaves a streak as wide as itself. Re-simulates.

Default: 1

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

View10 controls

Reference frame and distance for a connected camera, the built-in camera, point preview size, and buttons to create Blood Mesh 3D, Blood Mist 3D or Blood Render 3D.

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

Display

Point sizeSliderpointSize

Size of the preview points in the Viewer, in pixels. Display only: the particle data and the nodes downstream do not change.

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

Default: 1.5

Connect

Create Blood Mesh 3DButtoncreateMesh

Creates ANR Blood Mesh 3D connected to this node: the liquid surface, lit and motion blurred.

Creates an ANR Blood Mesh 3D node connected to this Sim to mesh and shade the wet liquid surface, wet trail and shadows.

Create Blood Mist 3DButtoncreateMist

Creates ANR Blood Mist 3D following this node's particles (spawned from fast liquid).

Creates an ANR Blood Mist 3D node connected to this Sim and its camera to add fine aerosol spray shed from fast liquid.

Create connected render nodeButtoncreateRenderer

Creates ANR Blood Render 3D (the ray-marched liquid surface) connected to this node.

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

Cache6 controls

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

Cache

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 Start frame to Last frame into a new cache_ folder in Cache folder, then turns Read cache on. Cancel keeps the previous cache.

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.

CacheStatuscacheStatus

Shows the current cache state: whether a cache is active, its frame range and folder, or whether parameter changes need Build / rebuild cache.

Tips

  • View the Sim while you tune the motion: the point preview is fast and shows the interactive Viewer arrow. Switch the Viewer to Blood Mesh 3D to judge the liquid surface, wet trail and shadows.
  • Refresh particle count shows the live particle count and the actual particle spacing of the last finished frame.
  • For blood running down a face, neck or arm with just a 2D roto, start from Surface flow and connect the roto to Surface (leave SurfaceDepth empty). Keep Stick to surface and Wet trail on: Stick strength and Capture distance hold the blood to the matte, Slide drag controls how fast it runs down, and Trail width sets the width of the wet film drawn by Blood Mesh 3D.
  • With Surface at source depth on (the default for new nodes), an Alpha + depth input surface sits right behind the nozzle or Source alpha so blood touches it immediately as it spawns.
  • 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 and leaves a wet trail.
  • 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.
  • 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 makes a 3D Axis at the nozzle and links it (or links an Axis you already have selected): press Tab in the Viewer and drag the Axis, or snap it to tracked points, to place the blood in your 3D scene. Delete the Axis to return to Source XY.
  • 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 (including Stick to surface and Wet trail) apply after Build / rebuild cache, and the Cache status says so. The camera, Post noise and Point size 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 strips the particle data carried under the frame.
  • 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].