Graphics Programs Reference
In-Depth Information
F
Influence panel:
Color: Enabled
Blend: Add
42. A second texture must be added; name it
grassLightmap
, set its
Type
to
Image
or Movie
, and select the
bake-grass.tga
image from the drop-down list in the
Image
panel then set it as follows:
F
Mapping panel:
Coordinates: UV
Layer: Bake
F
Influence panel:
Color: Enabled
Blend: Muliply
Let's explain how the material works: The diffuse channel starts with the black
color, the irst texture is added, so the result unil now is the color that the
grassDiffuse
texture deines. The lightmap is then muliplied on top of the
current appearance. Since our lightmap is a grayscale image (not the image format,
but the actual colors), the effect is a modulated brightness of the diffuse image.
That's the trick for all the materials we are going to create from now on. Noice one
thing: These materials are shadeless, which means the lighing of the scene won't
affect them.
43. To t a like, a l To To k a t w h a t t h e g ra s s m a t e r i a l w i l l l To To k l i like, , w e c a n t e m p To ra r i l y e n a b l e
the GLSL Shading (
Display
material in the
Properties
sidebar of the 3D View); let's
also save the file.
Floor
44. Make sure we are in Object Mode. Select the
floor
object and then switch to Edit
Mode.
45. Go to the UV/Image Editor and click on
Image → Open
, then open the
cement_
floor.png
image.
46. Back in the 3D View, let's switch to the Edge select mode and select the four edges
connecing the lat part of the loor object with the "squared-ring" that we extruded
when modeling. Ater performing that selecion, let's add to the selecion the edges
running diagonally in the raised part of the floor object (three per corner, 12 in
total).