Hi,
I'm trying to use NormalGenerator to get the normals for a
TriangleFanArray, but I get some triangle that do not have the same
vertex normal even if they have a vertex in the same location.

I have not holes in the surface: winding order is correct. In wireframe
I see nothing strange.
I use

GeometryInfo geomInfo = new GeometryInfo(tFan);

NormalGenerator ng = new NormalGenerator(Math.PI);
ng.generateNormals(geomInfo);

GeometryArray ga = geomInfo.getGeometryArray();

I tryed to use an IndexedTriangleFanArray but nothing changed.
I've built the IndexedArray in this way. I keep a cache of previously
added vertex. When I add a new vertex I ask the cache for that vertex
index. If the vertex is present (compared considering an error) the
associated index is returned, otherwise a new index is assigned to that
vertex and returned.

The bad "coloring" happens only where I have large triangles.
I can see some triangle with a "shared" vertex one very bright, and the
other dark (just near the shared vertex).
I'm sure the angle is less than PI.


What am I missing ?

Thanks


Bye

<<inline: normal-problem.jpg>>

Reply via email to