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
ulao
Posts: 274
Joined: Fri Mar 28, 2008 2:13 am

Post by ulao »

I'd be interested to see what you learned.. I'm waiting for Brainsaw to comment as I'm sorta stuck, but he wont be back for a week. I dont use code:blocks just compiling normal. Maybe that is why my irrlicht.dll is way bigger then his. Hope to sort this out soon..
Brainsaw
Posts: 1176
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

Hello,

just came back from my vacation and have read the thread.

I have compiled it with Irrlicht 1.5 and ODE 0.11. I just use the Irrlicht DLLs for gcc that you can find in some other thread (don't know which one, will have to search for it). Both the Irrlicht and the ODE dlls are compiled in release mode to make them smaller (btw: I compiled all of the programs in release mode as well to get the size down ;) ). If you try to build a version with a different compiler (VC e.g.) you'll have to use DLLs compiled with that compiler.

I tried to compile an IrrOde lib with gcc, but it's size is about 30 megs, so I didn't include it (yet ... have to get rid of debugging symbols I think).

@ulao: I think I will add projects for VC as well, but I do just use it for the plugin, I prefer gcc for the rest. I hope I can add the projects next week. Libs are not included, see above ;). You should compile ODE with VC, I think it's quite easy, they have a tutorial on how to comile it with some comilers. As I said before, all of my DLLs are compiled with gcc, so I don't expect them to work with VC compiled exes. I'll also see about the debugging thing. I also like the IrrOdEdit plugin, it was as simple as I hoped to get IrrOdeCar ported to a scene made with this plugin.

Oh yes ... the vacation was great. Just the temperature ... it was 40 degrees centigrade in Las Vegas yesterday, and about 20 degrees in munich after we arrived. Quite a shock ;).
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
Brainsaw
Posts: 1176
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

OK, I just uploaded a small update ... no change in functionality, I just prepared the whole structure so that I can add the VisualC++ binaries together with the gcc binaries: I added a "bin/gcc-win32" folder and code::blocks now compiles the programs into that directory, I also adjusted the path of the data that is loaded and the IrrEdit files so that everything works again. Oh, the header and linker path of the ODE stuff has also changed, I will have a 2nd installation of ODE 0.11 on my computer soon that will be compiled with VC2008. I hope that I can add the VC stuff during the next week.
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
ulao
Posts: 274
Joined: Fri Mar 28, 2008 2:13 am

Post by ulao »

Well I was not sure I tried to compile with a release so I tried.

Compiled irrlicht in release.
compiled irrOde against the irrLitch release dll.
Compiled one of your example apps against the irrOde from above.

I get this..

IrrOde.lib(CIrrOdeBody.obj) : fatal error LNK1103: debugging information corrupt; recompile module

Not really sure why, as its all release now, but any thoughts? It was too generic for google to help. I'm going to downlaod the latest you have and tried from scratch.,

hmm I guess that is not going to work..
Error: File irrode.zip not found!

from your server




BTW: I did of course clean as I went.
Brainsaw
Posts: 1176
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

I just uploaded a new version. This time I just added VC2008 projects for all demo applications. The vc2008 folder now contains 2 workspaces, one for IrrOdEdit and one for the demo applications. The folder "bin/vc2008" contains versions of all applications and the IrrOdEdit plugin compiled with VC2008 Express. All you have to do is to adapt some of the paths (the path to the ode_single.lib) and it should compile fine (I hope at least). There were some issues in the IrrOdePlayground applications that I fixed (compiled with gcc, but not with VC, now compiles fine with both compilers). I hope this helps all VC users.

@ulao: I just tried the download, works fine for me. Maybe you downloaded while I uploaded some new version. I hope my VC2008 projects help you with your issue.
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
Brainsaw
Posts: 1176
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

[...]
IrrOdEditExample broke.
I set up IrrOdEditExample and the ball will not move, also tried the non edit version and no movement. But running the exes it bounces? I see your irrlicht.dll is not the right size. If I use the correct version of irrlicht.dll with your examples I get a crashes as you compiled with the corresponding lib.
[...]

I think I found out what the problem is here: the IrrOdEdit plugin does not include any physics. There is an abstract class "IIrrOdeDevice" with two implementations: "CIrrOdeDevice" and "CIrrOdeNullDevice". The first one encapsulates all ODE functions used in the framework whereas the "NULL" device does not include anything. Since I wanted the plugin to work without ODE this implementation only has empty functions. There is a compiler switch ("_USE_ODE_NULL_DEVICE") that makes the compiler use the NULL device instead of the "real" one, so if you compile a program with this switch it will compile and it will run but nothing will happen. The "IrrOdEdit" project has this switch set. Try to use the other examples I included today and it should work.
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
ulao
Posts: 274
Joined: Fri Mar 28, 2008 2:13 am

Post by ulao »

http://www.bulletbyte.de/download.php?file=irrode.zip

I get file not found on other computers and browsers?
ulao
Posts: 274
Joined: Fri Mar 28, 2008 2:13 am

Post by ulao »

Ok, So I took a wilde guess and shot in the dark. I figured hmm, could this be a linux server? So I tried

http://www.bulletbyte.de/download.php?file=irrOde.zip

instead of

http://www.bulletbyte.de/download.php?file=irrode.zip

Take special note of the 'O' not 'o' and it worked..


So to retort:

I first compiled the new source in VS2008 as a static lib, then I tried to build a new sln file and used the IrrOdEditExample. I made sure to include my compiled version of irrOde.lib and a release version of irrlicht.lib, also both respective DLL's.

I run the example and the ball is suspended in space.

Something strange that I'm not sure I understand? The app runs with or without the irrOde.dll. Dont I need the dll to run? I know i will need ode_single.dll, but what about your dll. Or because this is technically a "wrapper" will I not need one.


Not sure it will help but here is the log..

Code: Select all

Irrlicht Engine version 1.5
Microsoft Windows XP Professional Service Pack 2 (Build 2600)
Using renderer: Direct3D 9.0
NVIDIA GeForce 7300 SE/7200 GS nv4_disp.dll 6.14.11.6921
Loaded texture: d:\game dev stuff\irrlicht\irrOde\data\skybox4.jpg
Loaded texture: d:\game dev stuff\irrlicht\irrOde\data\skybox1.jpg
Loaded texture: d:\game dev stuff\irrlicht\irrOde\data\skybox2.jpg
Loaded texture: d:\game dev stuff\irrlicht\irrOde\data\skybox3.jpg
Loaded texture: d:\game dev stuff\irrlicht\irrOde\data\skybox_up.jpg
Loaded texture: d:\game dev stuff\irrlicht\irrOde\data\skybox_down.jpg
Could not load mesh, because file could not be opened.: d:\game dev stuff\irrlic
ht\irrOde\test app\dummy\Release\IrrOde.exeresources\IrrOde.3ds
Could not load a texture for entry in 3ds file: cube1_au.bmp
Loaded mesh: ../../data/box.3ds
Loaded texture: d:\game dev stuff\irrlicht\irrOde\data\box0.jpg
Could not load mesh, because file could not be opened.: d:\game dev stuff\irrlic
ht\irrOde\test app\dummy\Release\IrrOde.exeresources\IrrOde.3ds
Could not load mesh, because file could not be opened.: d:\game dev stuff\irrlic
ht\irrOde\test app\dummy\Release\IrrOde.exeresources\IrrOde.3ds
Could not load a texture for entry in 3ds file: sphere1_.bmp
Loaded mesh: ../../data/sphere.3ds
Loaded texture: d:\game dev stuff\irrlicht\irrOde\data\sphere0.jpg
Could not load mesh, because file could not be opened.: d:\game dev stuff\irrlic
ht\irrOde\test app\dummy\Release\IrrOde.exeresources\IrrOde.3ds
Could not load mesh, because file could not be opened.: d:\game dev stuff\irrlic
ht\irrOde\test app\dummy\Release\IrrOde.exeresources\IrrOde.3ds

Not really sure why I get "could not be opened", as its quite clear the models are on the screen?
Brainsaw
Posts: 1176
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

If you don't need the DLL then I guess your app is using the "CIrrOdeNullDevice" ODE device. See the doxygen documentation for details (http://www.bulletbyte.de/irrOde/doxygen ... evice.html). It seems that you have included the define for "_USE_ODE_NULL_DEVICE" somewhere (not necessaryly in the source code, I have defined that switch in the dialog "Project Properties --> C/C++ --> Preprocessor --> Preprocessor defines" ... maybe the names differ, I am using the german version of VC 2008 so I'm just guessing the names of the menu). You can remove both the "_USE_ODE_NULL_DEVICE" and "_IRREDIT_PLUGIN" (can't remember why I did two defines ;) ). The "NULL" device is just used for the IrrEdit plugin so that it is not necessary to include ODE in the plugin.

The program should definetely not start without the DLL, I did not compile ODE into the wrapper. Maybe you did this with your lib, can't say that. The demo applications I compiled work in both gcc and VC2008 versions.

Hmm ... the download issue. Did you use the link on my homepage? It has and "O" instead of an "o". My php scripts get the "O" right, so it should work (it works even with IE though I never use it). Strange things happen ;).
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
ulao
Posts: 274
Joined: Fri Mar 28, 2008 2:13 am

Post by ulao »

If you click your download link form your page you get

"http://www.bulletbyte.de/download.php?file=irrode.zip"

I get this from my office, my home location ( all 7 computers ) and my sisters house. Tested with IE and firefox. Not an issue as I found a way around it but only an FYI. ;)





As far as the dll issue, this is not my app,its your example code.

I did base my project off of your irredit example since you used 2008 for it. So I will remove _USE_ODE_NULL_DEVICE and _IRREDIT_PLUGIN . I shall try that..




Update, removing the above still has no moment, again this is your example. I'm going to try the vs2008 projects you made.

incidentally, your examples in the gcc-win32 and vs2008 folders work without the dll, and it was not even included in that folder,, :confused:

Also the irrlicht.dll in the vs2008 folder is not a normal vs2008 build ( as its twice the size ) It looks like a code::blocks dll. Maybe that was the intent.. but it should be close to the size in the gcc-win32 folder.


update2
I tried the vs2008 project and noticed it was expecting some default project include. So I added irrlitch.h and irrOde.h to my vs2008 options. I get a lot of identifier not found errors?

example:
..\source\IrrOde\CIrrOdeDevice.cpp(50) : error C3861: 'dInitODE': identifier not found

This looks like ODE stuff, Do I need to add all of the ode headers now?

Are there more defaults that I need to add? How are you linking against irrOde.lib, I dont see that in the project settings.

I think this could all be avoided if you shipped a vs2008 irrOde.lib and dll, built from the irrlicht vs2008 lib. The version I made does Seem not to work right.
buhatkj
Posts: 444
Joined: Fri Dec 12, 2003 4:53 am
Contact:

terrain node positioning wierdness...

Post by buhatkj »

heya, Managed to get irrODE integrated into my app, I have a physics simulation set up to make a box fall on some terrain, however the box just falls right through? I am trying to set all this up using the irrodedit plugin. I tried messing with the parameters on the world and the geomheightfiled, but I cant seem to get it to collide....

it looks like if the heightfield node and the world node are not happy just being at (0,0,0) I can't get them to collide properly. It looks like the terrain is in one place, but it is in fact in another as far as collision is concerned. This is very disconcerting.....
My irrlicht-based projects have gone underground for now, but if you want, check out my webcomic instead! http://brokenboomerang.net
retsam
Posts: 1
Joined: Wed May 27, 2009 5:36 am
Location: Finland

Post by retsam »

I've come up with a problem... or couple of them. I'm kinda n00b so feel free to kick ass when needed.

I'm currently using Code::Blocks. Done a custom compile from latest Irrlicht SVN with DirectX9. Also compiled Ode 0.11 single and double.

The bigger problem that I'm having is that all the motions are jiggering. I've seen this as simple as a plain box falling slowly down with large linear dampening and light gravity values. The motion is smooth for a while but it seems as if in every third second(it's not constant) it 'kinda jumps'. Could it be something with the timer? My frameDeltaTime also jiggers along.

I'm using it like in the tutorials:

ITimer *pTimer=device->getTimer();
CIrrOdeManager::getSharedInstance()->setTimer(pTimer);

-- Phys init here ---

while (pTimer->isStopped()) pTimer->start();

I'm gonna try to search around with the timer thing...

Or should I try to set ODE to double precision? I tried it and got ode crash. I found out from the ODE manual that some DirectX voodoo is forcing the FPU to go single precision so I thought that this is the problem. I've managed to compile the double dll thingy though.

The smaller one is that I can't get setMaxAngularSpeed to work. Angular velocity is not limited by this. I'm trying to set it to ZERO for a sphere(capsules don't work with trimeshes, right?) representing my player character in the physical world. I've managed to fix this by setting angular dampening to 1 or just resetting angularvelocity on every step.

Anyways. Thank you for making it easier for n00bs like me to get playing with physics! Great work with IrrOde.
Brainsaw
Posts: 1176
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

I just uploaded a new version. The main change is that I added a tank to the IrrOdeCar application (which I should rename to something like "IrrOdeVehicle" now). Initial post updated, screenshots added.

@buhatkj: I do also have an issue with the terrain: sometimes the vehicles of "IrrOdeCar" sink into the terrain, I'll have to dig into that. For your problem: are you using Irrlicht 1.5? One change from 1.4 to 1.5 was that the terrain was flipped, maybe your terrain is just "wrong way round". The "CIrrOdeGeomHeightfield" class also has a bug I know and I should fix: it does not take the size of the heightfield image (the number of width and height samples) but assumes 256 for that in all cases. Should really fix that.


@retsam: I am using single precision ODE, and it works fine for me. Could it be that some background process on your computer is taking a lot of CPU time regularely so that it slows down Irrlicht?
MaxAngularSpeed: IrrODE sees a maximum angular speed of zero as max angular speed deactivated. I think that resetting the angular speed and the rotation of the object is the way to go (I think you would have a rotating object nevertheless otherwise due to the limited precision of computers).
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
buhatkj
Posts: 444
Joined: Fri Dec 12, 2003 4:53 am
Contact:

Post by buhatkj »

Hey Brainsaw,
Yes I am using irrlicht 1.5, and also my heightfield is WAY bigger than 256x256.
So this is a bug you are already fixing? THat would be awesome :-)
I can try to dig into it too, lemme know what your results are....
My irrlicht-based projects have gone underground for now, but if you want, check out my webcomic instead! http://brokenboomerang.net
ulao
Posts: 274
Joined: Fri Mar 28, 2008 2:13 am

Post by ulao »

Would it be too much trouble to help me with some simple questions?

Like why your bin folder has no irrOde.dll, yet it runs?

or, why is the Dll so big?

I really want to give this wrapper a try, but I cant do it without your help?
Post Reply