Large bodies of water and other large reflective surfaces can cause visible seams.
It’s not always possible to totally fix this, but we can remedy it in most cases with these techniques.
If your seams are caused by moving water, then you may be able to use anti-aliasing to remove them.
If your seams are caused by moving water, then you may be able to use anti-aliasing to remove them.
Here’s how to make Reflections in a body of water work:
- Open the Environment Light Mixer and create a Sky Light, Atmospheric Light, Sky Atmospheric, Volumetric Cloud, and Height Fog:
- Add a water material to a ground plane or floor mesh. For this example we will use the M_Water that comes with the Engine Content:
- Edit the Water material so that when close to the camera it will have no reflection. This will result in a fade out rather than a harsh line in the reflections:
- Make a new folder in your Content folder and call it ‘Water':
-
Navigate to the Water material by clicking on it in the outliner or viewport then clicking the ‘browse to asset’ button:
-
Copy and paste the Water material into your newly created folder:
-
Rename this asset M_Water1:
-
Double click this Material to open it. You will see a Material Function, we need to copy this as well.
-
Click on the Material Function ’MFAttr_Water’. Then use the Browse to Asset button in the "Material Expression" Details Panel.
-
Once you have this asset located, copy and paste this into your new Folder and rename this MFAttr_Water1:
- Now go into the M_Water1 Material and swap the new MFAttr_Water1 Material Function in:
- Double click the Material Function MFAttr_Water1:
- Add the Nodes in the image below and hook the Lerp B in to the Specular Output:
- Now you can create a Material Instance of your new Water Material:
- Add it to the Floor Plane (or wherever you need):
- You can change the MaxDistance and Offset so that you get a smooth fade from no specular to full specular reflections:
Here’s how to make Waves in a body of water work:
- We can use the same technique but for another material function within the new MFAttr_Water1 Material Function we created above
- Find the MF_Wave_3B_Normals Material Function in the MFAttr_Water1 Function and make a copy of it. Connect the new MF_Wave_3B_Normals2 to the left and right nodes (replacing the old one):
- Double click on MF_Wave_3B_Normals2 to open it, then add the below highlighted nodes and connect them into the 'A' Input of a Lerp, with the Original Output going to the 'B' Input of the Lerp. Copy the Wave Strength Parameter and Rename it to Wave Strength0, then copy the Nim and MF_normal Strength nodes to result in the image below:
- You will now be able to control the wave Max Distance and Wave Offset to make the appearance of the waves dependant on their distance from the camera:
Other general tips:
- Sometimes reflection seams can be caused by global illumination. In your sky light, set Cast volumetric Shadow to off.
- If the clouds are causing seams you can stop them moving. To do this select your volumetric cloud actor and scroll down to it’s material. Double click the m.simpleVolumetricCloud material and set the Wind Vector to 0,0,0,0