> From: "Markus Junginger" <[EMAIL PROTECTED]>
> Date: Wed, 4 Oct 2000 14:08:02 +0200
>
> CompressedGeometry sounds very interesting. Maybe you can tell us more of
> your experience. Does it work well? No bugs?  What are the limits? Do you
> have some example code, or even a little tool to convert obj/vrml files into
> ".cg"?

Try programs/examples/GeometryCompression/obj2cg to compress .obj files and
cgview in the same directory to view the .cg files that result.  This should
allow you to compare file sizes, load times, and visual quality to see if they
meet your requirements.

The main thing to note is that compressed geometry is lossy -- positions and
colors are quantized to a maximum of 16 bits per (X, Y, Z) and (R, G, B, A)
components, while normals are quantized to a maximum of 18 bits (3 bits for a
sphere octant, 3 bits for a sextant within the octant, and 6 bits each for U
and V components within a sextant).  However, these maximum values were derived
to achieve a perceptually lossless compression, much as mpeg, jpeg, and mp3
formats provide for video, images, and music.

obj2cg uses the ObjectFileCompressor class with quantization defaults which are
probably too aggressive for some applications; if the visual quality isn't good
enough, try calling ObjectFileCompressor.setQuantization(16, 9, 6), with which
we have had very good results.

Probably the greatest limitation currently is that texture coordinates cannot
be compressed and are ignored.  We will address this by using a new revision of
the compressed geometry format (Level II compression), not yet available to
Java 3D.  The current Level I compressed geometry format is defined externally
to Java 3D, but it is described in Appendix B of the specification.

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