benilla-re systems structs docs

s_particleSubstep

global · models

Address
0x81d828 · 4 bytes, up to 0x81d82b
Type
float
Meaning
Holds 0.1, the particle substep in seconds
Confidence
verified, proof one
Finding
models/particles#substeps

Finding: Substeps in models: particles

An advance clamps a negative dt to 0 and rebuilds the gradients when the lifespan changed. A step longer than 0.1 s runs n substeps of 0.1 s and one of the remainder dt − 0.1·floor(dt/0.1), with n = floor(dt/0.1) capped at floor(lifespan/0.1) and at 255; the remainder is taken before the cap, so the substeps the cap drops are lost time. Each substep moves particles by 1/(n + 1) of the frame's displacement. Otherwise one step takes the whole displacement.

The derivation is in the doc.