Yes, I believe you've hit the nail on the head; the colors are continuous (as they should be) but the normals are not, because they are getting computed for each face separately, and you've got, essentially, two normals at each shared vertex, one pointing one way and one pointing another. You could use flat shading (FaceNormals) which would remove the oddness (but you wouldn't have a "smooth" look). I'm not sure of a way to get the normals correct for smooth shading.

Donna L. Gresh, Ph.D.
Optimization and Mathematical Software Group
IBM T.J. Watson Research Center
(914) 945-2472
http://www.research.ibm.com/people/g/donnagresh
[EMAIL PROTECTED]




julien pommier <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]

04/03/2003 12:05 PM
Please respond to opendx-users

       
        To:        [email protected]
        cc:        
        Subject:        Re: [opendx-users] Discontinuous data on tetrahedron mesh and ordering of nodes



On Wed, 2 Apr 2003 13:42:57 -0300
Renato Gomes Damas <[EMAIL PROTECTED]> wrote:

> Hi,
>
> When you work with diferents nodes for the diferents elements, even if they
> have the same coordinates, DX interpolate the data between the nodes of the
> elements considering in this its neighbour. As the nodes of the elements is
> unique in your mesh, the interpolate will occur only inside of each element.
>
> If you want a continous visualization you must have nodes shared between the
> elements.

Well I admit my first mail was not very clear ;-) I am well aware of what
you're saying. I'm producing dx files whose data is often discontinuous.
So I don't what to enforce its continuity, hence, as you say, I am using
different set of nodes for each simplex of the mesh. But my test-case was
just to see what is displayed when the data is indeed continuous (the two
nodes which share the same location are assigned the same value), and the
result is not what I expected to see, since the displayed colors are not
continuous across elements!

It looks like a rendering bug, the variation of colors depend on the
lightning angle. It may be clearer on the following example:
http://www.gmm.insa-tlse.fr/~pommier/dx_donut.png

The data that I am trying to represent on this donut is continuous, but it
has been exported as a discontinuous one on a finite element mesh (red
edges). In order to represent high order finite elements, each simplex of
the mesh is refined (the yellow edges). Since the finite element base
functions are continuous, the refined tetrahedra share their nodes inside
each element, but the red tetrahedra do not share there nodes with others.

As you can see, the result is strange: the color are right inside each
element, but they are too dark near the red edges.

So I guess it is a problem with opendx treating each (red) simplex as if
no other simplex were present when it computes the lightning or something
like that.


--
Julien

Reply via email to