In this comprehensive tutorial, I'll guide you through creating a realistic pool or still water material using UE5's Single Layer Water shading model.
With a few tweaks, this material can be adapted for more dynamic water surfaces like seas or oceans. This same material was used in an environment featuring Infinity Tiled Rooms and Pools.
This step-by-step guide covers the entire process for how to create this water Material.
To begin, you'll need a simple environment to test the water material. For this tutorial, I'll be using a room from the Infinity Tiled Rooms and Pools modular asset pack, lit with rectangular and point lights - no directional or exterior lights. This setup avoids issues with the Single Layer Water shader, which I'll discuss later.
Create or Import a Plane: If you don't have a flat plane, go to the Place Actors panel, select Shapes and drag a plane into your scene. This will serve as the water surface.
Position and Scale: Place the plane where the water will appear and scale it to fill the desired area. Uniform scaling is optional; the material will work regardless.
Disable Collisions and Shadows: Select the plane, go to the Details panel, and set Collision Preset to No Collision so characters can pass through. Disable Cast Shadow to prevent unwanted shadows.
Create a New Material: In the Content Browser, navigate to your desired folder then right-click, select Create Material, and name it M_Water_Pool.
Configure the Shading Model: Open the material and select the main node. In the Details panel, change the Shading Model from Default Lit to Single Layer Water.
Add Single Layer Water Node: Right-click in the graph, search for Single Layer Water Material Output and add it. This node drives key water properties like scattering and absorption.
Define Water Color (Absorption Coefficient): Absorption Coefficient determines the surface color of the water by absorbing specific colors to reveal the desired hue (e.g., absorbing red/orange to show blue/green).
Simplify Color Selection with Hue Shift: To choose the desired water color directly (instead of its opposite), add a HueShift node.
Set Up Base Color, Roughness, and Opacity.
Add Depth Color (Scattering Coefficient): Scattering Coefficient controls the color and intensity of the water's depth, enhancing realism.
To add waves you'll need a water Normal Map. Import your own Normal Map to use or use Engine Content.
In the Content Browser, enable Engine Content (via Settings). Locate the T_Water_N normal map in the Engine Content folder or use the T_Water_N from Starter Content.
Drag the Normal Map into the material editor
Adding Tiling.
Control Normal Map tiling with World-Aligned Position node.
Add Water Movement.
click on image to view full size
Refraction distorts objects below the water surface, adding realism.
Configure Refraction Method: Select the main node, go to the Details panel, and set Refraction Method to Pixel Normal Offset (preferred for large water planes over Index of Refraction).
Add Refraction Parameter: Add a ScalarParameter named Refraction with a default value of 1.05. Connect it to the Refraction input of the main node.
Add Phase G and Color Scale Behind Water. These parameters are useful for exterior scenes with directional lights.
Phase G: Adjusts light scattering relative to the sun's direction.
Color Scale Behind Water: Controls luminance and shadow brightness below the water surface.
Adjust PhaseG and ColorScaleBehindWater to enhance scattering and luminance effects.
Note: For interior pool water, these parameters may not be necessary.
Right-click the material, select Create Material Instance, and name it MI_Water_Pool. Apply the instance to the water plane.
The Single Layer Water shader can produce harsh shadows with directional lights in outdoor scenes. See this tutorial for solutions.
You've now created a highly customizable water material suitable for pools or still water, with the flexibility to adapt for oceans or seas. This material includes controls for color, depth, waves, refraction, and more, making it ideal for various environments. For outdoor scenes, consider adding PhaseG and ColorScaleBehindWater or addressing directional light issues with ray-traced shadows.
If you'd rather skip the setup, the finished material is available on WoLD Patreon.
Home Terms of Use/Trademarks/Disclaimers Privacy Policy Donate About Contact
All content on this website is copyrighted ©2008-2024 World of Level Design LLC. All rights reserved.
Duplication and distribution is illegal and strictly prohibited.
World of Level Design LLC is an independent company. World of Level Design website, its tutorials and products are not endorsed, sponsored or approved by any mentioned companies on this website in any way. All content is based on my own personal experimentation, experience and opinion. World of Level Design™ and 11 Day Level Design™ are trademarks of AlexG.
Template powered by w3.css