> Date:         Thu, 30 Nov 2000 16:55:34 -0500
> From: Adam Tegen <[EMAIL PROTECTED]>
>
> After hours of debugging I having quite figured it out yet.  However, if I
> call GeometryInfo.compact() I don't get the exceptions anymore.  The
> geometry seems VERY quantized to the point were the gaps between surfaces
> are very noticeable.  I tried turning the coordQuant to 16, but that made no
> difference.
>
> Could anyone tell me exactly what compact() does, why it keeps the exception
> from happening and if it may (or may not) be responsibly for the coordinate
> distortion?

The "strip ended incompletely" error means that a degenerate triangle was
encountered at the end of a strip, one that contains either 1 or 2 vertices
instead of 3.  This could indicate an error in the geometry that was passed to
GeometryInfo or possibly a Java 3D problem in the utility class.

compact() removes vertices that GeometryInfo detects are not part of any
triangle.  Since calling compact() gets rid of the exceptions, it seems likely
that the data contains some sort of problem that is isn't showing up visually
but is enough to confuse the topological analysis that is part of the
compression and stripification process.

Position quantization shouldn't introduce gaps between surfaces that share the
same vertices along the edges.  If the vertices are in fact distinct, then
quantization may exaggerate (or close) a gap that wasn't visible before the
quantization.  At 16 bits such errors should be very small (much less than a
pixel on the screen) unless you've zoomed in very far to a small part of the
geometry or unless the geometry is not very well localized (small distinct
parts separated by large distances).  In the latter case it is best to
partition the geometry into several pieces so that the vertices are more
localized.

The large gaps you are seing could well be the result of compact() getting rid
of degenerate triangles.  How such triangles are rendered is highly dependent
upon your graphics accelerator hardware and its drivers, which could account
for the visual difference.  What happens when you call compact() on your data
and then render it without compressing it?

Send us a test case if you can and we'll take a closer look.

-- Mark Hood

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to