Particle System (BIS)

Ok I’m sorry if I looked like I’m crapping on the other guy’s thread, that was not my intention.
Anyways, playing around a bit with my particles factory, I managed to created very realistic flames that dance in the wind :stuck_out_tongue:

http://www.realityflux.com/abba/flameJ3D.jpg

PS: That’s the Java3D version, XithD’s runs a hell lot faster

will post the entire code tonight :slight_smile:
PS: Will include presets for magma, flame, water etc :wink:

Enjoy fellas ;D
JCD Particles system: Java3D
JCD Particles system: Xith3D

There are 3 different pre-settings such as Fire, Magma and water fountain.
If you manage to figure a killer combo, please let me know :).
While doing the conversion, I noticed that Xith3D tends to modify the colors input values by itself when receiving an array of em, and hence forcing me to do a per vertex color update.
I also noticed that Xith3D default viewing port is different than java3D’s therefore I had to play around with the z values to have em look similar.
Finally, oh boy, Xith3D beats Java3D pretty bad…

So just how badly is Java3D beaten?

Looks great.

Will.

/me Recommands the downloads of the binaries :stuck_out_tongue:
Seriously, Xith3D is twice and more as fast as Java3D.
Well running J3D at 50 fps and Xith3D at 100 sounds lame for a “twice” as fast, but the truth is, when the fire effect is selected, Xith3D averages 11xx fps whereas Java3D does in the low 500.
:slight_smile:

[quote]but the truth is, when the fire effect is selected, Xith3D averages 11xx fps whereas Java3D does in the low 500.
:slight_smile:
[/quote]
At that high fps, the difference between 1000fps and 500fps is tiny, since time deltas and fps do not have a linear relationship.

Also, with that many particles you’re almost certainly hitting fill rate limitations than the actual API problems.

java.lang.NoClassDefFoundError: net/java/games/jogl/GLEventListener
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:250)
at java.net.URLClassLoader.access$100(URLClassLoader.java:54)
at java.net.URLClassLoader$1.run(URLClassLoader.java:193)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
at com.xith3d.render.jogl.RenderPeerImpl.makeCanvas(RenderPeerImpl.java)
at particlesTest.(particlesTest.java:106)
at particlesTest.main(particlesTest.java:83)
Exception in thread “main”

winxp - GeForceTi- tip top… newest cvs xith3d build :slight_smile:
so thats 2 that dont run on me 'puter.

aNt:

seems that you are able to break every particlesystem out there ;D

Java Cool Dude:

funny this one looks very similar to my particlesystem.

Disturbing indeed, twins? ;D

Alright either Yuri or David: in the links below there is the original Java3D demo along with the exact Xith3D port where the color bug is highlighted
I managed to fix it by using setColor instead of setColors.
Could you please look into that?

New updated files:
Java3D
Xith3D Buggish
Xith3D Fixed

Few screenshots:

http://www.realityflux.com/abba/Java3DParticles.jpg

http://www.realityflux.com/abba/Xith3DParticles.jpg

I’ll let you guess which one is running the Xith3D library and which one is running on Java3D.

PS: Orangy, in Java3D case I’m not hitting the fillrate cap because if it was so, Xith3D frame rate would be limited as well :wink:

[quote]aNt:

seems that you are able to break every particlesystem out there ;D
[/quote]
Hey! I resent that remark! I got the same message =(
Any clue what’s wrong?

Color bug found and fixed. Check the current CVS HEAD for update (changed file is src\com\xith3d\scenegraph\GeomContainer.java).

JCD, thanks for clear reproduction procedure for this bug.

Yuri

One more question: which Java3D version do you use for performance comparison?

I increased number of particles 100 times (placed 10000 particles instead of 100 in original demo) and got ~ 8 fps (GeF 440 Go, P4-1.8GHz, 32bpp) on both Xith3D and Java3D (OpenGL version).

After some investigation, I figured out that this is exactly the result we should get in this case - scene is very simple (only one Shape3D node), and system spends majority of the time in particle manager and OpenGL.

I think that there may be a difference between DirectX and OpenGL versions of Java3D (I did not test this demo with Java3D/DirectX yet).

Yuri

oops my fault i forgot to add jogl to the classpath in JBuilder. all works and looks fantastic!

@Yuri: I use the 1.3.1 Opengl SDK.
It’s totally normal to see both Xith3D and Java3D stand equally since the bottle neck is the CPU at such high polygon count.
I optimized the demos today and could manage to bridge the gap a little more performance wise.
Anyways my next major update will make a big “shock and awe” effect :wink:
Cough smoke rain snow physics etc Cough :wink:

Nice job, Java Cool Dude! Looking forward to the next “shock and awe” build! :o

D’you think you could mention your particle system on the Java3D forum? Not everybody checks both the Xith3D and Java3D forums, and Java3D readers could use some good news as well! :wink:

–Brad

Forget the “S & A” bs from now on I should limit my ambitions :’(

http://www.realityflux.com/abba/newparticles.jpg

Source coming soon

Great job dude :),
goosebump.

Thanks man :slight_smile:
I reworked most of my old code, took off some “useless” functions and I added tons of new ones.
I decided to go against implementing rain and snow in this build because of some annoying issues that demand nasty work arounds.
Instead, I put together a little demo that simulates snow and it looks pretty sharp :).
Physics, number of particles set at runtime, dynamic updating of textures, smoke effects, Emission Direction are all new additions over the previous version.
Stay tuned for more updates :slight_smile:

http://www.realityflux.com/abba/sample.jpg

Java3D version
Xith3D version

Xith3D build is twice as fast as Java3D’s.
Enjoy fellas, and again sorry for the let down :’(