Game Development Reference
In-Depth Information
Now that you know how to add multiple colliders to an object, you can probably figure out how you
could make more efficient colliders for the Planter Tower and the Raised Bed.
Improving Generated Materials
Earlier in the chapter, you improved and added to the textures that were going to be used by
the imported assets. When the assets came in, materials using the most basic (for basic, read
economical ) shader were generated. Let's go ahead and make some improvements to the materials.
Be aware that using more complicated shaders may decrease frame rate. As always, use the fancy
stuff sparingly.
1.
Select one of the wall objects.
2.
At the bottom of the Inspector, you will find its material, StoneTextureColored.
Shaders
Shaders are the code that tells the graphics hardware how an object's surface properties will look on
screen. Materials in Unity are assigned prebuilt shaders, where the author can only assign textures
or adjust parameters that already exist in the shader. Unlike many DCC applications where the artist
can “build” a material by adding the attributes he wants to get the affect he has in mind, in Unity,
you must look for the shader that best suits your needs. Writing custom shaders requires a different
coding language and is beyond the scope of this topic. There are custom shaders available at the
Asset Store if you can't find what you want in the standard shaders.
The wall's Material, StoneTextureColored, uses the simple Diffuse shader. Fortunately, there are
some good shaders available to improve the material generated on import.
1.
Click the Shader drop-down list to see the shader choices (Figure 4-32 ).
 
Search WWH ::




Custom Search