Destructible Environments in Irrlicht

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
QuantumSK
Posts: 15
Joined: Tue Apr 28, 2009 5:21 am

Destructible Environments in Irrlicht

Post by QuantumSK »

Okay, so I've been doing some searching, and I can't seem to find a straight answer as to if Irrlicht has the ability to have destructive environments. I've seen mention of a few things leading to a yes, but no up-front obvious yes.

But I actually have two questions dealing with this.


First, obviously, is if it is do-able with Irrlicht's physics.


Second is how does this work (not asking for code, just a basic summary of how this could be done). Is it mesh warping? Or changing a single mesh into multiple meshes? Just how is it done?



(wasn't 100% on where to post this, but it sounded like a general newbie question dealing with the engine.)
loki1985
Posts: 214
Joined: Thu Mar 31, 2005 2:36 pm

Post by loki1985 »

short run: it is possible, but not out-of-the-box, so you have to code it.

of course integration of an external physics engine is possible, there are several tutorials and examples. but i guess it still requires _some_ knowlegde and learning, haven't done it myself yet tho.

i would say there are essentially 3 ways i could think of to have destructible environments:
a) have the environment consist out of many small objects.
b) convert meshes to smaller sub-meshes in realtime.
c) alter meshes in realtime

for all of these, a physics engine might help a lot i guess,
but i think it still would require a fair amount of development.

i also remember something about a voxel engine which kinda achieved something like that, search the forum for "voxel"...
QuantumSK
Posts: 15
Joined: Tue Apr 28, 2009 5:21 am

Post by QuantumSK »

loki1985 wrote:short run: it is possible, but not out-of-the-box, so you have to code it.

of course integration of an external physics engine is possible, there are several tutorials and examples. but i guess it still requires _some_ knowlegde and learning, haven't done it myself yet tho.

i would say there are essentially 3 ways i could think of to have destructible environments:
a) have the environment consist out of many small objects.
b) convert meshes to smaller sub-meshes in realtime.
c) alter meshes in realtime

for all of these, a physics engine might help a lot i guess,
but i think it still would require a fair amount of development.

i also remember something about a voxel engine which kinda achieved something like that, search the forum for "voxel"...
Yeah, I noticed that nvidia's PhysX would do the trick more than likely, while searching some more after the above post... I wasn't sure if irrlicht came with something similar or not.

Thank you for the information. Once I get my home computer running again, I'll look into integrating a few other physics engines into my irrlicht project.


oh and I came across that voxel topic... it didn't seem to be the type of physics I'm looking for. I'm after something similar (not exact) to Red Faction and the GeoMod stuff.
Kalango
Posts: 157
Joined: Thu Apr 26, 2007 12:46 am

Post by Kalango »

You can also search about the voxels (http://en.wikipedia.org/wiki/Voxel) way of doing destructible meshes. Its, in short words, converting meshes into an array of billboards(like molecules) and being able to erase some.... It does not look as high res as physix or some nice engine but its quick and portable enought...
Here is a video :
http://www.youtube.com/watch?v=z20SjIB4kBA
This is a voxel engine for the DS.
And its obvious that this is an alternative way to do it.

EDIT: Hah! just ignore this post!
FuzzYspo0N
Posts: 914
Joined: Fri Aug 03, 2007 12:43 pm
Location: South Africa
Contact:

Post by FuzzYspo0N »

Just dont be confused, irrlicht does not have physics. Its a graphics rendering engine that happens to support VERY limited collision detection (collision != physics simulations) .

It IS possible, but the engine does not offer that because then my car should be able to dispense coffee as well (its not made for that, its not a game engine).

There are many available physics wrappers and what not, and the concepts are staggering explained all over the internet... Google "destructictible physics in games" and im almost certain you wont be disappointed.

It is possible to use irrlicht, and achieve it, though.
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Post by devsh »

DMM is a commercial example but i dont think you can afford it, better way would be nvidia physX very fast (ultra fast) but causes problems because of no hardware acceleration for linux (drops to software mode and i dont know if that is any faster than newton for example) and the fact that ATI does not run it officially (you can hack the drivers and emulate an nvidia card, but it is a bit of work for people with ATI cards and many people with ATI just wont play your game because of the work that they would have to carry out)
QuantumSK
Posts: 15
Joined: Tue Apr 28, 2009 5:21 am

Post by QuantumSK »

so the general air im getting about destructible physics is that "its not impossible, but its not entirely possible either".... something that an expert can do with some hard work, but someone jumping into C++ after only a few years of off-and-on programming experience should stay away from.



Thank god what I planned on using this for isn't completely reliant on destructible physics :?


PS. PhysX seems to be sort out of the question, because half of the team im working with runs Linux =/
FuzzYspo0N
Posts: 914
Joined: Fri Aug 03, 2007 12:43 pm
Location: South Africa
Contact:

Post by FuzzYspo0N »

You should read up on who knows what they are talking about and who is a plain moron on the internet :P

But : it is possible, using irrlicht. But you have to do it yourself. Its not that hard ACTUALLY. if you just put some effort in.
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Post by devsh »

as far as I am concerned my last post was correct.

I am not a moron and dont be so full of yourself.
netpipe
Posts: 670
Joined: Fri Jun 06, 2008 12:50 pm
Location: Edmonton, Alberta, Canada
Contact:

Post by netpipe »

redfaction had geomorphing down to a T that game had the best multiplayer and whatnot cant wait to see if the new one is anything near the quality of the first. #2 was a letdown
FuzzYspo0N
Posts: 914
Joined: Fri Aug 03, 2007 12:43 pm
Location: South Africa
Contact:

Post by FuzzYspo0N »

I am not a moron and dont be so full of yourself.
If you heard a truck was coming would you jump in front of it? I never said anything about your post at all, if you felt it was toward you thats unfortunate. The word internet != your last post... Its a large place and a long series of tubes.
the general air im getting about destructible physics is that "its not impossible, but its not entirely possible either"
This, is what i was referring to. Either that or Quantum doesnt know how to evaluate things on a realistic scale.
QuantumSK
Posts: 15
Joined: Tue Apr 28, 2009 5:21 am

Post by QuantumSK »

FuzzYspo0N wrote:
the general air im getting about destructible physics is that "its not impossible, but its not entirely possible either"
This, is what i was referring to. Either that or Quantum doesnt know how to evaluate things on a realistic scale.
No i was pretty much saying the general answer I'm hearing is possible but impossible for a beginner without pulling in a separate physics engine.


But if it's not that hard to figure out, then I'll keep this idea in my back pocket for when I'm more accustomed to Irrlicht and C++.
FuzzYspo0N
Posts: 914
Joined: Fri Aug 03, 2007 12:43 pm
Location: South Africa
Contact:

Post by FuzzYspo0N »

No problem, using the external physics engines arent actually that complicated ONCE you do have a grasp of irrlicht and c++... there are a lready a number of wrappers that are around which make it easy, like handing an ISceneNode to the physics function, and it creates a rigidbody for you.

Im hoping to toy with some destructible stuff soon, and if i have anything interesting to show ill post it
QuantumSK
Posts: 15
Joined: Tue Apr 28, 2009 5:21 am

Post by QuantumSK »

ill be looking forward to seeing it, fuzzy.


Sadly, I have to get my home computer running before I can even attempt this, so if you get this figured out, hopefully when the time comes, you wouldn't mind showing me how it works. No obligations, obviously.
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Post by devsh »

are you working on your own game? or do you think you would join my project for a bit to see how physics are done (haven't started on them yet)
Post Reply