irrBP - An Irrlicht - Bullet Physics Wrapper

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
Zurzaza
Posts: 153
Joined: Fri Mar 26, 2010 9:41 pm
Location: Filo (FE), Italy
Contact:

Post by Zurzaza »

macron12388 wrote:*dreamy eyes at above posters*

I hope I can be cool programmers like them one day...

:D Well, that was really good practice compiling libraries, even if it took me a two days to do it...

Haha, just changing the "/"s to "" was okay, but a bit boring..... :P
macron, thank you for your interesting in my project also if you aren't a "cool" programmer (I'm not a cool programmer ;) i'm 17, i need to learn a lot of things, so...don't worry!)...although your tests are very useful for my project..

Get ready for a new major release of irrBP in the next days (i'm implementing raycast vehicle and character controller)
irrBP - an Irrlicht - Bullet Physics Wrapper.
The only irrlicht-physics wrapper that uses multithread technology.
macron12388
Posts: 126
Joined: Wed Sep 29, 2010 8:23 pm

Post by macron12388 »

Zurzaza wrote:
macron12388 wrote:*dreamy eyes at above posters*

I hope I can be cool programmers like them one day...

:D Well, that was really good practice compiling libraries, even if it took me a two days to do it...

Haha, just changing the "/"s to "" was okay, but a bit boring..... :P
macron, thank you for your interesting in my project also if you aren't a "cool" programmer (I'm not a cool programmer ;) i'm 17, i need to learn a lot of things, so...don't worry!)...although your tests are very useful for my project..

Get ready for a new major release of irrBP in the next days (i'm implementing raycast vehicle and character controller)
:D I'm just glad I managed to get it working! :lol:
Now to get to work on implementing native OpenAL code!
*SWOOSH AWAYYY*

(I'm 16 btw)
Monio666
Posts: 14
Joined: Fri Nov 19, 2010 12:37 pm

Post by Monio666 »

I want to move a scene node only with setposition and setrotation, and I want to check if this object collides with the rigid bodys of the scene.

If I make a irrBP body with this object, then I can't move it manually, but if I don't make a irrBP body with it, I don't know how to get his collision with other objects.

I want to know if there's a way to do this with irrBP. Thanks.
Zurzaza
Posts: 153
Joined: Fri Mar 26, 2010 9:41 pm
Location: Filo (FE), Italy
Contact:

Post by Zurzaza »

Monio666 wrote:I can't move it manually.
Yes it is possible, I've just fixed a bug to this feature. (You can move your bodies with SVN version for now).
You can use setPosition() and setRotation() methods in all the bodies (only rigid bodies for now) ;)
Either, you can set the position manually, by updating the transformation but only if you know bullet.

SVN version updated. It's strongly raccomended to update your irrBP version.
I'll release a new major version (irrBP 0.30) when I finish to implement Char. Controllers.

Thank you again.
irrBP - an Irrlicht - Bullet Physics Wrapper.
The only irrlicht-physics wrapper that uses multithread technology.
Monio666
Posts: 14
Joined: Fri Nov 19, 2010 12:37 pm

Post by Monio666 »

I was working on 0.20. So I'm glad to ear now it works.

Thanks for everything and all your work on irrBP.
Zurzaza
Posts: 153
Joined: Fri Mar 26, 2010 9:41 pm
Location: Filo (FE), Italy
Contact:

Post by Zurzaza »

irrBP 0.3 Online!.
Waiting for some linux\c::b users, 'cause I've updated the code::blocks project. Thank you
irrBP - an Irrlicht - Bullet Physics Wrapper.
The only irrlicht-physics wrapper that uses multithread technology.
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Post by serengeor »

Windows includes are not case sensitive? :roll:

http://www.multiupload.com/N4XIBSQDD2

I compressed it into tar.lzma format, I hope thats not a problem?
Working on game: Marrbles (Currently stopped).
SG57
Posts: 66
Joined: Fri May 18, 2007 5:51 am

Post by SG57 »

Zurzaza - Just letting you know, I've been looking around for a physics engine and a wrapper to go with it for quite some time. IrrNewt looked promising til it's support just vanished with irrlicht 1.5> and up. Physx and Havok looked good but I can't get a wrapper for either. IrrBullet looked nice, but after checking yours out I think Ill give this a whirl.

For one, you posted a week ago so you're still around so that's already a big plus. Two, you're using irrlicht 1.7! Why people stick with 1.5 etc. I dont know, it bugs me having to revert to use their code reliably. Three, I really dig the whole 'manager' integration. Irrlicht has many of them, it would only make sense to add a physics one - and thats what you have done.

I just have one question, how are you handling framerate independence? I see no accessible timestep variable to alter (I havent read the docs yet, just read the source code). Ill definitely post back here with results so as to up this wrapper's popularity if all goes well.

EDIT

Would be good to mention the linking instructions are in the documentation. Bleh wasting my time trying to guess what needs linking.
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Post by serengeor »

SG57 wrote:Zurzaza - Just letting you know, I've been looking around for a physics engine and a wrapper to go with it for quite some time. IrrNewt looked promising til it's support just vanished with irrlicht 1.5> and up. Physx and Havok looked good but I can't get a wrapper for either. IrrBullet looked nice, but after checking yours out I think Ill give this a whirl.

For one, you posted a week ago so you're still around so that's already a big plus. Two, you're using irrlicht 1.7! Why people stick with 1.5 etc. I dont know, it bugs me having to revert to use their code reliably. Three, I really dig the whole 'manager' integration. Irrlicht has many of them, it would only make sense to add a physics one - and thats what you have done.

I just have one question, how are you handling framerate independence? I see no accessible timestep variable to alter (I havent read the docs yet, just read the source code). Ill definitely post back here with results so as to up this wrapper's popularity if all goes well.

EDIT

Would be good to mention the linking instructions are in the documentation. Bleh wasting my time trying to guess what needs linking.
You should try reading more carefully, the method you look for sits in CIrrBPWorld class.

Code: Select all

void setTimeStep(irr::f32 step);
As for linking you need to link bullet libraries in the correct order and in the end link irrBP library.
Like this:

Code: Select all

libIrrBP.a
libBulletSoftBody.a
libBulletDynamics.a
libBulletCollision.a
libBulletLinearMath.a
P.S. When I built irrBP lib on code::blocks I left it in the codeblocks folder and it's named "lib.a"
Working on game: Marrbles (Currently stopped).
SG57
Posts: 66
Joined: Fri May 18, 2007 5:51 am

Post by SG57 »

I'm using MSVC (in VS2010), I can't seem to get this to compile without unresolved external symbols (meaning i'm failing to link something or the method definition just wasn't written)

I was able to build bullet 2.76 linear math, soft body, dynamics and collision individually and produce each .lib. I was then able to build IrrBP and produce irrBP.lib. I then link to all of them in the order you gave and compile the hello world and I'm left with 1 unresolved external (an undefined function that gets referenced somewhere):

Code: Select all

Error	16	error LNK2001: unresolved external symbol "public: __thiscall CIrrBPRaycastVehicle::CIrrBPRaycastVehicle(class CIrrBPRigidBody *,class CIrrBPWorld *)" (??0CIrrBPRaycastVehicle@@QAE@PAVCIrrBPRigidBody@@PAVCIrrBPWorld@@@Z)	C:\Users\Cord\Desktop\Irrlicht\irrBP\HelloWorld\IrrBPLib.lib(CIrrBPManager.obj)	HelloWorld
Looks like a ray cast vehicle constructor? something new? I dont think I see that in the irrBP source... My irrBP version is the latest from SVN iirc.

Then there are 8 other link 2005 errors saying 'malloc' and 'printf' and others are already defined in libcmtd.lib. I'm trying to work around those by linking that lib first (as the solution on the microsoft website says) but it's not working. Maybe I have an incomplete build of irrBP? I'll try starting over completely, rebuilding irrBP (i dont think bullet libs have a problem?)
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Post by serengeor »

recheck the linking order again, I got it wrong the first time I posted and then eddited it, here is a post on bullet forum about linking order http://bulletphysics.org/Bullet/phpBB3/ ... 60&start=0

And irrbp should go first I think.
Working on game: Marrbles (Currently stopped).
Zurzaza
Posts: 153
Joined: Fri Mar 26, 2010 9:41 pm
Location: Filo (FE), Italy
Contact:

Post by Zurzaza »

Hi SG,
When you compile with Visual Studio, you must remember that microsoft puts in your exes, the run-time libraries:
- Multithread
- Debug Multithread
- DLL Multithread
- DLL Debug Multithread

remember that there are a lot of incompatibility between those types (in different libraries). To avoid this, you should compile the whole libraries with one of this choiche. I reccommend you to use the DLL's libraries Multithread\Debug Multithread while compiling bullet & irrBP.

Vehicles dynamics has been implemented in the last version (0.30) of irrBP, and compiles without errors under VS 2005. ;)
You can also try the serengeor's solution.

@serengeor: what was wrong in my c::b project? However yes, windows folder are not case-sensitives. Unfortunately, i never control for case-sensitives folder, because i can't see errors ;)
irrBP - an Irrlicht - Bullet Physics Wrapper.
The only irrlicht-physics wrapper that uses multithread technology.
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Post by serengeor »

This time it was alsmost excelent, you only mistyped one include instead of irrBP you wrote irrBp :)




I am using your wrapper now int my simple game framework, how would I correctly remove rigid body & irrlicht mesh while in game ( I only want to remove one body).

In the documentation you said not to use drop method and use removeBody, tough its not working as I expected.
I create two RigidBoxes one ontop other.
Delete the bottom one.
The upper one seems to be floating in air :?
Working on game: Marrbles (Currently stopped).
SG57
Posts: 66
Joined: Fri May 18, 2007 5:51 am

Post by SG57 »

Ok, I got rid of all those linking errors minus the external symbol to the ray cast vehicle constructor. Bullet was default building with Multithreaded Debug DLLs, IrrBP was not, making sure it was consistent fixed that. To fix this, you would alter your Config->C/C++->Code Generation settings (for anyone else having problems).

It would appear the IrrBP project hasn't included the source code in the 'Actions' folder, where the ray cast vehicle class is declared and defined. I added them, rebuilt IrrBP and the HelloWorld demo and it worked. Have you not updated the irrBP project/solution in 0.3?

Anyways - glad to have tangible evidence of all this work. One thing that confused me - You give the boxes a texture named 'sphere1.jpg' lol threw me for a loop.

EDIT

I've just begun my fiddling around with it 0.3, I am really starting to understand how constraints work and how to use them. One observation - gravity seems incredibly weak. Let me rephrase that, I suppose gravity strength would need a frame of reference: with 10x10x10 cubes, gravity with -10 in Y seems incredibly weak. -100 Starts to resemble something you'd expect.

Now I'm looking into how to set the automatic disable timer (the time an object's velocity stays under a certain threshold, it automatically disables). Great work on this wrapper so far
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Post by serengeor »

gravity with -10 in Y seems incredibly weak. -100 Starts to resemble something you'd expect.
Whats your point?
You want it to be similar to world?
You could increase mass.
Working on game: Marrbles (Currently stopped).
Post Reply