> Date:         Tue, 3 Oct 2000 21:14:14 GMT
> From: david Xia <[EMAIL PROTECTED]>
>
>    I use OBJ loader class to load big myfile.obj(over 2Mb), it takes long
> time for SUN machine to run the program, later I  will load even larger obj
> file, I wonder if there is any way to speed up the running process, using
> cache? or something else? How to do that?

The .obj format is plain text and can take a long time just to read and parse,
plus there is additional processing to create J3D node components.

Although there are limitations to it, you might consider compressing your
geometry with the GeometryCompressor utility class and saving the results in a
CompressedGeometryFile instance.  CompressedGeometry is directly supported by
J3D as a node component so you get a lot of overhead out of way during the
compression process.

For example, I sometimes use a fairly large .obj file for testing, 1668926
bytes.  On a dual-processor Ultra-2 @300Mhz, ObjLoad takes about 34-35 seconds
to load it and display it.  Compressed, the file is 469480 bytes, and the
cgview example program takes 9 seconds to load and display it using the Java 3D
software decompressor.  The Java 3D software decompression itself takes about 2
seconds with the above example.

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