486 Game Development and Simulation with Unreal Technology
FIGURE 7.62: Adjusting the C oordinate Tiling of Micro Normals for the Water Surface.
and Double-c lick on the M_LScape_Water material to open it in the Material
Editor.
16. Scroll to the left of the graph editor until you locate the section called Micro
Normal”. This section is responsible for creating the waves on the water surface
when viewed closely on the surface. In this section we will see four (4) TexCoord
expressions. These expressions and their respective Panner expressions make the
waves and move them on th e water surface. From the top, the TexCoords U and
V tilings are 1.0, 0.5, 0. 3, and 0.25. These values are quite small for ou r level. We
will modify these by multip lying them with a large numbe r, next:
a. Place a Multiply expression to the right of each of the TexCoord expres-
sions in the Micro Norm al section.
b. Connect the output channel of each of the TexCoord expressions to the A
channel of the Mult iply expression you placed to its right.
c. Place a Constant expression to the far left of the four TexCoord expres-
sions. Note: Holding the 1 key and left-clicking will place a constant expres-
sion on the graph editor.
d. Type a value o f 8 in the Value section of the Constant expression.
e. Connect the output of the Constant to the input B of the four Multiply
expressions.
f. Connect the output of each Multiply expression to the Coor dinate input
channel of its respec tive Panner expressions (see Figure 7 .62).
Terrains and Landscapes in Un real Engine 487
17. This will adju st the Normals of the water surface for the large scales we will need
to use in our landscape.
18. Save and apply your material.
19. If you go and look closely at your Water Surface in the editor viewport, it should
look similar to Figure 7.63(a) and the waves should be visible when you are close
to the surface.
(a) (b)
FIGURE 7.63: (a) Closeup View of Waves on the Water Surface. (b) Distant View of Waves
on the Water S urface.
Now, let us adjust the waves on the water su rface to be more visible when
viewed from distance:
20. Open up the M_LScape_Water material again in the Material Editor, if you h ave
closed it.
21. Scroll to the bottom of the graph editor until you locate the section called Macro
Normal”. This section is responsible for creatin g waves on the water surface when
viewed from a distance. In this section we will see two (2) TexCoord expressions.
These expressions and their respective Panner expressions make the waves and
move them on the water surface. From the top, the TexCoords U and V tiling s
are 0.1 and (0 .08, 0.04). These values are quite small for our level. We will modify
these by multiplying them with a large num ber, next:
a. Place a Multiply expression to the right of each of the Tex Coord expres-
sions in the Macro Normal section.
b. Place a Constant expression between the two TexCoord expressions in the
Macro Normal section.
c. Connect the output channel of each of the TexCoord expressions to the A
channel of the Mult iply expression yo u placed to its right.
d. Type a value of 24 in the Value section of th e Constant expression.
e. Connect the output of the Constant to the in put B of the four Multiply
expressions.
488 Game Development and Simulation with Unreal Technology
f. Connect the output of each Multiply expression to the Coor dinate input
channel of its respec tive Panner expressions (see Figure 7 .64).
22. This w ill adjust the Normals of the water surface for the large scales we will need
to use in our landscape.
23. Save and apply your m aterial.
24. If you go and look closely at your Water Surface in the editor viewport, it should
look similar to Figure 7.63(b) and the waves should be visible when viewed from
distance.
FIGURE 7.64: Adjusting the C oordinate Tiling of Macro Normals for the Water Surface.
SETTING UP REFLECTION AND TRANSPARENCY
With the adjustment we made to the texture coordinates, we now have our water
waves look pretty good. But the Water looks more like crude oil. It is quite
opaqu e and dark. Moreover, it does not rea lly reflect anything. Let us fix the
reflection proble m fir st:
25. Go to the main editor, and in the Search Classe s bar in the Models Panel ty pe
Reflection. This will look up the Reflection Capture classes f or you.
26. Drag a Sphere Reflection Capture into the level.
27. Make the following changes to the property of the Sphere Reflection
Capture Actor in the Details rollout:
Location: R:1000, G:1000, B:200 (Note: These values may be different in your
level. Place the Reflection Captu re Actor just above the river su rfa ce in your
level. )
Influence R adius: 5000
Terrains and Landscapes in Un real Engine 489
28. This w ill place a Reflection Capture actor in the level. This actor will then capture
the reflection to be rendered onto the surfaces with low Roughness values. For
this to work on our water surface, we will need to modify its Roughness value:
29. Open the M _LScape_Water material again in the Material Editor, if y ou have
closed it.
30. In the mate rial editor find the Constant expression connected to the Roughness
channel of the material node and change its value to 0.
31. After making this ch ange to your level and material, you r water surface should
look very reflective, similar to Figure 7.67(a).
With our water surface reflection set up, now let us make the water surface a bit
transparent. We will perform thre e tasks to achieve this effect.
First, we will have to set up our material’s B lend Mode to become transparent.
Secondly, we will need to create a network for the ma te rial’s transparency. Fi-
nally, we will need to make a network for our material’s emissive color to give
it a shiny look.
So, let us get started:
32. Select the material no de, and loo k for Blend Mode in its Details rollout.
33. Make the following chang es:
Blend Mode: Translucent
Separate Translucency: Checked
Responsive AA: Checked
Translucency Lighting Mode: TLM Surface
34. This makes our material translucent, but you n otice if the material is comp iled, we
will lose much of the details. Th is is because we have not set up the Opacity and
Emissive Colors of our now-translucent material. So let us first set up the Opacity
network:
FIGURE 7.65: Water Material Opacity Net work.
490 Game Development and Simulation with Unreal Technology
FIGURE 7.66: Water Material Complete Network.
a. Place a Fresnel expression (under Utility) to the right of the Lerp expres-
sion that is connected to the Normal channel of th e material. Note: If you
need more room, move the material node to the righ t a little.
b. Connect a wire from the outp ut c hannel of this Lerp expression to the
Normal input of the Fresnel expression.
c. Place a Lerp expression to the right of the Fresnel expression and connect
the output o f the Fresnel to the Alpha input of this Lerp expression.
d. Place two Constant expressions above the Fresnel expression .
e. Type a value of 1 into the top Constant expression, a nd a value of 0.95 into
the bottom one.
f. Connect the 1 constant to the A input of the Lerp expression.
g. Connect the 0.95 constant to the B input of the Lerp expression.
h. Connect the output of the Lerp expression to the Opacity channel of the
material node
35. This makes our material look translucen t, and the amount of translucency to in-
crease as the viewer angle incr eases. It is a pr etty close simulation of a ctual water
surfaces when you look straight on they look translu cent, but viewed from an
angle the surface become opaque.
36. Now, let us finish up our mate rial by setting up its Emiss ive Color channel:
a. Place a Constant expre ssion below the Color parameter and give it a value
of 0.05.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.225.235.144