Physics

The Physics toolbox simulates things that move by physical rules instead of keyframes. One scene can hold rigid bodies (boxes, balls, static walls), cloth, and water (particle-based liquid), all affecting each other. Triggers act when something happens, such as removing a gate at a set time or releasing a ball when water reaches a height. A run is recorded, so you can read any moment back, export it, or play it in the Active Preview. There are also smoke, ocean, shore and particle effects for realtime use, with flipbook and texture outputs for games.

Use it for visual effects, demonstrations, and checking how things fall, float or flow.

  • Included in: Divooka Explore and Divooka Compute Standard. In Compute, start a document from the Physics Simulation workload, or add the Physics Simulation reference with Add reference (Ctrl+Shift+L).
  • Maturity: Usable · Support: Tier 2 (proposed) · what these mean
  • Open it: node library (Ctrl+Shift+Space) → Physics, or search for a node with Ctrl+Space.
  • Examples and reference: Ctrl+Shift+E → Simulation (28 examples) · node reference

New to graphs? Start with Your first program.

Main ideas

A scene is built step by step. Scene nodes each take a scene description and return a new one with something added, so you can branch and reuse scenes.

Units are real. Positions are in meters with +Z up; masses come from densities in kg/m³. Pine at 450 kg/m³ floats in water; stone sinks.

Simulate, then look. Simulate runs the scene for a time at a frame rate. Select it and open the Active Preview (F6) to watch the run, or read single moments.

Example: a dam break

Open Simulation > Dam Break (Ctrl+Shift+E):

  1. A glass tank 1.6 m long, 0.5 m deep and 0.8 m high, made of four static boxes.
  2. A red gate and a column of water 0.6 m high behind it.
  3. Six 12 cm pine blocks in a pyramid, each a different color, and a stone ball held above the far end.
  4. A trigger takes the gate away at 0.3 seconds. A second trigger lets the ball go when twenty water particles reach the top of the far wall.
  5. Simulate runs three seconds at 30 frames a second.

Run it with F5, select Simulate and press F6. The wave runs down the tank, scatters the blocks and climbs the far wall, and the ball drops into the flood. The console prints when the wave reached the far wall.

To try more: change the gate's time, the blocks' density, or the water's height.

More examples to open

Example What it shows
Swinging Cloth A cloth pinned along one edge, catching on a ball
Floating Crates Bodies floating in water
Realtime Liquid 1 to 4 Liquid for games: jets, floating things, taps and drains
Realtime Smoke 1 to 5 Plumes, fire, flipbooks and volumes
Realtime Ocean 1 and 2 An open sea and textures for a game
Realtime Triggers Things that happen when conditions are met

Tips and limits

  • Runs take time. Water with many particles takes a while to simulate; lower the frame rate or the duration while you set things up.
  • Static bodies are drawn as glass in the preview, so you can see inside a tank.

What is in the toolbox

Category Some of its nodes
Smoke Add Embers, Add Fire, Add Obstacle Box, Add Obstacle Sphere and 28 more
Simulation Session Add Body, Advance, Bodies Mesh, Body Names and 25 more
Scene Add Body, Add Cloth, Add Cloth Mesh, Add Garment and 19 more
Liquid Add Liquid Body, Add Liquid Box, Add Liquid Drain, Add Liquid Sphere and 19 more
Liquid Session Add Liquid Box, Add Liquid Sphere, Advance, Aim Tap and 18 more
Shore Add Shore Body, Add Shore Mound, Add Shore Trigger, Export Shore Meshes and 18 more
Results Bodies Mesh, Body Mesh, Body Names, Body Path and 16 more
Smoke Session Advance, Body Position, Body Rotation, Body Velocity and 15 more
Shore Session Advance, Body Position, Body Rotation, Body Velocity and 15 more
Triggers Above, Also, At Time, Below and 13 more
Particles Add Particle Burst, Add Particle Emitter, Add Particle Obstacle Box, Add Particle Obstacle Sphere and 12 more
Ocean Session Advance, Body Position, Body Rotation, Body Velocity and 12 more
Ocean Add Ocean Body, Add Ocean Trigger, Export Ocean Meshes, Export Ocean Textures and 11 more
Particle Session Advance, Burst, Count, Dispose and 10 more
Export Export Frame, Export Sequence
Simulation Simulate

See also