Graphics Reference
In-Depth Information
Table 11.1 Linear units to
pixels conversion
Inches
cm
Pixels X
6
15.24
32
12
30.48
64
24
60.96
128
48
121.92
256
96
243.84
512
192
487.68
1,024
be more than you used earlier to check the UVs with a reference map, so be pre-
pared to make more shaders. Make sure each shader is named logically.
• Determine the appropriate pixel to linear dimension scale. This should be based
on the smallest texturable objects in the scene, not the largest. For example, if
you decide that 32 pixels will be equal to 6 in. (15 cm), and your maximum tex-
ture size is 1,024 × 1,024, then the largest polygon in your scene will be 16 ft 2
(5 m 2 ) unless you use tiling. This is because you cannot cover more area than this
with a texture without making it larger than the maximum size or having an
inconsistent pixel resolution. If you want a surface to be larger than this, you
should divide it with a texture boundary so that none of its edges are larger than
the size limit (Table 11.1 ).
• By using the scale ratio you have worked out, in combination with the texture
layout you made, create stand-in textures for every texture in your scene. These
textures should be exactly scaled based on the scale ratio. Do not make them
square or power of two sizes unless the geometry they are attached to is also
square or power of two sizes. You may change these sizes later, but for now, you
should have everything scaled exactly to the linear units in your scene.
• Your stand-in maps should each have an appropriate palette and a blocked in pat-
tern to represent the textures you intend to use. Each map should have its name
written on the face of the map. The maps should be saved to the right fi lename
and attached to the appropriate shader.
• After you have made the stand-in maps, you should be able to look at your model
in the perspective view of your application to check whether your mapping plan
will work. The stand-in maps will give you a good idea where any problems are
likely to be. Fix any problems you fi nd before moving on.
• Now you need to build your shaders by making fi nal versions of your maps. This
may mean making several layers of maps. A typical brick wall, for instance,
might be made out of 10-20 tile set shaders, each of which has diffuse, specular,
and normal maps. They might also have layered shaders if there is any graffi ti or
signage on the wall.
• Do not save the maps as JPEG fi les. Use PNG, TIF, or TGA.
• After adding the fi nal maps to your shaders, your model should be ready for
rendering (Fig. 11.35 ) .
Tip : It is usually a good idea to use tile sets for large terrain objects or structures
that have large open areas, like the façade of a building.
 
Search WWH ::




Custom Search