Game Development Reference
In-Depth Information
Figure 4-36. Tiling mismatch between Base and Normalmap
4.
Set the x and y tiling to 4 to match the Base texture's tiling.
5.
Adjust the Shininess until you like the result.
The last two materials belong to the Raised Bed. The wood texture probably has enough detail that it
doesn't warrant a normal map. The DarkDirt material could stand to be a little brighter.
1.
Select the Raised Bed.
2.
In the Inspector, make its Main Color a bit lighter.
You may have noticed that the Main Color is a neutral (150,150,150) gray. In 3ds Max, where these
assets were made, a diffuse texture overrides the default Diffuse color, gray. On import, Unity
blends the color and the texture by adding them together. The color could have been changed
before export, but leaving it a light gray can be a time saver. With the light gray darkening the
texture slightly, you have a means of “highlighting” an object on mouseover or some other event. By
temporarily changing the Main Color to white through scripting, the texture becomes brighter without
the more resource intensive use of a second texture. While this is probably not very useful for a first-
person shooter, it is a mainstay of adventure or exploration type games.
The Plants
Typical plants require special shaders. If the textures have alpha channels for transparency, they will
require a shader that uses the alpha channel for transparency and possibly renders two-sided. For
substantially sized plants, you may also want shadows. These three requirements limit the shaders
for the plants.
Because the CornerGarden objects now have colliders, you can quickly “plant” the plants by
dragging them onto the walkways or Raised Bed. You've also got a directional light in the scene,
so you will be able to check on shadows. You may not use all of the plants in the basic game, but you
will want to see what they look like in the scene before you make any decisions about which to use.
 
Search WWH ::




Custom Search