Animated Quad

Do you have an example to explain how to use it with the associated resources ?

Yes I will try to post it later today.



But its quite simple. You need a texture with the different parts of the animation (16 images in my code).  The Node with its controller can be placed anywhere in your scene and will immidiatly display the explosion.

Hi middy,



I tried your code yesterday and it works fine…



the problem i have is where can I get more of those textures ?

I have a program that can be used to create explosions… Message me and I'll send it eventually  :smiley:

middy said:

I have a program that can be used to create explosions..

Written yourself? Care to post a result screenshot?

Nope its written by some guy… perhaps I can dig up his website…





Here we go enjoy



http://www.geocities.com/starlinesinc/index.html

Ugh, at a glance that looks to be a 2-dimensional image animation sequence instead of particle effects of an explosion.  If you take a look at the jME source code you can see an example using particle effects to create an explosion.  This uses a single texture for the look of the particles and generates the explosion based on that…MUCH more realistic and much better in just about every way.



As a side note, jME-Physics supports explosions as well.  What's even cooler about this is that it's a single line of code to add the physics of an explosion to your scene. :slight_smile:



darkfrog

Yeah but particle explosions are relatively exspensive because particles eat alot of CPU. Last time I tried one had to use quite a few particles to create a nice effect.



So this is a way to optimize speed and perhaps loose some coolness.  :slight_smile:





Besides I am working on combining the quad with particles creating debree flying everywhere

Losing coolness is never an option. :-p



Just kidding, yeah, I understand your point but particle effects just add so much to the game I personally think they are worth the extra tweaking to make the game work with it. :slight_smile:



darkfrog

Maybe someone can make up an animated imposter? One could use that to render a particle-system-explosion to be shown by quads then…

That might be a good idea.  Another way I've seen done is to have an explosion texture on a sphere and the explosion is just that sphere growing from very small to large…kinda hokey but I would assume performance can be gained from it.



darkfrog

Hi,



I'm quite a noob and have problems with texture handling.

The code from middy dont work with jme 2.0 anymore, so can someone give me a hint how to translate the code?

Particularly the code from the controller is importend for me.



milchmann