Water is a relatively complex natural phenomenon to achieve in real-time rendering, due to it's many little contributing factors both visually and physically.
Updates seen in CRYENGINE 3:
- Surface is no longer using procedural bump map, but instead FFT noise based gradient/normal/height map with multiple frequencies/scales for ambient waves.
- User interaction with surface will generate waves propagation.
- For high specs we keep using vertex displacement, with added support for water interaction.
- Cheap approximation for sun shadows.
- Separate water fog passes have been merged into water surface rendering for optimal performance.
- One final small step forward, was unifying water rendering, this means ocean, water volumes and rivers can go through same final rendering path - which will be easier for artists/designers to use since both are setup in same way.
Water rendering in action for high spec. Vertex displacement gives an extra visual kick
Water rendering in action for consoles specs, using parallax approximation
Dynamic water interaction
Some water properties
Notice where does main water color/look comes from: It's all coming from reflection on water top surface and how light interacts with water molecules/suspended particles (we call it "underwater fog" on CRYENGINE).
This means never try to achieve water color/look just with reflection, it's a sum of both.
Notice on both images bright highlights comes from the sky
Notice second look contributor: the "water fog", greenish on
Guidelines for setting up water
- Default parameters where carefully crafted to give a initial nice default look, but every level is a different level, so some fine tuning will always be required.
- Never, never try to achieve water color/look just with reflection, it's a sum of both that gives you a final correct look.
- Since one of your 2 main look contributors is reflections, if you have Dull looking environment, you'll get dull/boring looking reflections. Always strive for interesting sky look, with nice skyline gradient and bright spots (last one particularly important for night scenes).
- Use foam carefully, this is a cheap approximation - don't overdo it, else might look out of place.
- Ocean reflection draw distance is tied to the terrain detail texture draw distance.
Ocean vs Water
- When setting up water materials for ocean, ensure water volume option is not checked.
- When setting up water materials for water volumes or rivers, ensure water volume option is checked.
Shader Gen Option
Crest Foam Amount
Set amount of foam that will appear at the crest of a wave (FFT displaced ocean only - Very High Spec).
Detail Normals Scale
Set waves detail bump tilling.
Fake camera speed
Causes the surface of the water to scroll in world-space. This gives the impression that a stationary object in the ocean is actually moving through it.
Fake camera movement
Multiplier for foam.
Foam soft intersection
Very similar to soft intersection, but blending foam on intersection regions.
Tiling amount for foam.
See Illum Shader for more information. For water a good value is 0.05 (default value).
See Illum Shader for more information.
Use for giving a more choppy look to waves (scale for parallax mapping for xy plane).
Set scale for heightmap used for parallax mapping approximation.
Overall scale for normals.
Rain ripples tilling
Reflection bump scale
Reflection map bump scale.
Real-time reflection map multiplier / or cube map multiplier for water volumes.
Refraction bump scale
Refraction map bump scale.
Ripples normals scale
Sets dynamic ripples normals scale.
Soft intersection factor
Set water soft intersection with geometry.
Set waves bump tilling.
Watevervol flow speed
Set the flow speed for the water volume flow map.
Water Volume flow
Using the Water Shader
Every parameter is straightforward to use, and what the name says it's basically what it does. In case of setting up water volumes, simply increase tilling scale.
Some examples of look:
Tiling - too little
Tiling - on the spot
Tiling - way too much (kills look)
Reflection setup (bias 1)
Reflection setup (default bias 0.05)
Reflection setup (reflection scale)
Normals setup (low normal scale)
Normals setup (normal scale)
Normals setup (inc. detail normals scale)
Only enable options you really want to use:
- Do you need sun reflection? If not, disable.
- Do you need foam? If not, disable.
- Set caustics multiplier to 0 to disable caustics rendering when not needed.
Performance related CVars: