Hi!
My name is Michael Panin (aka @marsermd) and I am making a unity plugin for creating physical realistic explosions. I’ve watched official tutorials and I’ve looked into asset store and I am terrified.
The most popular way to emulate an explosion effect is to apply an explosion force to all objects in some radius, which is nice and easy, but not accurate.
For example if there is a wall between explosion center and some object, explosion force will be applied to this object though it shouldn’t.
I introduce ray based approach for explosions simulation. It doesn’t include complicated physics emulation, so it is not accurate as well. But it is much better than using OverlapSphere.
So. Let’s check out situations where ray based approach could be useful.
explosion on the one side of the wall and object on the other side. Check out my masterpiece:
explosion impact through reflection
explosion force which affects only part of an object
Okay. Now you know that I can… khem… Draw. But I have something done as well. Check out this video.
So I am creating a free explosion pack and I’d like to know: what do you think about it, guys? Should I add something? Maybe my particle effects suck (yes, they do ): ) Maybe I should add something?
In a few days I’m going to publish following pack:
explosion script itself and an API to add effects onto it
HI, hopeful. Thank you for your reply.
Obviously, behaviour of my algorythm depends only on colliders, not meshes, so it will behave depending on colliders generation. AND my algorythm spreads explosion over time(as in real world). So if the wall is destructed/damaged in fixedTimeStep number n, explosion will affect objects behind the wall and generated wall parts in fixedTimeStep number n+1. I don’t have destructable items, so I can’t make an appropriate demo scene, but you’ll have the ability to play around after the release. The code will be included and won’t be obfuscated.
The energy absorbation is easy to implement because after the ray hits the surface, a new ray is emitted. At this place we could change the energy of emitted ray if necessary. But, I guess, the absorbation should differ based on some surface parameters. That’s what i don’t whant to implement because it’ll slow down the hole algorythm(every hit should get some info about components of the hitted mesh. It doesn’t sound like a fast thing). But, as i said, it is easy to implement.
Can’t wait, this is looking amazing so far and will be a great edition to a Game im making which needs realistic explosion’s! So glad I came across this
Thank you very much)
Your qustion is not so easy to answer.
Speed of my physics implementation algorythm depends greatly on raycasting speed. And it depends on count of colliders in neighbourhood of the exploding body. There is no problem to explode about 500 explosives in a box at once though.
Moreover. The explosion is spread over time(as in real life), so the cpu consuming operations are well dispersed.
3d heatwave generation is an expensive operation, wich lacks speed. But it is well tweakable, so may be optimized in cost of it’s realistics.
2d heatwave is very fast.
Pseudo volumetric explosion is about 20 spheres that are scaled over time. With special shaders attached of course. It is as fast as moving 20 mid resolution objects around.
Particle effects are pretty basic and work really fast.
Thanks;) Yes, it’s free. It’s my habit. When I join a community, I create something free and useful and check out the reaction.
P.S.
I’d love to see your review after you have used my plugin)