IrrODE - an Irrlicht - ODE wrapper (now with SVN)

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
Brainsaw
Posts: 1183
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

Nice to hear you succeeded. Should I include the lib in the download-version of IrrODE? If I did so you could also provide the VC2005 project files.
Dustbin::Games on the web: https://www.dustbin-online.de/

Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
Zurzaza
Posts: 153
Joined: Fri Mar 26, 2010 9:41 pm
Location: Filo (FE), Italy
Contact:

Post by Zurzaza »

Yes, of course...you can add that to your project archive :D
Ok, i also included the .sln & .vcproj file.
You can download them from previous link (Link).
I remember that, if you want to compile, you need to re-set the include folders (see readme).
Brainsaw
Posts: 1183
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

OK, I included your project, your libs and your readme file into the package and uploaded it. Thanks for the contribution.
Dustbin::Games on the web: https://www.dustbin-online.de/

Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
Zurzaza
Posts: 153
Joined: Fri Mar 26, 2010 9:41 pm
Location: Filo (FE), Italy
Contact:

Post by Zurzaza »

OMG, i need your help again brain :lol:
I didn't understand correctly the defference between the "Geom" Objects of IrrOde.
Can you make a little documentation about (what this object can/cannot do):
# CIrrOdeGeomBox()
# CIrrOdeGeomCapsule()
# CIrrOdeGeomCylinder()
# CIrrOdeGeomHeightfield()
# CIrrOdeGeomPlane()
# CIrrOdeGeomRay()
# CIrrOdeGeomSphere()
# CIrrOdeGeomTrimesh()

I understood what means Box,Sphere, Cylinder...particulary i can't find a nice definition about trimesh...when to use it? when to use another Geom object?

Thank you again :P
grunt
Posts: 96
Joined: Tue Aug 17, 2004 9:14 pm
Contact:

Post by grunt »

A trimesh is for something like a bsp map. The other geoms you can user for more simple things to approximate them.
Brainsaw
Posts: 1183
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

Let me put it in other words: the "simple" geoms just use the size of the 3d object with a fixed shape (like a box), whereas the trimesh uses the actual 3d data of the object. It takes a lot more processing time to do collision detection with trimeshes than with boxes or spheres, but it's more accurate. I use simple geoms whereever possible and normally just have a trimesh for the actual level to play.
Dustbin::Games on the web: https://www.dustbin-online.de/

Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
Zurzaza
Posts: 153
Joined: Fri Mar 26, 2010 9:41 pm
Location: Filo (FE), Italy
Contact:

Post by Zurzaza »

Thank you again for your answer :wink:
jacercutio
Posts: 3
Joined: Sat Apr 10, 2010 1:01 am

destructible terrain

Post by jacercutio »

Hi there

Any idea how to make a destructible terrain using IrrODE:
root node > world node > ITerrainSceneNode > CIrrOdeGeomHeightfield
??

I'm doin a Worms kinda game and so far I was able to do a destructible terrain without ODE by creating another ITriangleSelector from the modified terrain and applying it to a new ISceneNodeAnimatorCollisionResponse... removing the old one.

Now, trying to make it work with IrrODE and didn't find a way to do it yet... I've tried to update the ITriangleSelector of the CIrrOdeGeomHeightfield but didn't work... Then tried to make a new instance of geom heightfield every time the terrain get modified but... visually you see the terrain rendering vertex changing but not the collision detection system...

Besides... I really like all the work on IrrODE :P keep it up!
For a newb to game dev using engins like me... I give my 2 thumbs up! :P
Dorth
Posts: 931
Joined: Sat May 26, 2007 11:03 pm

Post by Dorth »

I believe Worms use pixel-precise collision in all their 2d games. Most likely their field in split in sections, worms and object are mask compared to one another and the terrain and voilà.
jacercutio
Posts: 3
Joined: Sat Apr 10, 2010 1:01 am

Destructible terrain

Post by jacercutio »

Dorth wrote:I believe Worms use pixel-precise collision in all their 2d games. Most likely their field in split in sections, worms and object are mask compared to one another and the terrain and voilà.
Make sense!

But I should say that It's a kinda worms game but in 3D :)

Anyway I looked around and notice that its all about the getHeight method of ITerrainSceneNode. On every rendering calls, ODE get to call this method and get the initial TerrainData "unchanged" even if the rendering buffer changed.

So I made a quick patch to redirect the ODE to the rendering buffer and it works! :o

in coding language... the patch redirection looks like changing the CTerrainSceneNode::getHeight method

changing line
line (const video::S3DVertex2TCoords*)Mesh.getMeshBuffer(0)->getVertices();
to
->getRenderBuffer()->getVertices();
Brainsaw
Posts: 1183
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

@jacercutio: can you specify the position of the line you modified? Couldn't find it in the IrrODE wrapper source, but that would really be an intersting feature.
Dustbin::Games on the web: https://www.dustbin-online.de/

Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
kat104
Posts: 1
Joined: Fri Apr 09, 2010 7:49 pm

Post by kat104 »

Hi, anyone is using it on linux?
I compiled IrrOde wrapper as a static lib, then compiled the helloworld example and during execution it is crashing, just saying there is a malloc() error :
Loaded mesh: ../../data/box.3ds
Loaded texture: /home/bibi/ode/data/box0.jpg
*** glibc detected *** ./hello: malloc(): memory corruption: 0x08baeae8 ***
The instruction causing the crash is
CIrrOdeGeomBox *bx=reinterpret_cast<CIrrOdeGeomBox *>(smgr->addSceneNode(CIrrOdeSceneNode::nodeNameToC8(IRR_ODE_GEOM_BOX_NAME),Node));
Without this it runs fine, but no physics.

Dev specs
Linux Ubuntu karmic koala (the latest)
g++ 4.4.1
Irrlicht 1.7.1 compiled from source, works fine
libode 2.0.11.4 installed from official repository
Any idea? thanks in advance
Brainsaw
Posts: 1183
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

Hmm ... I don't know the libode from the official repository, maybe you could try ode 0.11.1 from http://opende.sourceforge.net/, at least that's the version that I am using with Windows without problems.
Dustbin::Games on the web: https://www.dustbin-online.de/

Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
Zurzaza
Posts: 153
Joined: Fri Mar 26, 2010 9:41 pm
Location: Filo (FE), Italy
Contact:

Post by Zurzaza »

ok, i'm going to brake my mind with this problem.
I added my map into scenenode, similar to the 1st tutorial, with a little sphere that must bounce, but it seems there are no collision with the trimesh scene (map scene).
If i change the map texture into the box one provided with the engine, all works fine...why the sphere don't collide with my map?
Any idea?
Brainsaw
Posts: 1183
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

I don't know of any issue with that (in fact I always use static trimeshes for the levels in my current project, and it works fine). Maybe you could upload your project to some location so that we could take a look.
Dustbin::Games on the web: https://www.dustbin-online.de/

Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
Post Reply