irrlicht and physics 100% interegation?

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
RustyNail
Posts: 168
Joined: Fri Jun 02, 2006 1:49 pm
Contact:

irrlicht and physics 100% interegation?

Post by RustyNail »

:?: Just an Idea. :oops:
Could/Would someone extend irrlicht to use Newton, ODE, ect... as it does with OpenGL, DX, and the software renderers? Would make life a lot easier for developers... (of course my opinion only... might make it harder i don't know...) (provide a wrapper, I think that is what it is called?)

I don't know, would it have any advantages? :?:
...

sorry if I offend you with my n00bness... :cry:
I have recently discovered that both the Flu and my Algebra teacher have exact the same effect on my health: it quickly degrades.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Irrlicht is a graphics engine, you want to add physics engine which would make a game engine (not really, but half way). It's simply a different thing you could easily start yourself. However, it's often best to build a framework using the underlying engines instead of tightly binding all things together. Only if you have major performance drop you should think about optimizing such cooperations, otherwise keep them separated for the sake of maintenance.
Eternl Knight
Posts: 313
Joined: Tue Nov 01, 2005 5:01 am

Post by Eternl Knight »

Well, I would have to disagree with Irrlicht being only a graphics engine (after all there is built-in collision detection, GUI, and input handling) - however, for the purposes of this question, I will agree with hybrid.

Irrlicht is not a "game engine" per se, and as such does not integrate all that is required for game development (for example, there is no networking, no sound support, no movie clip display, etc). And physics is one of those things that is tweaked to hell and back for individual games. Most games do not need (and/or cannot afford the CPU cost of) a fully generic physics engine. Doom 3 had a cut-down, hand-coded physics engine. BloodRayne 2 hacked the buggery out of ODE. Half Life 2 had a custom wrapper around Havok. The list goes on.

My point is that what physics engine you use, and to what degree it conforms to "real physics" (i.e. what hacks & limitations you code into it) can vary wildly from game to game. As such, even if Irrlicht was a game engine, adding a physics engine to Irrlicht would only be a stopgap until you replaced it with something better for the game.

If my minor rant does not dissuade you - try the MyWorld port/distro of Irrlicht. The developer of that has integrated ODE into the engine and put the source code online. :)

--EK
etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

Post by etcaptor »

Yet, Irrlicht design must enable using of some physics engine without recompliling of Irrlicht. For example right now it is possible only when physics is designed like Irrlicht animator.
Another possibility is to add some ISceneNode fuction like void * getPhysicsBody()
ImageImage
Site development -Rock and metal online
--- etcaptor.com ------freenetlife.com
Eternl Knight
Posts: 313
Joined: Tue Nov 01, 2005 5:01 am

Post by Eternl Knight »

Actually - I think it already does provide for use with a physics program. At the very least, I have found no problem with using it in my physics simulations.

The way I see it - Irrlicht is a presentation & user input system. As such, stuff outside that arena is outside Irrlicht. The way it works in my system (and in most engine's I've had examind source code to), there is anm "Entity" class that encapsulates the "free bodies" of the virtual world. this entity class has a pointer to the physics object, a pointer to the controller (be it AI or controlled by user input), a pointer to the graphics engine representation, etc.

*shrug* Obviously your mileage may vary, but a function such as the one you describe is unnecessary for all but one application I have developed using Irrlicht.

--EK
omaremad
Competition winner
Posts: 1027
Joined: Fri Jul 15, 2005 11:30 pm
Location: Cairo,Egypt

Post by omaremad »

why do we need physics engines anyway?

unless if we are making a racing game or we need ragdolls you can easily modify the irrlicht collison detctor to add velocity to an object in the direction of the normal of the hit polygon.

meaning now you can have bouncing boxes etcc... what most of us use physics engines for.

if it is slow replace the point in triangle function with one based on dot products rather than trig
RustyNail
Posts: 168
Joined: Fri Jun 02, 2006 1:49 pm
Contact:

Post by RustyNail »

Thanks for the feedback, (Seriously, this forum is hundreds of times frendlier than any I have ever posted on 8) )

Okay, I know the irrlicht is an graphics engine, but who said niko would have to do it?

Many other people have the ability (unlike me... At least now) and it was just an idea... :oops:
I have recently discovered that both the Flu and my Algebra teacher have exact the same effect on my health: it quickly degrades.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

You suggested to extend Irrliht in this way. If you just want to use any of the existing physics engines with Irrlicht: Just do it. There are several existing implementations and tutorials how this works. And also some frameworks.
Eternl Knight
Posts: 313
Joined: Tue Nov 01, 2005 5:01 am

Post by Eternl Knight »

If you are after an Irrlichth distro with built-in physics - take a look at my first post. I mentioned the MyWorld project. Which is (as far as I can tell) basically your standard Irrlicht code with ODE integrated.

That should provide you with something to get you started :) Pretty much anything above & beyond what he's done in that project would be application specific (at least if you are using ODE)

--EK
RustyNail
Posts: 168
Joined: Fri Jun 02, 2006 1:49 pm
Contact:

Post by RustyNail »

Okay, thanks.
I'll look at it...
:)
I have recently discovered that both the Flu and my Algebra teacher have exact the same effect on my health: it quickly degrades.
Post Reply