Skip to content

[Feature] Fluids: water and lava flow, fluid dynamics, smoke #1238

Description

@miogds

Goal

Water and lava are part of the game's levels: a river the player crosses, a lava stream that lights the cave and kills on contact, a pool that splashes when something falls in, a spill that spreads on the floor, and things that float or sink. Nothing of that exists in the engine; the CoolWater plugin renders one water surface with caustic reflections and is the starting point for the surface work.

The goal is fluids at the scales a level needs, cheapest first. Flowing surfaces: a mesh with flow maps that carry direction and speed, animated normals, foam at edges and obstacles, emission for lava, authored in the editor, which covers rivers and lava streams for the cost of a material. Buoyancy through the physics seam so Jolt bodies float, drift with the flow and sink in lava. Real-time fluid dynamics where the player interacts: a shallow-water heightfield on the GPU for pools, ripples and spills, and particle-based simulation only if splashes turn out to matter. Volumetric smoke and gas as a grid simulation with ray-marched rendering, or sprite smoke from the particle system when that is enough, to be decided by the requirements.

Status

Step Plan Status
Requirements Which fluids the game needs and at what scale: flowing surfaces, interactive volumes, smoke; budgets per platform Not started
Flow surfaces Flow maps and animated normals on a mesh, foam and edge blending, lava emission; authored in the editor Not started
Buoyancy Jolt buoyancy for bodies in water and lava, through the physics seam Not started
Fluid dynamics Real-time simulation on the GPU: shallow-water heightfield for pools and spills first, particle-based (SPH/FLIP) only if the game needs splashes Not started
Smoke and gas Volumetric grid simulation and ray-marched rendering, or sprite smoke from the particle system when it is enough Waiting for decision
Sample A river and a lava pool with a floating object Not started

Next steps

  • Requirements note; flow surfaces first, as they cover most of what a level needs.
  • Depends on the particle system for sprite smoke and on the physics seam for buoyancy.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions