i’ve been trying forever, but does anybody have a good way of making decent explosions? for when you shoot/destroy something. any suggestions at all would help
Ha, ha. What exactly is your definition of decent?
I think that a plane with an explosion texture, with “Halo” set and a nice ipo animation makes a semi decent explosion effect. Im sure that someone wrote a tutorial on this already. Did you search the forums?
Also, I suggest looking for a particle effects tutorial, since that’s pretty much what game explosions are.
all i do is make a plane that is set so that it always faces the camera. i put an explosion cloud texture on it like this one
then set that plane to ‘add’ mode. that will make all of the black parts transparent. give it a red or orangeish color.
now i make an ipo that simply makes the plane bigger connected to an always sensor.
whatever adds the explosion plane will only add it for a few seconds. so it looks like the explosion is expanding then it goes away.
it looks pretty decent to me. if you do it right.
particles don’t work in GE. ive tried
ok i’m playing around with the suggestions you guys gave me. yeah i’ve also tried particles, it would be so cool if they did work in realtime lol
RaggingChaos66 & llanowar378>
Lol, you guys really need to use the forum search function.
Particle effects in the BGE are possible:
- Render a particle texture with blender normally
- UV map that texture to a simple plane in the GE
- Go into face select mode (F), and in the “Texture Face” tab select “Halo” (that will make it so that the particles always face to the camera)And presto, real time particle effects.
You can then animate them and do pretty much anything else you could do with an actual particle system.
if i read those directions correctly, you’re just making a plane that displays a prerendered animation of an explosion, not a realtime explosion. what if someone wants a different looking explosion, completely unique every time the game is run. can that be achieved?
Ragman>
Yes, it can be achieved.
Although I was not talking about an animated texture, I was just reffering to an image of an explosion. You would use an ipo to animate the plane on which the texture resides (like making the plane bigger, which would in turn make the texture bigger, all creating the simulation of a blast), but that is only a part of the picture:
By themselves explosions are pretty much all the same (and even when they are not, they happen so fast that you ussually can’t tell), what makes them different is how they effect the sorrounding objects, the pattern of the scatter, etc. Also, an explosion simulation usually consists of more than just one particle, it’s actually a group of particles for smoke, fire, shrapnel etc. Those are the things that will make the explosion look different.
I’m no professional, but if you look (cearfully) at any game that implements explosions, you would see that exact method.
i know, but for the sake of arguement, some new games take advantage of physics processors in realtime explosions, that have the capacity to completely effect their environment. how is this done? and in a semi-related note, how can the affect of realtime shattering glass be accomplished in blender, if it is at all possible.
ah physics prossecors, the PPU, i want one >_<; the explosions that affect their surroundings, I have no idea, the glass, you could probably make a window out of a cube or something, and divide it into several objects, or quite a few, then stack them ontop of eachother, then use physics in the BGE, so when an object hits one of the glass window parts, the whole thing “shatters” I dont really know, I guess it would take alot of messing around with lol
oohh, subdividing no fun. me want make many little random glass fragments. is it possible to do random subdividing and separation in the game engine? someone could then make a script that cuts up an object at random angles, starting at a predefined point of collision, and then separate the object into many solid objects at the cuts. i have no idea how hard this would be to try and implement, if it’s feasible, but it would sure make for really cool in-game shattering effects.
Ragman>
I assume you are referring to the Ageia PhysX PPU;
It’s a dedicated physics processor (meaning it only calculates in game physics and nothing else), therefore it is possible to simulate in depth physics on a much wider level than you could if you ran it all through the main CPU.
Honestly I’m not currently aware of many games that can use such hardware to it’s full potential. Pretty much the only impressive thing that I have seen so far has been the “Cell Factor” demo videos, and a realtime plane crash with a very impresive metal bending and water physics simulation. The whole thing is still very young, but it’s making great progress.
You can shatter glass in several ways, but I would do it like this:
When the blast hits the glass, end the “window object”, and in it’s place add “glass shrapnel” particles (which would just be regular planes, with a nice glass transparency texture).
Have the shrapnell set to have a certain initial velocity, so that when added it would blast out etc. You can tweak it in a whole bunch of ways.
yes and no. that processor rocks, but in reference to the explosions and the complete distructability of environments, i would like to mention an in-progress PS3 game called Stranglehold. a preview from an old issue of PSM states that the entire environment is destructable, from concrete pillars that can be slowly chipped at by hundreds of bullets, to glass that can be shattered multiple times, down to the little fragments being shot and destroyed. i’m pretty sure i already know the answer to this, but are affects like that possible in blender, or in any other free game developers?
It’s a very high probability that there is a way to make something like that work in blender, especially when the bullet engine reaches it’s prime, considering that most of the things you are describing are physics oriented. A “completely” destructable enviroment might be a stretch though.
Some friendly advice:
Stick to simple things for now. You can’t just go into the BGE and churn out next-gen content with a few keystrokes, it just won’t happen.
You are a beginner, all that next-gen stuff is way above your head. Make the best game you can make with the tools you currently have, and then when you have a well rounded development skill set, you can move on to more complex things.
now that hurt. I’m not a beginner in any respect, spending the past five years of my short life learning multiple different programming languages, mastering the simple yet enjoyable TI-Basic, and will be the first and only student in my school’s AP Java 2 course. Python is relatively easy for me, my only limitation is not knowing the capabilities of Blender’s python library, specifically that of GameLogic and the physics package. so, is it too much to ask that people not lecture me about my limits. i’m just searching for knowledge, i’ve got the wisdom.
That is a pretty big limitation, so in that sense you are a beginner in relation to the BGE, don’t you think?
Either way it was not my intent to offend you, so if I did I apologize.
ok, sorry for the outburst. anyway, i understand that the libraries i desire are posted on the web, with each command having an explanation. unfortunately, the computer i do my work on doesn’t have the internet. is there a downloadable version of the game engine’s content explanations?
-can you not just replace an object just before a collision or on a ray hit with a shattered version of the object that uses physics to then fall/blow apart…?
does anyone know how to replace a cube with a cube cut into shards?
You could use the same method to brake the shards into smaller pieces… ie… replace the shards with cut up versions etc… and you have a destructable enviroment? Simple!
There was a nu physics demo that adds in multiple objects…
http://www.continuousphysics.com/ftp…-preview33.zip
I dunno how to script it in… but if anyone can show me how do it I would be eternaly gratefull!!
RagMan>
No problem, im glad we understand eachother.
Im not sure about your documentation problem; Your on the internet when you post, so shouldn’t you be able to view the docs online?
Well in any case; You can definitelly download the docs from the blender site. I also found a nice little pdf file that might help you out here: http://www-users.cs.umn.edu/~mein/blender/gamelogic.pdf
I think it’s possible, although I never did it that way because “any” shrapnel would usually give a good sense of a blown up object. So I never really had to add the exact replica of the object shattered, but I guess you can do it that way. (be warned; more shrapnel = game slowing down)
I can’t say that I do. Also im not sure if the add object actuator can spawn more than 1 object at a time. I simply use the add object actuator to spit out shrapnel 1 at a time, but it happens so fast that the shrapnel particles bump into eachother and therefore scatter in an explosion like matter anyway.
Absolutely, but as I said im not sure if you can do this with an add object actuator.
hey I got a nice shattering effect by using the original object to add in an empty with other empties parented to it.
The second set of empties add in the broken shards when the original object collides -(by copying properties from origional object that collides to second set of empties)- with ground and dies… will make some interesting stuff and post it…
you could do the same thing again to the shards… making it shatter into smaller pieces… well not too many… don’t want to bog down the frame rate to much.
Only thing is it’s quite a process of setting up all the shards and empties… a script that can do all that would be cool… i.e. it cuts up your object into shards puts empties at their centers… etc
could build some cool things like collapsing pillars when something nocks into it?