Page 12 of 38

Posted: Sat Apr 03, 2010 7:01 am
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.

Posted: Sat Apr 03, 2010 8:56 am
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).

Posted: Sun Apr 04, 2010 9:27 am
by Brainsaw
OK, I included your project, your libs and your readme file into the package and uploaded it. Thanks for the contribution.

Posted: Mon Apr 05, 2010 10:49 pm
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

Posted: Tue Apr 06, 2010 1:16 am
by grunt
A trimesh is for something like a bsp map. The other geoms you can user for more simple things to approximate them.

Posted: Tue Apr 06, 2010 5:37 am
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.

Posted: Tue Apr 06, 2010 8:07 am
by Zurzaza
Thank you again for your answer :wink:

destructible terrain

Posted: Sat Apr 10, 2010 1:22 am
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

Posted: Sat Apr 10, 2010 5:28 am
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à.

Destructible terrain

Posted: Sat Apr 10, 2010 5:53 am
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();

Posted: Sat Apr 10, 2010 6:51 am
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.

Posted: Sat Apr 10, 2010 5:01 pm
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

Posted: Sun Apr 11, 2010 8:59 am
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.

Posted: Sun Apr 11, 2010 8:28 pm
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?

Posted: Mon Apr 12, 2010 5:38 am
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.