Game Development Reference
In-Depth Information
Figure 18.15. Cube, normal, and opacity maps created in Genetica (left) form convincing
compact discs in a game engine when applied to a standard reflection shader. (See Color
Plate XXI.)
18.3.5 Use Cube Maps with Baked Effects
Genetica includes an environment map editor that is able to generate cube maps
with a variety of lighting effects baked into them. When used with standard reflec-
tion and refraction shaders, this results in a range of exotic surfaces, many of which
would otherwise require specialized shader code. By using cube maps with baked
effects, unique surfaces are much quicker to create, can be customized by artists
without modifying code, and will run on older hardware as well as mobile platforms
that may offer fixed-function reflection shaders but may not have programmable
GPUs.
Figure18.15 showsoneexampleofthis.Withthreestandardassetsproduced
in Genetica and an ordinary reflection shader, realistic compact disc surfaces were
created in a game engine with light patterns that shift in a convincing way as the
viewing angle is changed.
Genetica can filter cube maps with a variety of effects including diffusion, light
scattering,andanisotropiceffects.Asshownin Figure18.16 , differentversionsof
an environment can be assigned to different objects within a scene, creating the
impression of various surface types lit by the same environment. The steps used to
createthisexampleappearin Figure18.17.
Theskinshadershownin Figure18.18 isagainlittlemorethanareflected
cube map. If needed, the cube map could be rotated by the shader to ensure the
brightest part of the cube map always faces the primary light source. The cube
map was designed in Genetica to create the impression of subsurface scattering,
but the resulting shader renders without the overhead associated with many other
techniques.
 
Search WWH ::




Custom Search