Game Development Reference
In-Depth Information
which color from the image should be used when the object in the scene is no more than a few pixels
big (Figure 4-2 ). A perfect example is a black-and-white checker pattern. At some point, the object
with the texture is so far away that only a few pixels must represent the check. If the choices are only
black and white, the color could vary from frame to frame, causing a sparkling effect. Using a blurred
version of the original texture, the pixels will always be a gray color at a distance.
Figure 4-2. The checker map (left). In the three blocks to the right of the checker map, the MIP-mapped texture appears on the
left and the non-MIP-mapped texture is on the right, with the quads drawn farther back in space each time
You can see the MIP map in action in the Chapter 4 project file Misc Tests, MIP Mapping scene.
If you press Play, you will see the two quads move backward and forward in the Game view.
Audio
Unity reads a limited number of audio file types. Just as with Unity's other assets, they are internally
converted on import. Short clips of .AIFF and .WAV are converted to uncompressed audio. MP3
and longer clips are converted to Ogg Vorbis, .ogg, an open source format heavily used in real-time
applications. If you are authoring for mobile and have set the platform in the Player Settings, the
audio may be compressed to MP3. If the audio clip is not already an ogg file, you can manually set
the compression type for higher quality or more efficient memory usage. Ogg is an open source
compression similar to MP3 that does not involve license fees. For mobile, the MP3 license fee is
covered by the hardware manufacturer.
The Importer
Importing assets is one of the most ubiquitous tasks in Unity. Most of your art assets must be
imported. There are a vast number of choices on import, but there are only a few that must be
carefully addressed. Fortunately, the defaults are generally quite useful.
From this point on in the topic, most of what you will be doing will be aimed toward the topic's
project, so you will begin by creating a new project.
1.
From the File menu, select New Project.
2.
Navigate to where you want to keep it, and create a folder named
Garden Defender .
3.
Select it, and click Select Folder.
 
Search WWH ::




Custom Search