Thanks for your reply Daniel.

Currently the total scene I am to visualize is composed of around 3000 triangles
and more than 50 different textures. The modellers is not ready yet however, so
in the end we will probably see the triangle count double and the texture count
rise as well. I think that every triangle in the scene will have a texture
applied, but some textures will be reused.

This is my first Java/Java3D project allthough I have some experience from other
scene-graph API:s like SGI:s Performer. Until now I have mostly worked on my own
loader for the models and one could say it is in a pre-alpha status. I wanted
everything to work first, and then move into optimizing.

Currently I handle every single triangle independently as a vector of
TriangleArray:s. After creating a Shape3D of them I attach them all (3000) to
the same BranchGroup. Because the model from the beginning is created as a tree
with several levels (objects and groups) I plan to adopt the loader to this at a
later time.

In a test comparing having all the geometry in a single IndexedTriangleArray
Shape3D compared to having it in separate TriangleArray with one triangle each I
have applied the same texture on all the faces. Running in a small window I get
around 15 fps with a single IndexedTriangleArray while I get just above 1 fps
with separate ones. With less complex models the difference is much smaller. But
I have tried other models (spheres and cylinders) with high triangle count as
well, and I can get more than 20 times as good performance by using a single
IndexedTriangleArray.

I'm running a PentiumII/300 computer with a Permedia2 card. But beacuse I'm
using Win2000 RC2 and not having any OpenGL-compatible drivers for the graphics
card I get very bad performance when having a big window. But by running in a
very small (100x100 pixels) windows I thought I could isolate the scene-handling
and T&L performance from the actual drawing that's normally done by hardware.

So, do you have any thoughts what I can do to improve my applications
performance?

Regards!
/Per Burstrom

Daniel Selman wrote:

> Per,
>
> > Is it possible, in any way, to have different textures on different
> > Geometry components of a Shape3D object?
>
> In the current implementation of Java 3D it is not. Textures are associated
> with Appearances and each Shape3D references a single Appearance.
>
> Even if/when the 1.2 Shape3Ds become available that allow a Shape3D to have
> child Shape3Ds (presumably each with their own reference to an Appearance) I
> would not expect much of an improvement in performance over multiple
> independent Shape3Ds - particularly if each has a unique texture.
>
> I'd be interested to hear the rationale behind your performance concerns.
>
> Sincerely,
>
> Daniel Selman
>
> [EMAIL PROTECTED]
> http://www.tornadolabs.com
>

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