At 4:10 PM -0500 2/27/05, Mike Woodworth wrote:
i know this is a probably a topic for the games list, but i'm loath
to get even more rb email every day just to get this one question
answered :)
Yes, you probably would get better discussion of this on the games
list -- which, BTW, has very low volume compared to the NUG list.
But anyway...
There are lots of ways to skin the "elevation map" cat. The simplest
approach would be to have a model already set up with a grid, and
simply set the Y position of each grid point according to the
elevation (grayscale value) on your map. You could use the code from
the "Mesh Deformation" article in RB Developer almost verbatim for
this.
What real games generally do is more complicated: there are
algorithms to figure out where you need to have more or fewer points
in the mesh in order to best represent the terrain with the fewest
number of triangles. So in places where the terrain is relatively
flat, you use fewer, and where it's changing a lot you use more.
I've never done that, though I have skimmed some articles about it.
But an Rb3DSpace is actually quite fast for a single object; the
number of triangles doesn't matter all that much. So you could take
the simpler approach with a pretty high-resolution starting mesh, and
it might work just fine for you.
Best,
- Joe
--
REAL World 2005 - The REALbasic User Conference
March 23-25, 2005, Austin, Texas
<http://www.realsoftware.com/realworld>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|