Re: Runtime generation of contour lines

New Message Reply Date view Thread view Subject view Author view

Steve Baker (sbaker++at++link.com)
Fri, 30 Oct 1998 10:16:30 -0600 (CST)


On Fri, 30 Oct 1998, Gamble, Murray - Kan AV wrote:

> Does anybody have any ideas as to how I might generate contour lines at
> runtime from an exiting terrain model? I have several .flt terrain
> models that represent non-real-world geography and would like to generate
> a God's-eye-view model made up of contours for the terrain databases.
  
Depends how much quality you need but one very quick 'cheat' is to
use a TexGen to splat a texture map made up of horizontal stripes
onto the terrain using an X/Z plane projection.

If you make the map too low in resolution - and/or if a contour line
happens to go through a very gently sloping area - then the contour
lines get very wide and fuzzy - but then I did say this was a quick
cheat.

Failing that - you really have to go through each polygon in the
scene computing the intersection with contour 'planes' that lie
parallel to the ground - then insert lines at the appropriate points.

I've done it - but it's too complicated to go into in detail.

If the texture approach is adequate for your needs, you can probably
get it going in a dozen lines of code. Do a 'man' on pfTexGen and
all will be clear.

Steve Baker (817)619-2657 (Vox/Vox-Mail)
Raytheon Systems Inc. (817)619-2466 (Fax)
Work: SBaker++at++link.com http://www.hti.com
Home: SJBaker1++at++airmail.net http://web2.airmail.net/sjbaker1


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Fri Oct 30 1998 - 08:17:15 PST

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.