Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (482)
Games in Android Showcase (110)
games submitted by our members
Games in WIP (547)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1] 2
  ignore  |  Print  
  Particle System (BIS)  (Read 5246 times)
0 Members and 1 Guest are viewing this topic.
Offline Java Cool Dude

Senior Member




Java forever


« Posted 2003-11-05 11:31:14 »

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 Tongue

PS: That's the Java3D version, XithD's runs a hell lot faster
Offline Java Cool Dude

Senior Member




Java forever


« Reply #1 - Posted 2003-11-05 14:18:58 »

will post the entire code tonight Smiley
PS: Will include presets for magma, flame, water etc Wink
Offline Java Cool Dude

Senior Member




Java forever


« Reply #2 - Posted 2003-11-05 17:55:18 »

Enjoy fellas Grin
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 Smiley.
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....
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline William Denniss

JGO Coder


Projects: 2


Fire at will


« Reply #3 - Posted 2003-11-05 20:07:58 »

Quote

Finally, oh boy, Xith3D beats Java3D pretty bad....


So just how badly is Java3D beaten?

Looks great.

Will.

Offline Java Cool Dude

Senior Member




Java forever


« Reply #4 - Posted 2003-11-05 20:29:41 »

/me Recommands the downloads of the binaries 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.
Smiley
Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #5 - Posted 2003-11-05 20:45:33 »

Quote
but the truth is, when the fire effect is selected, Xith3D averages 11xx fps whereas Java3D does in the low 500.
Smiley

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.

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline aNt

Senior Member




AFK


« Reply #6 - Posted 2003-11-05 20:57:46 »

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.<init>(particlesTest.java:106)
     at particlesTest.main(particlesTest.java:83)
Exception in thread "main"

winxp - GeForceTi- tip top.. newest cvs xith3d build Smiley
so thats 2 that dont run on me 'puter.
Offline desertrock

Senior Newbie





« Reply #7 - Posted 2003-11-06 06:26:18 »

aNt:

seems that you are able to break every particlesystem out there  Grin

Java Cool Dude:

funny this one looks very similar to my particlesystem.
Offline Java Cool Dude

Senior Member




Java forever


« Reply #8 - Posted 2003-11-06 06:34:47 »

Quote

funny this one looks very similar to my particlesystem.


Disturbing indeed, twins? Grin
Offline Java Cool Dude

Senior Member




Java forever


« Reply #9 - Posted 2003-11-06 11:00:37 »

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:


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
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline silverklyph

Senior Newbie




Java games rock!


« Reply #10 - Posted 2003-11-06 17:26:13 »

Quote
aNt:

seems that you are able to break every particlesystem out there  Grin




Hey! I resent that remark!  I got the same message =(
  Any clue what's wrong?
Offline Yuri Vl. Gushchin

Senior Member




Speak Java!


« Reply #11 - Posted 2003-11-06 18:23:04 »

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

Yuri Vl. Gushchin
JProof Group
Offline Yuri Vl. Gushchin

Senior Member




Speak Java!


« Reply #12 - Posted 2003-11-06 19:06:56 »

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

Yuri Vl. Gushchin
JProof Group
Offline aNt

Senior Member




AFK


« Reply #13 - Posted 2003-11-07 08:03:21 »

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

Senior Member




Java forever


« Reply #14 - Posted 2003-11-07 09:19:24 »

@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
Offline bmyers

Junior Member





« Reply #15 - Posted 2003-11-07 09:59:29 »

Nice job, Java Cool Dude!  Looking forward to the next "shock and awe" build! Shocked

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!  ;-)

--Brad

Offline Java Cool Dude

Senior Member




Java forever


« Reply #16 - Posted 2003-11-16 20:58:17 »

Forget the "S & A" bs from now on I should limit my ambitions Cry

Source coming soon
Offline goosebump

Senior Newbie




Java games rock!


« Reply #17 - Posted 2003-11-16 21:06:54 »

Great job dude Smiley,
goosebump.
Offline Java Cool Dude

Senior Member




Java forever


« Reply #18 - Posted 2003-11-16 21:34:52 »

Thanks man Smiley
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 Smiley.
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 Smiley
Offline Java Cool Dude

Senior Member




Java forever


« Reply #19 - Posted 2003-11-17 02:04:19 »



Java3D version
Xith3D version

Xith3D build is twice as fast as Java3D's.
Enjoy fellas, and again sorry for the let down Cry
Offline shochu

Junior Member




Java games rock!


« Reply #20 - Posted 2003-11-21 22:07:46 »

FOr some reason the color settings don't seem to work.  Did I just get the wrong version?  The color always seems to be a mix of purple and yellow regardless of the settings.
Offline Java Cool Dude

Senior Member




Java forever


« Reply #21 - Posted 2003-11-22 05:06:40 »

You have to update your Xith3D.jar Wink
I was the one who discovered that bug in setColors with the previous builds, but it's been fixed with November the 13th release Smiley
Offline shochu

Junior Member




Java games rock!


« Reply #22 - Posted 2003-11-22 14:17:21 »

WHere do we get the new xith3d.jar  
I've been checking out xith3d from cvs so I assumed I would have the newest stuff all the time but I just checked and my xith3d.jar is from october 11th.  

I'm connecting to cvs through the server

cvs.dev.java.net/cvs as a guest

then I go to the xith3d folder and check it out as a project.

Am I going to the wrong cvs??


Also,

could you explain to me briefly what the updateMatrix() method does in ParticlesManager.java.  What is it used for? All the variables and such just make no sense to me and it's a pretty long method.
Offline Jens

Senior Member




Java for games!


« Reply #23 - Posted 2003-11-22 14:24:36 »

If you use CVS you need to build xith3d.jar yourself. This requires Apache Ant. If you already have it, just type "ant" in the Xith3D base directory.

Java Cool Dude probably downloaded the release here.

Xith3D Getting Started Guide (PDF,HTML,Source)
Offline shochu

Junior Member




Java games rock!


« Reply #24 - Posted 2003-11-22 15:08:03 »

I'm pretty new to ant would any of you know what this error means.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
Buildfile: C:\Program Files\eclipse\workspace\xith3d\build.xml

clean:
        [echo] cleaning ./classes

recompile:

setup:

compile:
        [echo] compiling source files
        [echo] javaexe: C:\Program Files\Java\j2re1.4.2_02/bin/javac
       [javac] Compiling 350 source files to C:\Program Files\eclipse\workspace\xith3d\classes
       [javac] javac: invalid flag: C:\Program
       [javac] Usage: javac <options> <source files>
       [javac] where possible options include:
       [javac]   -g                        Generate all debugging info
       [javac]   -g:none                   Generate no debugging info
       [javac]   -g:{lines,vars,source}    Generate only some debugging info
       [javac]   -nowarn                   Generate no warnings
       [javac]   -verbose                  Output messages about what the compiler is doing
       [javac]   -deprecation              Output source locations where deprecated APIs are used
       [javac]   -classpath <path>         Specify where to find user class files
       [javac]   -sourcepath <path>        Specify where to find input source files
       [javac]   -bootclasspath <path>     Override location of bootstrap class files
       [javac]   -extdirs <dirs>           Override location of installed extensions
       [javac]   -d <directory>            Specify where to place generated class files
       [javac]   -encoding <encoding>      Specify character encoding used by source files
       [javac]   -source <release>         Provide source compatibility with specified release
       [javac]   -target <release>         Generate class files for specific VM version
       [javac]   -help                     Print a synopsis of standard options
BUILD FAILED: file:C:/Program Files/eclipse/workspace/xith3d/build.xml:68: Compile failed; see the compiler error output for details.
Total time: 1 second


Is it getting confused cause I'm on windows and there is a space in the directory path (c:\program files)?
Offline Java Cool Dude

Senior Member




Java forever


« Reply #25 - Posted 2003-11-22 16:03:02 »

could you explain to me briefly what the updateMatrix() method does in ParticlesManager.java.  What is it used for? All the variables and such just make no sense to me and it's a pretty long method.

Ooops looks like I have to change the variable names in that method, the way they are now reflect how much trouble I went through to set it up and get it all working Tongue.
What it does basically is rotating the up vector (0,1,0) so that it's aligned with the emission direction.
I could have skipped that part and implemented a method where you have to input the x,y and z angles of rotations to get the emitter shooting in a certain direction, but that would make it a bit harder for my coworkers to implement it in our current project.
Especially the case where particles have to come from a volcano on a non-flat planet (sphere).
Offline Yuri Vl. Gushchin

Senior Member




Speak Java!


« Reply #26 - Posted 2003-11-22 16:57:40 »

Quote
Is it getting confused cause I'm on windows and there is a space in the directory path (c:\program files)?


Yes, exactly.

Check the value of JAVA_HOME environment variable and set it to JDK 1.4.2 home (say, on Windows machine I have

JAVA_HOME=C:\j2sdk1.4.2_01\

Then it should work [again, hopefully].

Yuri

Yuri Vl. Gushchin
JProof Group
Offline William Denniss

JGO Coder


Projects: 2


Fire at will


« Reply #27 - Posted 2003-11-22 23:37:55 »

why microsoft uses spaces in important system directories I will never know.

Will.

Offline Java Cool Dude

Senior Member




Java forever


« Reply #28 - Posted 2003-11-23 06:15:38 »

First attempt at WS:
Does this work?
Pretty much done with this demo, time to move on to something else Smiley
Online kevglass

JGO Kernel


Medals: 153
Projects: 23
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #29 - Posted 2003-11-23 07:07:05 »

Fraid not, looks like your webserver isn't configured with the correct MIME type mappings. Either get your admin to modify the apache/iis settings or use a PHP/Perl/JSP frig to modify the MIME type dynamically

<ego_plug>
This might help if you haven't seen it before:

http://www.cokeandcode.com/info/webstart-howto.html
</ego_plug>

Kev

Pages: [1] 2
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

atombrot (26 views)
2014-08-19 09:29:53

Tekkerue (24 views)
2014-08-16 06:45:27

Tekkerue (23 views)
2014-08-16 06:22:17

Tekkerue (13 views)
2014-08-16 06:20:21

Tekkerue (20 views)
2014-08-16 06:12:11

Rayexar (59 views)
2014-08-11 02:49:23

BurntPizza (38 views)
2014-08-09 21:09:32

BurntPizza (30 views)
2014-08-08 02:01:56

Norakomi (37 views)
2014-08-06 19:49:38

BurntPizza (67 views)
2014-08-03 02:57:17
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!