An emitter into target (an MPMSolver, or an MPMReference for tests) over height.
Optionalcenter?: [number, number]Centre of the splash area, world x and z.
Optionalmaterial?: stringMaterial of the splash particles (one of the solver's).
OptionalmaxPerFrame?: numberMost splashes per update (the rest of that frame's are dropped).
Optionalparticles?: [number, number]Particles per splash: on dry ground (a low scatter of droplets) and on a puddle (a crown plus a central jet).
OptionalpuddleDepth?: numberPuddle depth from which a drop splashes as onto water, metres.
Optionalradius?: numberSplashes land within this radius of center, metres (e.g. the near field around the camera).
Optionalrain?: numberRain rate, mm/h (0: no rain; puddles drain and dry).
OptionalretireOutside?: booleanAlso remove any particle that leaves the solver's domain (a stream running off its side), instead of freezing it.
Optionalseed?: string | numberSeed of the impact positions and splash shapes.
Optionalsoak?: numberAlso remove stray water: a particle on its own (grid mass at its node below this many full cells of 1000 kg/m³) resting on the ground soaks in, instead of lying there as a 15 mL bead. 0: off.
Optionalspeed?: numberLaunch speed of the splash droplets, m/s (a crown on water; dry-ground droplets fly lower and wider).
Optionalsplashes?: numberMPM splashes per m² per second per mm/h of rain: the few visible splashes among the real drop impacts (~70 per m²·s per mm/h).
ReadonlyimpactsThe last update's impacts.
Resolved settings.
ReadonlypuddlesThe puddles the rain feeds (if any).
Splashes spawned so far (the serial of the next one: seeds its random numbers).
Frees the GPU pass.
The retire pass (GPU solvers only): removes splash particles that have landed (moving down within half a
cell of the ground), stray water soaking in (soak) and, with retireOutside, any particle outside the domain. Batch it after the solver's
passes: renderer.compute([...mpm.prepare(dt), ...rain.prepare()]).
Merges input into the settings.
Optionalcenter?: [number, number]Centre of the splash area, world x and z.
Optionalmaterial?: stringMaterial of the splash particles (one of the solver's).
OptionalmaxPerFrame?: numberMost splashes per update (the rest of that frame's are dropped).
Optionalparticles?: [number, number]Particles per splash: on dry ground (a low scatter of droplets) and on a puddle (a crown plus a central jet).
OptionalpuddleDepth?: numberPuddle depth from which a drop splashes as onto water, metres.
Optionalradius?: numberSplashes land within this radius of center, metres (e.g. the near field around the camera).
Optionalrain?: numberRain rate, mm/h (0: no rain; puddles drain and dry).
OptionalretireOutside?: booleanAlso remove any particle that leaves the solver's domain (a stream running off its side), instead of freezing it.
Optionalseed?: string | numberSeed of the impact positions and splash shapes.
Optionalsoak?: numberAlso remove stray water: a particle on its own (grid mass at its node below this many full cells of 1000 kg/m³) resting on the ground soaks in, instead of lying there as a 15 mL bead. 0: off.
Optionalspeed?: numberLaunch speed of the splash droplets, m/s (a crown on water; dry-ground droplets fly lower and wider).
Optionalsplashes?: numberMPM splashes per m² per second per mm/h of rain: the few visible splashes among the real drop impacts (~70 per m²·s per mm/h).
Spawns this frame's splashes into the target and advances the puddles. Returns how many splashes.
Rain on the ground near the camera as MPM splashes: each update a seeded number of drops (
rain×splashes× area × dt, fractions carried over) hit the terrain withinradiusofcenter, and each spawns a few water particles in the solver: on a puddle a crown and a jet, on dry ground a low scatter. Those particles are tagged (SPLASH_TAG); the retire pass from SplashEmitter.prepare removes them when they land again (their water is already counted in the puddles). With a PuddleField, the rain also feeds it. Far from the camera, keep drawing rain as streaks; this is the near field.Example