496 Game Development and Simulation with Unreal Technology
the level. The Reflection Ca pture acto r will rec eive indire ct and static lighting
from the scene and create a cubemap for the reflections to be projecte d onto
parts of the scene that receive re flection (i.e., parts of the scene that are within
the actor’s area of influence). We placed a Sphere Reflection Captu r e actor
close to the surface of the river and made its area of influence large enough to
affect the entire river.
Once the Reflection Cap ture actor was set up in the scene, we changed the
roughness of our water material to 0. This change makes the water material very
reflective. The material is already set up to be fully metallic, so the specularity
of our material is taken care of.
The next step was to make the water surface a little translucent. To do so, we
first changed our material’s Blend Mode to be Translucent. With the Blend
Mode set to Translucent, two changes becom e apparent. First, the Opacity chan -
nel of the m aterial node will become active to rece ive opacity values. Second,
you w ill be able to set up your ma te rial’s Translucency prop erties.
We changed the Translucency Lighting Mode of our material to TLM
Surface. This is the preferred Translucency Lighting Mode for water and glass
surfaces. We established o ur material’s Opac ity chan nel. We could have sim-
ply created a constant value (e.g., 0.95) and plugged it directly to the Opacity
channel of our material node. However, I wanted to ach ieve a more profound
water-like look.
In our level we have a very large area of water (i.e., the river flowing throug h
a valley). As such when you look at the river surface, there are some areas where
your view angle is large (i.e., close to where you are located), while within the
same view there are water areas where your view angle is small (i.e., at the
horizon). When you loo k at a water surface dead-on, it looks more transparent,
while looking at it from an angle makes it look more opaque .
To achieve this effect, I used a Fresnel expression whose normal value is
being supplied from the normal of our water surface. This expression gives us
a value ranging from 0 to 1 based on the angle at which we are viewing the
surface. I used the output of the Fresnel expression to interpolate between an
opacity valu e of 0.95 (slightly transparent) to 1 (completely opaque), depen ding
on whether w e are looking at th e water straigh t-on or at an angle, respectively.
I finally connected a fraction of the water Base Color to the Emiss ive Color
channel of the water material to make it look a bit shiny.
UNDERWATER BLUR EFFECT
The fina l effect to add to ou r la ndscape was to simulate the blurriness of the un-
derwater areas. This effect can be achieved by placing a Post-Process Volume
into our level, a ligning it with the water surface, and modifying its properties to
create a murky blue tint and to simulate the depth of field.
Post-Process Volume actors are proc esses in the fra gment shader, and as
such they will not really receive information or interact with th e geometry o f
the level. In other words, these volumes work by modify ing the final look of the