I downloaded last week an C++ OpenGL written particle system demo and i
decided to write a particle system in Java 3D. The C++ OpenGL demo is using
about 150 to 200 particles and getting by 640x480 at 32bpp 210 FPS. The one
i tried to make in Java3D is making 40 FPS in the same system with 135
particles (without doing any scales on the particles or any transparency
manipulation). This is a huge difference.
I profiled the example and the result was: 1000 Frames took about 26
seconds. 14 seconds were spent in the TransformGroup.setTransform(...) of
the particles update method. I think this is too much and it looks like the
method blocks because of some synchronisation. Maby I am interpreting or
doing something wrong ? so feel free to comment.
I attached a zip file with both the OpenGL and the Java3D examples. I hope
that no one is upset about that. If you have any suggestions to make the
JAVA3D example faster or any comments I will be delighted to hear from you.
In the OpenGL demo you can switch between the demos pressing the keys 1-8.
Number 2 is the one close to what the Java3D demo does.
Thank you
Fouad.
<<particleSystem.zip>>
particleSystem.zip