Skip to Content
Mapping Hacks
book

Mapping Hacks

by Schuyler Erle, Rich Gibson, Jo Walsh
June 2005
Intermediate to advanced
568 pages
24h 7m
English
O'Reilly Media, Inc.
Content preview from Mapping Hacks
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
Make 3-D Raytraced Terrain Models #20
Chapter 2, Mapping Your Neighborhood
|
89
HACK
The excellent terraform
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

The Three Traps That Stymie Reinvention

The Three Traps That Stymie Reinvention

Ryan Raffaelli
Computing for Numerical Methods Using Visual C++

Computing for Numerical Methods Using Visual C++

Shaharuddin Salleh, Albert Y. Zomaya, Sakhinah A. Bakar

Publisher Resources

ISBN: 0596007035Purchase LinkErrata PageOther