
ANR Muzzle Flash
Muzzle flashes and gun smoke from pistols to tank cannons, and bullet hits with dust and sparks, simulated and rendered on the GPU.
- Simulations
- Simulations pack
- 1 input
- 131 controls
Overview
Muzzle Flash simulates the burst of hot gas and smoke from a gun barrel in 3D. Each round stamps a torn cone of burning gas, optional side jets for muzzle brakes and flash hiders, and a smoke puff; the fluid then carries, burns and clears it. Presets cover a Pistol, Rifle, Assault Rifle (Flash Hider), Machine Gun, Shotgun, Sniper (Muzzle Brake), Suppressed, Tank Cannon and Artillery (Muzzle Brake), plus bullet hits: Wall Hit (Dust), Wall Hit (Spark And Dust) and Ground Hit (Dirt).
You place the muzzle in the picture with a Viewer handle (move, depth, rotate, aim and size), or link Position to a tracker. Rounds fire automatically at a rate, on a list of frames, or while an animated Trigger is on, and Shot Variation makes every round different. Placing or resizing the flash does not re-simulate it.
Emit chooses flash and smoke, the flash alone or smoke alone, and Output gives everything together, or the flash, the smoke or the sparks on their own. The Sparks tab throws glowing sparks and unlit grit, for bullet hits or burning powder, without re-simulating.
The simulation runs forward from the first round. 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 flash, smoke and sparks at a frame while their position, rotation, size and look keep following the timeline.
Inputs
- Sourceoptional
Optional. The plate. It is used only by Composite Over Source, which puts the result over it; otherwise the node outputs the element alone and needs no input.
Output. The flash and smoke element, premultiplied, at the project format (larger with Overscan (%)). Output can give the flash alone (light only, no alpha, for a Plus merge), the smoke alone or the sparks alone; Composite Over Source puts the result over the plate.
Quick start
- Add ANR Muzzle Flash. With the plate selected, it connects to Source.
- With the node's panel open, drag the centre of the Viewer handle onto the tip of the barrel and point the yellow arrow along the barrel; drag the corner square to set Size. For a moving gun, link Position to a tracker.
- On the Shots tab, choose a Preset for the weapon, or a wall or ground hit.
- Set First Shot Frame, Rounds and Frames Between Shots, or use Frame List or Trigger Knob in Fire Mode.
- Click Fire Engine and play forward from before the first round.
- Merge the result over the plate, or tick Composite Over Source. Add a glow after the node: the flash is brighter than 1 by design.
- When the look is right, choose a Cache Folder (or click Generate Autofill) and click Build / Rebuild Cache. Read Cache turns on and the engine stops.
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.
Bullet Time, the engine, what each round emits, the preset, and when rounds fire.
Position, depth, rotation and size of the muzzle, how smoke follows a moving gun, the solid surface for hits, and the Viewer handle.
Shape, side jets, heat, powder and burning of the flash.
The smoke puff, barrel smoke, rise and dissipation.
Glowing sparks and unlit grit thrown by each round, with no re-simulation.
Turbulence, edge breakup, air drag, wind, time scale and substeps.
The output pass, compositing over Source, flash colour and brightness, smoke colour and density.
How the flash, the ambient light and the key light the smoke, and render detail.
Simulation detail, render quality and resolution, overscan, start frame and GPU scheduling.
Cache folder, Generate Autofill, building the cache and playing it back.
No control matches.
All controls
Shots17 controls
Bullet Time, the engine, what each round emits, the preset, and when rounds fire.
- Bullet TimeCheckbox
bulletTime Freezes the flash, smoke and sparks at the Freeze at frame. Position, rotation, size and the look keep following the timeline. 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.
- Freeze AtSlider
bulletFrame The simulation frame Bullet Time holds. Before it the simulation plays normally; from it on it stays still. Animatable.
- Fire EngineButton
fireEngine Start the GPU engine. Click again to stop it and free GPU memory. New nodes start stopped.
- StatusStatus
backendInfo What the engine is doing: stopped, loading, how many rounds have fired, the frame, and how many frames this picture had to simulate, or the cache frame it plays.
- EmitMenu
emit What each round produces. Flash Only renders pure light with no smoke at all; Smoke Only is a gun that smokes without a visible flash.
- PresetMenu
weapon Sets the flash, smoke, smoke color and rate controls for a kind of weapon, or for a bullet hitting a wall or the ground. For a hit, put the handle on the surface and point the yellow arrow away from it. Size, position and rotation are left alone. Every control stays editable afterwards.
Picking a preset also clears the animation of the values it sets. Custom changes nothing.
- Fire ModeMenu
fireMode Automatic Fire: a first frame, a number of rounds and a rate. Frame List: type the frames. Trigger Knob: animate Trigger, and the weapon fires while it is on.
- First Shot FrameSlider
firstShot Frame of the first round. The flash is visible on this frame.
- RoundsSlider
shotCount Number of rounds in Automatic Fire.
- Frames Between ShotsSlider
shotInterval Rate of fire as frames between rounds; fractions are allowed. At 24 fps: 600 rounds a minute = 2.4, 900 = 1.6, a pistol double tap = 5, a tank = one round.
- Timing VariationSlider
timingJitter Random early / late firing of each round, as a fraction of the interval. 0 is a perfectly regular rate.
- Shot FramesText
shotFrames Used when Fire Mode is Frame List. Frames separated by spaces or commas; fractions are allowed. 12-40x2.4 fires every 2.4 frames from 12 to 40.
- TriggerSlider
trigger Used when Fire Mode is Trigger Knob. Animate it: a round fires when it rises above 0.5, and while it stays there the weapon keeps firing at Frames Between Shots.
- Shot VariationSlider
shotVariation How different each round is from the last. It changes the brightness, length, cone angle, number of streaks, the outline, the barrel line, extra forked tongues, and which side jets light and how long they are. 0 repeats one flash; 1 is a real burst where no two frames match; 2 is wild.
- Flash ChanceSlider
flashChance Fraction of rounds that show a flash. A camera shutter misses many real flashes; 0.7 looks like film. Rounds without a flash still smoke.
- Hit ScatterSlider
hitScatter For bullet hits: each round lands at a different spot around Position, across the surface the handle points away from. In multiples of Size; 0 keeps every round on one spot.
- SeedSlider
seed A different seed gives different flashes and different smoke.
Muzzle10 controls
Position, depth, rotation and size of the muzzle, how smoke follows a moving gun, the solid surface for hits, and the Viewer handle.
- PositionPosition
position Tip of the barrel in the picture. Drag the center of the Viewer handle, or link it to a tracker.
- DepthSlider
depth Distance of the muzzle toward the camera: 0 is the picture plane, positive is closer (larger), negative is farther.
- Rotate XSlider
rotateX Rolls the barrel about its own line, in degrees. It turns the side jets (brake ports, flash hider prongs) around the barrel. Drag the red ring in the Viewer.
- Rotate YSlider
rotateY Swings the barrel out of the picture, in degrees: negative toward the camera, positive away from it. Drag the green ring in the Viewer.
- Rotate ZSlider
rotateZ Turns the barrel in the picture, in degrees: 0 points right, 90 up, 180 left. Drag the blue ring in the Viewer.
- SizeSlider
size Length of a standard flash as a fraction of the longest picture side. Drag the corner square of the Viewer handle. Changing it does not re-simulate.
- SmokeMenu
smokeSpace Stays In Place: smoke is left behind in the picture when the muzzle moves, as real smoke hangs in the air. Follows The Muzzle: everything is carried with the muzzle, for a shot where the whole frame is tracked to the gun.
- Follow Muzzle MotionSlider
inheritMotion How much of a moving muzzle's speed is given to the gas. Used when Smoke Stays In Place.
- Solid Surface BehindCheckbox
surface For bullet hits: the handle sits on a wall or the ground and the yellow arrow points away from it. Dust and particles cannot pass back through that surface. Off for a muzzle in open air.
- Show Viewer HandleCheckbox
showGuide Handle at the muzzle in the Viewer. Center square: move. Red / green arrows: move sideways / up and down. Blue arrow: depth. Red, green and blue rings: Rotate X, Y and Z. Yellow arrow: the barrel; drag its tip to aim freely. Corner square: size. The faint cone is the real flash footprint. Each part lights up under the pointer; Escape cancels a drag. Never rendered.
Flash20 controls
Shape, side jets, heat, powder and burning of the flash.
- LengthSlider
flashLength Length of the forward flash, relative to Size.
- Cone AngleSlider
flashSpread Full opening angle of the forward flash in degrees. A rifle is narrow, a shotgun or short barrel is wide.
- Forward JetSlider
flashForward Amount of gas leaving straight ahead. 0 leaves only the core and the side jets, as with some muzzle brakes.
- Core SizeSlider
coreSize Bright ball of gas at the muzzle, relative to Size.
- StreaksSlider
streaks Number of fingers the flash is torn into around the barrel.
- IrregularitySlider
irregularity How torn and uneven the flash is. 0 is a clean cone.
- Side JetsSlider
sideJets Jets leaving sideways: 0 for a plain barrel, 2 for a muzzle brake, 3 to 5 for the star of a flash hider.
- Side Jet AngleSlider
sideAngle Angle between the side jets and the barrel, in degrees. 90 is a muzzle brake venting sideways, 50 is a flash hider star, above 90 vents backward.
- Side Jet LengthSlider
sideLength Length of the side jets, relative to the forward flash.
- Side Jet Cone AngleSlider
sideSpread Opening angle of each side jet, in degrees.
- Side Jet RollSlider
sideRoll Rotates the ports around the barrel, in degrees, on top of Rotate X. 0 puts two ports level with the ground; 90 puts them up and down.
- Roll VariationSlider
rollRandom Random rotation of the side jets on each round.
- Flash DurationSlider
flashDuration Frames of gas emission per round. Small arms are one frame or less; a cannon keeps venting for two or three.
- Blast SpeedSlider
blastSpeed Speed of the gas at the muzzle, in flash lengths per frame.
- HeatSlider
heat Temperature of the gas. Hotter is whiter and brighter, and rises faster.
- Unburnt PowderSlider
fuel Fuel thrown out with the gas. It keeps burning in front of the muzzle and makes the rolling fireball of big guns. Keep it low for small arms.
- Flash FadeSlider
cooling How fast the flash cools. High values kill it in one frame; low values leave a lingering fireball.
- Burn RateSlider
burnRate How fast unburnt powder burns.
- Flame LifetimeSlider
flameLifetime Decay time of burning gas, in frames.
- Burn ExpansionSlider
expansion Outward push of burning gas. Raise it for a blooming fireball.
Smoke12 controls
The smoke puff, barrel smoke, rise and dissipation.
- Smoke AmountSlider
smokeAmount Smoke blown out with each round.
- Puff LengthSlider
smokeLength How far the puff is driven out before the air takes over, relative to Size. It reaches this over Puff Duration, fast at first.
- Puff Cone AngleSlider
smokeSpread Opening angle of the smoke puff, in degrees.
- Puff DurationSlider
smokeDuration Frames the puff is driven for after each round. Short is a snap that stalls close by; longer carries it further and thicker.
- Puff SpeedSlider
smokeSpeed Speed of the smoke at the muzzle, in flash lengths per frame.
- Side Jet SmokeSlider
sideSmoke Smoke leaving through the brake ports, relative to the forward puff.
- Barrel SmokeSlider
wispAmount Thin smoke that keeps curling out of the barrel after the round. 0 turns it off.
- Barrel Smoke DurationSlider
wispDuration Frames the barrel keeps smoking after each round.
- Barrel Smoke SpeedSlider
wispSpeed Speed of the barrel smoke, in flash lengths per frame.
- Smoke RiseSlider
smokeRise Lift of the smoke itself. Positive drifts up, negative sinks.
- Heat LiftSlider
buoyancy Lift from hot gas.
- Smoke DissipationSlider
dissipation Fraction of the smoke lost each frame. 0.03 halves it in about a second; 0.01 hangs for several seconds; 0 never clears.
Sparks13 controls
Glowing sparks and unlit grit thrown by each round, with no re-simulation.
- Sparks Per RoundSlider
debrisAmount Sparks thrown by each round: glowing sparks and lit grit (Glowing sets the mix). 0 turns them off. They are not part of the fluid: changing anything on this tab does not re-simulate.
- Spark SpeedSlider
debrisSpeed Speed of the fastest sparks as they leave, in flash lengths per frame. Most are slower.
- Spark Cone AngleSlider
debrisSpread Full opening angle of the spray around the direction the handle points, in degrees. 180 sprays across the whole surface.
- Spark SizeSlider
debrisSize Size of the largest sparks, in percent of Size. Most are smaller.
- Spark LifetimeSlider
debrisLife Frames the longest lived sparks last before fading.
- Spark GravitySlider
debrisGravity Pull downward. 1 is about right when Size is the size of a real hit; 0 floats; negative rises.
- Spark Air DragSlider
debrisDrag How fast the air stops the sparks. Small ones are always stopped sooner than big ones.
- Spark Motion BlurSlider
debrisBlur Shutter in frames: fast sparks become streaks. 0 draws dots.
- Unlit Spark OpacitySlider
debrisOpacity Opacity of the sparks that do not glow (lit grit).
- Unlit Spark ColorColour
debrisColor Color of the sparks that do not glow: the wall or ground they came from, a little darker than its dust.
- GlowingSlider
sparkAmount Fraction of the sparks that glow (a hit on metal or stone, or burning powder from a muzzle); the rest are unlit grit lit by the scene. Glowing sparks add light and have no alpha.
- Glow BrightnessSlider
sparkBrightness Brightness of the glowing sparks. They cool and dim as they fly.
- Glow ColorColour
sparkColor Color of a glowing spark as it cools. Fresh sparks are whiter.
Motion13 controls
Turbulence, edge breakup, air drag, wind, time scale and substeps.
- TurbulenceSlider
turbulence Eddies that roll and tear the gas.
- Eddy SizeSlider
turbulenceSize Size of the eddies as a percentage of the flash length.
- Edge BreakupSlider
disturbance Fine motion at the edges of the smoke.
- Edge SizeSlider
disturbanceSize Size of the edge breakup as a percentage of the flash length.
- Flame BreakupSlider
shredding Fine tearing limited to the burning gas.
- Air DragSlider
drag How fast the gas is stopped by the air. Muzzle gas leaves very fast and stops within a short distance.
- Wind SpeedSlider
windSpeed Steady air speed carrying the smoke away, in percent of the simulation box per frame. 0 is still air.
- Wind Direction XSlider
windX Positive is right.
- Wind Direction YSlider
windY Positive is up.
- Wind Direction ZSlider
windZ Positive is toward the camera.
- Wind GustsSlider
windGust Variation of the wind speed. 0 is steady.
- Time ScaleSlider
timeScale Simulation time per frame. 1 is real time; 0.25 is four times slow motion. Shot frames stay where they are.
- SubstepsSlider
substeps Simulation steps per frame. Fast gas needs more; a quickly moving muzzle raises it automatically.
Look15 controls
The output pass, compositing over Source, flash colour and brightness, smoke colour and density.
- OutputMenu
output Beauty is everything together. Flash is the light alone (with the glowing sparks), no alpha, for a Plus merge. Smoke is the smoke alone, lit by the flash. Sparks is the sparks alone. Ignored while AOVs is on.
- Composite Over SourceCheckbox
overSource Puts the result over the picture connected to Source. Off outputs the element alone, premultiplied.
- Flash BrightnessSlider
fireIntensity Brightness of the burning gas. Values above 1 in the picture are expected; add a Glow after the node.
- Flash ColorMenu
fireColorMode Blackbody uses the cool and hot temperatures. Custom Gradient uses the three colors below.
- Cool Color (K)Slider
kelvinMin Blackbody color of the coolest visible gas.
- Hot Color (K)Slider
kelvinMax Blackbody color of the hottest gas.
- Temperature RangeSlider
temperatureRange Simulation temperature shown as the hottest color. Lower makes more of the flash white-hot. The gas never gets hotter than 1.
- Flash SaturationSlider
fireSaturation 0 is white, 1 keeps the chosen colors.
- Color BiasSlider
fireColorBias Above 1 favors the cool color, below 1 the hot color.
- Custom CoolColour
fireCool Coolest gas in Custom Gradient.
- Custom MidColour
fireMid Middle of the Custom Gradient.
- Custom HotColour
fireHot Hottest gas in Custom Gradient.
- Smoke ColorColour
smokeColor Color of the smoke. Gun smoke is a light blue-grey; a tank kicks up brown dust.
- Smoke DensitySlider
smokeDensity Thickness of the smoke in the picture. Does not re-simulate.
- AbsorptionSlider
opacity Light absorbed along paths through the smoke.
Lighting17 controls
How the flash, the ambient light and the key light the smoke, and render detail.
- Flash Lights SmokeSlider
fireLight Light from the flash carried through the smoke around it.
- Light SpreadSlider
fireLightRadius How far the flash light spreads through the smoke.
- Ambient LightSlider
ambient Even light on the smoke from everywhere.
- Key LightSlider
keyLight Directional light on the smoke, with self shadowing.
- Key Direction XSlider
lightX Direction toward the light.
- Key Direction YSlider
lightY Direction toward the light.
- Key Direction ZSlider
lightZ Direction toward the light.
- Ambient OcclusionSlider
ambientOcclusion Darkening inside thick smoke.
- Light PenetrationSlider
scattering How deep light bleeds into the smoke.
- Forward ScatterSlider
anisotropy Positive brightens smoke lit from behind.
- Shadow SamplesSlider
shadowSteps Samples through the smoke toward the key light.
- Render DetailMenu
detailMode Adds fine procedural detail while rendering, with finer ray sampling. Does not re-simulate.
- Detail StrengthSlider
detailAmount Fine procedural detail added while rendering. Does not re-simulate.
- Detail SizeSlider
detailSize Size of the render detail in voxels.
- Extra SmoothingSlider
filterWidth Extra volume smoothing in voxels.
- Ray StepSlider
rayStep Distance between ray samples in voxels. Lower is finer and slower.
- Volume FilterMenu
volumeFilter Smooth Cubic softens voxel facets; Linear keeps more voxel detail.
Engine7 controls
Simulation detail, render quality and resolution, overscan, start frame and GPU scheduling.
- Simulation DetailSlider
resolution Voxels across the simulation box, 24 to 512. The standard flash covers about a third of it. Higher is sharper and slower; the engine coarsens automatically when smoke spreads far.
- Render QualityMenu
renderQuality Preview renders a small picture with simple lighting for fast feedback. Render is full quality. Neither re-simulates.
- Render ResolutionMenu
renderResolution Render at full, half or quarter size and scale up. Does not re-simulate.
- Overscan (%)Slider
overscan Renders this much extra picture outside the frame on every side, as a percentage of the frame, and passes it down as a larger bounding box. Use it when the element is moved after this node (Transform, CornerPin, match-move, camera shake, lens distortion): smoke that left the frame is still there when it is brought back in. 0 renders the frame only. The simulation itself is never cut at the frame edge; this only widens what is rendered, so it costs render time, not simulation time.
- Start FrameSlider
startFrame Nothing fires before this frame. The simulation itself starts one frame before the first round.
- GPU SchedulingMenu
gpuScheduling Responsive leaves GPU time for the desktop. Maximum Speed removes the pauses.
- Reset SimulationButton
resetSim Clears the simulation and frees GPU memory. It starts again on the next render.
Cache7 controls
Cache folder, Generate Autofill, building the cache and playing it back.
- Generate AutofillButton
anrCacheAutoFill Create a new node-type/footage_letter_4digits folder on every click, then stop. Previous caches are kept. Enter a folder to choose a custom base.
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 FolderFile
cacheFolder Required for Build / Rebuild Cache: nothing is written anywhere until it is set. Each build writes a new folder inside it (cache_ followed by the date and an id), one .anrvol file per frame; older builds are never deleted. Use a fast local drive.
- Cache To FrameSlider
cacheLast Last frame the build simulates and saves. 0 (or any frame not after Start Frame) uses the end of the timeline, and that frame is written here when you build. The cache starts on the first round's frame.
- After Last FrameMenu
cacheAfter What plays after the last cached frame: that frame held still (its sparks too), or nothing.
- Build / Rebuild CacheButton
buildCache Simulates from the frame before the first round to Cache To Frame on the GPU, with a progress bar, and saves every frame into a new folder inside Cache Folder. When it finishes, Read Cache turns on and the engine stops (its GPU memory is freed). Cancel, or a failure, deletes only the new folder: the cache being read stays.
- Read CacheCheckbox
cacheOnly Plays the saved cache: no simulation, no Fire Engine, and it is saved with the script, so a reopened script just plays. Live on a cache: Position, Depth, Size and Rotate (which way is down inside the simulation is baked in 22.5 degree steps at build time, so a large turn may need a rebuild), the Look, Lighting and Sparks tabs, Output, AOVs, Overscan and render settings. The Shots, Flash, Smoke and Motion tabs, Emit, Smoke (Stays In Place / Follows), Solid Surface Behind, Follow Muzzle Motion, Simulation Detail, Start Frame, and an animated Position with Stays In Place need Build / Rebuild Cache: the status line says so after such an edit. Off: back to the live engine.
- Cache StatusStatus
cacheStatus The cached range, its size and build date, what plays on the current frame, and whether settings changed since the build.
Tips
- For a bullet hit, put the handle on the surface and point the yellow arrow away from it. The hit presets turn on Solid Surface Behind, so dust cannot pass back through the surface; Hit Scatter spreads a burst of hits across it.
- Flash Chance below 1 drops the flash on some rounds, as a camera shutter does; 0.7 looks like film. Those rounds still smoke.
- Frames Between Shots sets the rate of fire: at 24 fps, 600 rounds a minute is 2.4 and 900 is 1.6. Fractions are allowed.
- Smoke on Stays In Place leaves smoke hanging in the air when the gun moves; Follows The Muzzle carries everything with it, for a plate tracked to the gun.
- Set Render Quality to Preview, or Render Resolution to Half, for fast feedback: neither re-simulates.
- Raise Overscan (%) when the element is moved after the node (camera shake, a match-move, lens distortion), so smoke that left the frame comes back.
- Smoke Dissipation sets how long smoke hangs: 0.03 halves it in about a second, 0.01 keeps it for several.
- For a big gun's rolling fireball, raise Unburnt Powder, lower Flash Fade and set Flash Duration to 2 or 3.
- To light the gun and the actor with the flash, render Output > Flash and use it as the Light footage of ANR Interactive Light.
- Time Scale on the Motion tab gives slow motion (0.25 is four times slower) while the shot frames stay where they are.
Good to know
- Runs on the GPU. Two Muzzle Flash engines can run at the same time, and all nodes playing a cache share one of them: stop Fire Engine on another node, or cache it, to free an engine. One cache builds at a time.
- Cache Folder has no default: nothing is written until you choose one, and it must be a full path. Each build makes a new folder inside it; older builds are never deleted.
- A live simulation runs forward from the frame before the first round. Going back in time, or changing anything that already happened, simulates again from the first round. Placing and sizing never re-simulate; an animated Position with Stays In Place does when its keys change, and so can a large turn.
- On Read Cache, Position, Depth, Size and the rotations, the Look, Lighting and Sparks tabs, Output, Overscan (%) and the render settings stay live. Edits on the Shots, Flash, Smoke and Motion tabs need Build / Rebuild Cache, and the status line says so.
- With the engine stopped and Read Cache off, the node renders nothing, or only the plate with Composite Over Source.
- There is no Camera input: the muzzle is placed in the picture with Position and Depth.
- Bullet Time works live and on a cache. When it turns off, the simulation 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. Fire Engine stays on: viewed again, the node simulates again from the first round, while a cache plays at once.
Something unclear or missing? Write to [email protected].