Darrin,

First I think you'd have to decide whether you want lossy or lossless
compression.  You're going to always have a trade-off issue between
network performance vs amount of data you send.  i.e. there is no
"magic" solution that is going to send huge models without some loss of
information.  You might consider using a format that is more efficient
(3DS) and then compress that.  There are a lot of variables however that
are going to influence the effectiveness of any particular result.

If you have a lot (150,000) of triangles you can look at the various
ways of representing these triangles.  At the worst case each triangle
has three vertices and three values per vertex (X,Y,Z).  (I'm assuming
no color or lighting information)  You could use TriangleStrips to
reduce the number of vertices (with the right model that can be very
effective).  You could represent the coordinates using less precision.

- John Wright
Starfire Research

Darrin Smith wrote:
I have some large models that need to be displayed in a Java3D applet. The
files are 8 or 9 meg each in .obj format, and two will be needed each time
the applet runs. What happens is the applet calls back to a servlet using
a URL that has a file name (the name of the 3D image) attached as a
parameter.

Sending 16 to 18 megabytes of data across an Internet connection is not an
option.  It might be possible to reduce the triangle count (around 150,000
each now) to get the models smaller, but I'm hoping that some sort of
compression routine will work instead.

Zipping these files yields a result of about 2.5 to 3 megabytes each.
Much better, but still quite large.

Using the Java3D compression mechanism (objtocg) works VERY well as the
files get down to around 400K to 600K, but the CompressedGeometryFile was
not written to allow the use of URLs.  It only works with
RandomAccessFiles and local Files given as a string (this, IMHO, is a
serious oversight on Sun's part, and a real shame given its potential).
This was mentioned in this groups archives here:
http://archives.java.sun.com/cgi-bin/wa?A2=ind0009&L=java3d-
interest&P=R60640&I=-3

Note that I have tried to create a RandomAccessFile as a temporary File on
the applet side (using a signed applet) to receive the InputStream from my
servlet, but the results were slower than sending the uncompressed images
(much slower in fact).

So, can someone tell me a good way to send large files across the
Internet? Surely this has been done before, but I didn't find much
searching the archive.

Thank you for any help you can provide!

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


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