I'm someone relatively new to 3D graphics, but seem to have gotten the
hang of J3D.. I'm having a problem with the normal generation.
I'm loading in about 10,000 triangles via the
com.sun.j3d.utils.geometry.GeometryInfo class. I set up the
GeometryInfo as a TRIANGLE_ARRAY, call setCoordinates(myArray).
I then pass the Geometry Info through the NormalGenerator utility, and
then create
a Shape3D from the GeometryArray exposed on the GeometryInfo.
This appears to work fine- when I display it as POLYGON_LINE or
POLYGON_POINT, the points are obviously in the right place. However,
when I try to use POLYGON_FILL, only every second triangle is displayed
from any given direction. If I view the surface from the underneath,
the _other_ half of the triangles appear to be displayed. I am using a
single directional light source.
I assume that my problem is the normals. As my surface represents a
forested terrain in British Columbia, I want all of the normals pointing
up. Is this an issue with the normal generator? Would I be better off
computing them myself?
Thanks,
Duncan.
=====================================================================
To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
Java 3D Home Page: http://java.sun.com/products/java-media/3D/