Motion SDK

Particles

Seeded particles for sparks, snow, smoke, spray, embers, confetti, trails and streaks.

A node with particles emits seeded, deterministic particles. Presets are tuned looks; every field you set overrides the preset.

Sparks with gravity, smoke, and driving snow drawn as streaks.
{
  "camera": { "position": [0, 1.5, 8], "target": [0, 1, 0], "fov": 45 },
  "lighting": { "rig": "neon_rim" },
  "environment": { "background": { "solid": "#05040a" } },
  "post": { "bloom": 1, "tone_mapping": "agx" },
  "nodes": {
    "sparks": {
      "transform": { "position": [-2.5, 0.5, 0] },
      "particles": {
        "preset": "sparks",
        "count": 300,
        "lifetime": 1.2,
        "speed": 6,
        "size": 0.05,
        "emitter": "point",
        "direction": [0, 1, 0],
        "spread": 40,
        "gravity": [0, -9, 0],
        "glow": 5
      }
    },
    "smoke": {
      "transform": { "position": [0, 0, 0] },
      "particles": { "preset": "smoke", "count": 120 }
    },
    "snow": {
      "transform": { "position": [2.5, 2, 0] },
      "particles": {
        "preset": "snow",
        "count": 600,
        "emitter": { "box": { "size": [3, 4, 3] } },
        "stretch": 0.03,
        "gravity": [0, -3, 0]
      }
    }
  },
  "timeline": { "duration": 4, "loop": "loop" }
}
Sparks with gravity, smoke, and driving snow drawn as streaks. apps/docs/examples/particles.json · render it with motion-sdk render apps/docs/examples/particles.json -t 1 -o particles.png

Presets

spray (white water or runway spray), sparks (streaks, add gravity), smoke, snow (use a big box emitter around the action), embers, sparkles, starfield, bokeh and confetti.

Shape and Motion

  • emitter: point, a sphere, a box, or the surface of a mesh node.
  • direction and spread (half-angle in degrees) aim a cone. Leave them out to emit every way.
  • speed, lifetime, gravity and drag.
  • size, and grow, the size at the end of life: smoke and spray billow, sparks shrink.
  • colors over life, and glow above 1 to bloom.

Streaks and Trails

  • "stretch": 0.03 draws each particle as a streak over that many seconds of its travel: driving snow or rain in headlights, tracer fire. Sparks streak by default; 0 makes them dots.
  • "trail": true leaves particles where they were born, so a moving emitter draws a wake: engine spray, exhaust, dust behind a car. Parent the emitter to the moving node.

Fade a whole system in or out with an opacity track on its node. In a looping timeline, particle lifetimes are fitted so the loop is seamless.

API Reference

Particles

A deterministic (seeded) GPU particle system.

PropertyTypeDefaultDescription
colorsColor[]—Color over lifetime (evenly spaced gradient stops).
countinteger (1 to 100000)500Number of live particles.
direction[x, y, z]—Emit in a cone around this direction (node-local) instead of every way; spread is the cone's half-angle in degrees.
dragnumber (≥ 0)—Air drag per second: particles shoot out and slow down (spray, sparks).
emitterEmitter{"sphere":{"radius":1}}Where particles are born.
glownumber (≥ 0)—Brightness multiplier; above 1 the particles glow through bloom.
gravity[x, y, z][0,0,0]Acceleration on every particle, [x, y, z].
grownumber (≥ 0)—Size multiplier at the end of life (spray and smoke billow, sparks shrink).
lifetimenumber2Particle lifetime in seconds.
presetParticlePreset—Tuned look; explicit fields override it.
seedinteger—Overrides the scene seed for this system.
sizenumber0.03Particle size in world units.
speednumber1Initial speed in units/second.
spreadnumber (0 to 180)—Cone half-angle in degrees around direction.
stretchnumber (0 to 1)—Motion streaks: draw each particle stretched along its velocity over this many seconds of travel (0.05 to 0.1 for rain-like snow, sparks, tracer fire). Sparks streak by default; 0 turns that off.
trailboolean—Leave particles where they were born when the node moves (engine spray, exhaust, snow around a moving camera) instead of carrying them along.

ParticlePreset

ValueDescription
"confetti"
"sparkles"
"embers"
"snow"
"starfield"
"bokeh"
"smoke"
"spray"White water or wheel spray: bursts out fast, billows and fades.
"sparks"Hot sparks: bright, fast, falling and shrinking.

Emitter

Where particles spawn.

ValueDescription
"point"

{"sphere": { … }}Spawn inside a sphere around the node.

PropertyTypeDefaultDescription
radius*numberrequiredSphere radius.

{"box": { … }}Spawn inside a box around the node.

PropertyTypeDefaultDescription
size*[x, y, z]requiredFull box size [x, y, z].

{"surface": { … }}Spawn on the surface of another node's mesh.

PropertyTypeDefaultDescription
node*stringrequiredId of the mesh node whose surface particles spawn on.