
88
|
Chapter 2, Mapping Your Neighborhood
#20 Make 3-D Raytraced Terrain Models
HACK
The +W and +H options specify the image width and height, and +A turns anti-
aliasing on, which makes the rendering look nicer but take longer. We get a
grayscale model of the terrain, as illustrated in Figure 2-19. Not bad for a
first try.
To save time when experimenting with POV-Ray settings,
try leaving anti-aliasing turned off. This will speed up ren-
dering time by at least a factor of two—and then, when
you’ve got your .pov file tweaked just the way you want it,
you can do one more rendering pass with anti-aliasing
turned on.
Color Your Terrain with an Image Map
POV-Ray also offers an image_map function in POV-Ray, which allows us to
specify an image with which to color each value in the height field repre-
sented by your elevation raster layer. You can use the color values in the ter-
rain image itself for a basic grayscale height-shaded effect. With your
favorite graphics program, you can adjust the palette in the image to pro-
duce a more colorful effect, in a similar fashion as that described in “Hack
on Base Maps in Your Favorite Image Editor”
[Hack #32].
Figure 2-19. A grayscale rendering of Crater Lake