Game Development Reference
In-Depth Information
Back in Unity
After all this work in Photoshop, we need to help Unity understand what this
new asset is and where to use it.
Step 19: Help Unity understand that this is a Normal map. In Unity, in the
Project panel, select EntryWay_WallsInner_Normal. In the Inspector look
for the Texture Importer section and change the Texture Type to Normal
map. Click off the Generate from grayscale setting. Click Apply.
Why?
Unity likes to know what it's dealing with. If this image is used to define
the normal channel of a bumped shader, Unity will complain that the
image is “not tagged as a normal map.” By telling Unity to bring the image
in as a normal map, this warning will be avoided. However, the Generate
from grayscale option is not what we want here. What this option
attempts to do is what CrazyBump does or what we just did in the past
17 steps—it attempts to create a normal map from a color texture image.
However, in my experience, the result here is neither optimal nor easy to
control. The most control comes from techniques outside of Unity.
Step 20: Select the EntryWayWallsInner GameObject. Do this by either
clicking the object in the Scene window or finding it by name in the Hierarchy
panel. The attributes of the GameObject will appear in the Inspector.
Step 21: Change EntryWayWallsInner's shader to be Bumped Specular. In
the Inspector look down toward the bottom at the entryway-entryway_
wallsinner_mat. In the Shader section there, choose Bumped Specular
from the drop-down menu. There should appear a new Normalmap
section.
Why?
Really, most any of the Bumped shader would work. However, to really get a
look at what this normal map does, the specular flavor shows it off the quickest.
This will probably be changed later as the specular shaders make things look
shiny or wet, but for now, for illustration purposes it'll do just the trick.
Tips and Tricks
If there are no options below the Shader section in the Inspector, click
once on the sphere swatch. It will expand or collapse the settings for that
particular material.
Step 22: Use EntryWay_WallsInner_Normal as the Normalmap. Still in the
Inspector, in the Normalmap section, click the Select button and choose
our newly imported EntryWay_WallsInner_Normal image. The results
should be immediately visible in the Scene window. Figure 7.14 shows
the before and after.
Search WWH ::




Custom Search