> >>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.