DOCS // PYRO 0.4.1

Obstacles

[[obstacles]] are solids the gas flows around: spheres, boxes, cylinders and capsules, with carve = true cutting holes such as a window in a wall. Keys move and turn them, and holdout and shadow hide and shade the gas in the sheets.

A wall with a window

The window fire example builds a room from three obstacles: a block, the room carved out of it, and the window carved through its front.

window_fire.pyro.toml (excerpt)
# The building: fills the back of the box from the floor to the top. Its front is at Z = -0.5,
# which leaves 3 m of open air in front for the flame to roll out into.
[[obstacles]]
shape = "box"
position_m = [0, 4, -1.5]
size_m = [2.5, 4, 1.0]

# The room inside it, with a wall 0.2 m thick in front.
[[obstacles]]
shape = "box"
carve = true
position_m = [0, 1.3, -1.5]
size_m = [1.3, 1.1, 0.8]

# The window through that wall.
[[obstacles]]
shape = "box"
carve = true
position_m = [0, 1.5, -0.6]
size_m = [0.7, 0.65, 0.25]

Fields

FieldMeaningDefault
shapesphere, box, cylinder or capsule; a cylinder and a capsule stand along their own Ysphere
position_mCenter (t). Keys move the solid, and it pushes the gas ahead of it.[0, 1, 0]
size_mRadius of a sphere, cylinder or capsule; half-extents of a box (t)0.5
height_mFull length of a cylinder; length of the straight part of a capsule (t)1.0
rotation_degTurns the solid (t). Keys spin it, and the spin drags the gas at its surface.[0, 0, 0]
carveRemoves its shape from the obstacles listed before it; the first obstacle cannot carvefalse
holdoutHides the gas behind it in the sheets, as the real object will once the engine draws ittrue
shadowBlocks the light, so gas in its shade is darkertrue
start_s, end_sWhen it is there; end_s = 0 never leaves0, 0

How solids combine

  • Obstacles are laid down in spec order, so a later solid fills a hole an earlier carve made, and a later carve cuts every solid before it.
  • A solid is never thinner than one cell, at draft too, and one cell stops the gas at any angle.
  • A solid may stand outside the part of the box the camera frames: it still hides and still shades.
  • The solid itself is not drawn; it stands in for an object the engine draws. With holdout on it leaves a clean hole in the sheet for that model.
  • Keep emitters clear of solids: an emitter that pokes through a wall also burns on the far side.