Physics look and budget
Skill ferret-physics-fx-tuning · download all skills · SKILL.md
When to use#
Making heat glow or water render; a frame over budget; choosing a tier.
The model#
Capabilities report numbers and own no look. physics-fx turns them into a picture: glow(scene, mesh, () => part.T), blackbody, incandescence (nothing is visible below about 800 K), waterMesh, fluidView, lampLight. Cost: it grows with how often a model steps and how finely it sub-steps. The tier table sets budgets; the Governor watches the step time and gives up detail in the order of its rules, taking it back when there is room.
Steps#
- Bind glow and lights to the state objects; give meshes a Standard or PBR material first.
- Slow models do not need 60 Hz: heat 2–10 Hz, liquids 10–20 Hz, reactor coast 1 Hz; step from an accumulator and pass the true interval.
- Raise
maxSubstep(ormaxStep) for coasts; keep fine sub-steps while something fast happens. - When over budget remove in order: fx particles, step rates of slow models, sub-steps, off-screen simulation. Never the rigid-body step first.
- Read
physics.info; addDegradeRules if the defaults do not fit.
Check afterwards#
Step time in physics.info stays under budget on the target tier; behaviour (not looks) is unchanged after degrading.
What usually goes wrong#
mesh "x" has no material to glow.- Governor never acts: no rule applies, or the step is under budget.
- A rule has no effect: overridden at a narrower scope (the governor sets world scope).
- A room the player left keeps stepping: stop it, and advance by the elapsed time on return.
Files#
reference/fx.md— Colour and glow of hot parts, a mesh that follows a water surface, a particle liquid drawn as instances, and a light that follows a lamp.reference/budgets-and-tiers.md— How much physics a device can afford: the tier table, the governor that gives up detail when the step runs long, custom degrade rules, and how to measure.reference/api-physics-fx.md— every export of@ferret/physics-fxwith signature and doc commentrecipes/tuning.md— Where the cost of the capabilities goes and which knob buys it back: sub-steps, step rates, off-screen sleep, and what to switch off first.