There has been a number of questions on the alias over the past few days
about the large size of the j3f files produced by the SceneGraph IO
prototype API.

J3f files can be very large when compared to the 'same' data stored in a
3DS or Vrml file. There are a number of factors which cause this discrepancy...

1) The J3f file contains all the data in the scenegraph, this includes ALL
   textures etc, other formats have textures in seperate files.

2) Many of the Java3D Loaders add lots of data to the scenegraph that was not
   directly in the original data file.

   For example, the Sun logo test file that ships with Fly Through original
   3ds file size is 226Kb, the j3f file is 807Kb. On further investigation
   I found that the data in the 3ds file is stored in an Index form with
   5625 vertices (3 floats) and 11162 faces (3 shorts) which requres 134K.

   When the loader processes this data it unindexifies the data generating
   33486 vertices and adds a normal to each vertex (6 floats per vertex),
   this requires 803K !

   And sure enough changing the loader to create an IndexedTriangleArray
   instead of a TriangleArray (still with normals) results in a j3f file
   size of 253K.


So if you want to minimize the size of j3f files generated from your scenegraph
you should ensure that the data in the scenegraph is in the most compact form
and be very careful when comparing the 'same' data in different file formats.

Rgds

Paul

----------------------------------------------------------
Paul Byrne                      Email : [EMAIL PROTECTED]
Sun Microsystems                Phone : (650) 786 9926
Visualization Software Group    Fax   : (650) 786 5852
----------------------------------------------------------

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