Game Development Reference
In-Depth Information
Maximum texture size. As mentioned, the CMOD atlas texture is sized at
4096×4096 pixels. By default, however, Unity imports this and resizes it to
1024×1024. This size might be suitable for legacy hardware and some mobile
builds. But for desktop PCs and Macs, the size should be 4096×4096. To
solve this, use the Max Size field in the Object Inspector to “upsize” the
texture back to its original size. “Upsize” here is not true upsizing: Unity is not
stretching a 1024×1024 texture to 4096×4096. Rather, it restores the original
texture without downsizing it. Notice the Per-Platform settings for textures,
as shown in Figure 2-9 . Switching between these tabs means we can specify
different textures sizes on a per-build basis, allowing Unity at compile time to
automatically select and build the appropriate texture for our target platform.
Figure 2-9. Tweaking texture settings on a per-platform basis
Changing the Texture Type. By default, the CMOD atlas is imported with the default
Texture Type set at Texture (as shown in Figure 2-9 ). Texture refers to general textures
applied to most types of 3D meshes, including environment meshes and animated
meshes. In many cases, this setting will be acceptable. But for the CMOD atlas it
isn't. CMOD is intended to be an FPS game in a comic/humor style. We'll need the
atlas not just for environment meshes, but also for the interface and for sprites . As we'll
see, both the enemies and power-ups will be implemented as old-school billboard
sprites. That is, as 2D images constantly aligned upright and facing the camera.
This means the atlas will be multipurpose. It'll be used for meshes, for the GUI, and
for sprites (which are 2D GameObjects introduced in Unity 4.3). To configure the
texture for our specific needs, we'll change the Texture Type setting from Texture to
Advanced . When Advanced is selected, additional properties appear in the Object
Inspector, allowing even further customization (see Figure 2-10 ).
 
Search WWH ::




Custom Search