Stylized Water 2
There really is no shortage of ideas, and there are still plenty of things I want to work on! These are some features that are slated for R&D or are in an early stage. A general design principle if that everything should remain plug & play, and can be disabled entirely to avoid a performance impact for unused features.
Features that are complex, and require a sizeable amount of development time will be published as separate paid extensions. Rather than making a single high priced asset, the intend is to keep things modulair.
In order of priority/completion:
Interactive water (extension asset)
A personal favorite, an approximated wave simulation is run based on the shape of meshes that touch the water, allowing small-scale waves to be dynamically created. Similar to what’s seen in games such as The Witcher 3 or Assassin’s Creed https://twitter.com/_staggart_/status/1371390591645401088.
This goes beyond simply rendering particle effects into the water, which wouldn’t support waves bouncing off each other, or having entire 3D shapes create waves (character limbs or boats).
Needs conversion to a compute shader, since this opens up the possibility of reading back the wave height in C# for the buoyancy API.
• (Vital) Render area should move with the camera, and the simulation should account for the shift (open world usage)
• Still needs a form of collision detection, so objects above/below the water don’t render into the simulation.
• Adding a dedicated foam layer to the shader, drawn only through a separate foam simulation.
• Motion vectors, tells the simulation in which direction the object is moving, and how fast. This should make directional waves possible, next to velocity-based foam. This will also allow waves to be created when an object is rotating.
Water projectors (extension asset)
Will allow decal-like objects to render into the water. Likely only albedo and normal maps! https://twitter.com/_staggart_/status/1327268494837239810.
Down the line this can be used to add details such as debris, duckweed or pipe in a custom material that draw shoreline waves with foam (though using Shader Graph only alpha-tested shaders will work). Potentially also possible to use “height projectors”, which can inject a heightmap to raise or lower the water geometry.
currently only works in a specific area with wave support. Or everywhere, but without waves (at which point just placing a sprite above the water looks identical!). Need to find a way to combine best of both worlds.
Flowmap painter (extension asset)
Create a flowmap object, with a specific box-size and enables you to paint a flow map within this area. The painter is GPU based, so isn’t per-vertex, and allows for greater detail. This allows the use of brushes (modeled after Substance Painter).
Splines can be used to drive the flow, next to manual painting. But this specific feature would be rebuilt on Unity’s native spline tool when it releases.
Rather than using a 2 colors to set the deep and shallow color, a gradient can be used.
Underwater rendering (extension asset)
Allows a camera to be partially submerged, and draws a waterline effect on the camera lens. Underneath the water surface, fog and caustics are drawn and the water refracts the scene above the water.
Dynamically subdivides the water geometry to create more vertices near the camera. This allows to have very detailed waves near the camera, without needing a high-poly mesh.