Need info on height map with 2 z values

Need info on height map with 2 z values

Post by Remi Ricar » Fri, 18 Jul 2003 00:20:12



Hi,

  I'm looking for info on "height map" where I can have more than 1
value at a (x,y) position.

I need that since I want to dig in the soil.

Example of a side view
---------                              ---------------------
         |                             |___
          |                                |
           |                               |
            |______________________________|

N.B. I know it is not really height map since there is 2 z values.

Remi Ricard

 
 
 

Need info on height map with 2 z values

Post by Dave Eberl » Fri, 18 Jul 2003 01:31:37



Quote:>   I'm looking for info on "height map" where I can have more than 1
> value at a (x,y) position.

> I need that since I want to dig in the soil.

> Example of a side view
> ---------                              ---------------------
>          |                             |___
>           |                                |
>            |                               |
>             |______________________________|

> N.B. I know it is not really height map since there is 2 z values.

Partition the mesh into two height maps.  Assuming that
the z-axis is the "up" direction, triangles that have normal
vectors with a positive z-component are part of one map.
Triangles that have normal vectors with a negative z-component
are part of the other map.

--
Dave Eberly

http://www.magic-software.com
http://www.wild-magic.com

 
 
 

Need info on height map with 2 z values

Post by Jerzy Karczmarczu » Fri, 18 Jul 2003 16:23:56





>>  I'm looking for info on "height map" where I can have more than 1
>>value at a (x,y) position.

>>I need that since I want to dig in the soil.

>>Example of a side view
>>---------                              ---------------------
>>         |                             |___
>>          |                                |
>>           |                               |
>>            |______________________________|

>>N.B. I know it is not really height map since there is 2 z values.

> Partition the mesh into two height maps.  Assuming that
> the z-axis is the "up" direction, triangles that have normal
> vectors with a positive z-component are part of one map.
> Triangles that have normal vectors with a negative z-component
> are part of the other map.

Actually, it won't help directly, the "up map" is still not a map since
it is 2-valued, as you can see. The global surface is 3-valued. So, what
to do with overlapping "up" portions?

I am afraid that in general case the height field will have to be treated
as parametric vector field, provided the surface can be *practically*
parameterized...  But perhaps some more clever ideas have been proposed?

Jerzy Karczmarczuk

 
 
 

Need info on height map with 2 z values

Post by Dave Eberl » Fri, 18 Jul 2003 23:19:07





> >>N.B. I know it is not really height map since there is 2 z values.
> Actually, it won't help directly, the "up map" is still not a map since
> it is 2-valued, as you can see. The global surface is 3-valued. So, what
> to do with overlapping "up" portions?

> I am afraid that in general case the height field will have to be treated
> as parametric vector field, provided the surface can be *practically*
> parameterized...  But perhaps some more clever ideas have been proposed?

I read the poster's words "...since there is 2 z values", but yes
his picture indicates more z-values per (x,y).  The idea of
partitioning *still* applies based on the sign of the z-value of
the normal vector.  Generally for a manifold mesh (each edge
has at most two triangles adjacent), this is just a problem of
constructing the connected components of a graph where the
graph "nodes" are the triangles and the graph "arcs" are the
edges that connect two triangles.  Remove those arcs that
connect two triangles, one with positive-z normal value and
one with negative-z normal value.  The connected components
are the partition.  In practice you do not have to actually
remove the arcs.  Just use a breadth-first search.  If the first
triangle has positive-z normal value, use BFS to find the
adjacent triangles with positive-z normal value.  When finished,
check if any triangles are unvisited.  If so, start a new search.
Of course you will need to make a decision about how to
handle triangles of zero-z normal value.

--
Dave Eberly

http://www.magic-software.com
http://www.wild-magic.com

 
 
 

1. Rendering a height map (or height field)

'm looking for a method for rendering rectangular height maps.  In
particular, I can't simply use tri_strips, because the following case
fails:

(heights)
0 0 0
0 1 0
0 0 0

I would like this to render a simple peak, like so:

(pardon the html tags, but it might help folks who have html readers)
<pre>
0--0--0                       0--0--0
|\ | /|                       |\ |\ |
| \|/ |   But instead, it ->  | \| \|
0--1--0   looks like this ->  0--1--0
| /|\ |   with TRI_STRIPs ->  |\ |\ |
|/ | \|                       | \| \|
0--0--0                       0--0--0
</pre>

This causes a visible "striping" from upper left to lower right.  The
lower left and upper right triangle have 3 vertices at 0 so form a
surface that isn't inclinded at all.

I've toyed with a few ideas to figure out how to subdivide each quad
of points better, but I was wondering there's already a known solution
(I've checked several books and searched both the web and usenet to no
avail).

Any ideas?

--
                              |  "If hard data were the filtering criterion
Mark Ping                     |   you could fit the entire contents of the

                              | - Cecil Adams, The Straight Dope Tells All

2. Image size on import from camera

3. 3D graphing of single valued two variable functions, info needed

4. LUNDY HYPERGRAPH SYSTEM - QUESTION

5. How to map GL_DEPTH_COMPONENT values to near-far plane values

6. If Lightwave is so great................

7. Need Info RE: Map programs/pictures

8. Blending When I Don't Want It

9. CIA World Map data info needed

10. Need info: Annotate points onto map

11. 3D MAX 2, need info on lofting and mapping co-ords

12. Bump mapping info needed

13. 3D-2D mapping--need more info