irrBP - An Irrlicht - Bullet Physics Wrapper

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
Post Reply
SG57
Posts: 66
Joined: Fri May 18, 2007 5:51 am

Post by SG57 »

I thought objects accelerated at the same rate, regardless of mass?
Zurzaza
Posts: 153
Joined: Fri Mar 26, 2010 9:41 pm
Location: Filo (FE), Italy
Contact:

Post by Zurzaza »

@SG:
Uhm...i forgot to update the SVN' vcproj with the lastest one :O (this the explaination to your linker errors)

2nd...I remember you to set the proper parameters to help bullet to be more deterministic (set the proper timestep & fixed time step in bulletWorld object)


@serengeor: ok. Overwritten ;)
You should not use the drop() method because it's going to only delete object from the memory without dropping it from the world.
So you can use the removeCollisionObject(pointerToYourBody) in your irrBP World Object, to remove it correctly ;)

...uploading irrBP 0.30 Final. Update your SVN ;)
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 »

Somethings wrong with it too, no method works to what I encounter.

I'll explain whats happening again :roll:
There are two boxes created, one on top of the other, they both get calm (not moving).
I remove the bottom one by calling removeBody from the manager(also does the same with removeCollisionObject).
The bottom cube gets removed, while the top one is up in the air not moving, like it would be standing on the cube, but its gone!

This doesn't happen when the cubes are dropped on top of each other(moving).

I don't know if its your wrappers fault or internal bullet thingy, but I would like to get a fix for that. :)
Working on game: Marrbles (Currently stopped).
GameDude
Posts: 498
Joined: Thu May 24, 2007 12:24 am

Post by GameDude »

How do you build this? It keeps saying such file or directory does not exist. I check the directories and everything is there. Is there something you gotta do to make it work? I tried building it with Visual C++ Express 2010, and I tried building it with Codeblocks. I still got the same error.
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Post by serengeor »

Maybe its missing the bullet includes and not irrBP??
Working on game: Marrbles (Currently stopped).
Kordman916
Posts: 23
Joined: Sat Apr 03, 2010 3:44 am

Post by Kordman916 »

So what exactly am I downloading to get this to work in Code::Blocks on Ubuntu 10.10?
SG57
Posts: 66
Joined: Fri May 18, 2007 5:51 am

Post by SG57 »

serengor - I read that your problem is because the objects are deactivated. Deleting one doesn't notify the one above it anything has changed. Try activating the one you delete. I think I also read somewhere that that won't work either, something about a 'deactivation list'. The only alternative I can see would be to activate the ones you arent deleting, after you're done deleting. In all practical senses, this would mean looping through and re-activating all your entities..hmm..

Oh and to those thinking the demo seems a bit 'slow', not in FPS just in simulation, well it isn't. You need to know that Bullet works in units from 0.03 (a pebble) to 10 (a truck) and does not work well with BIG triangles based off that scale. Gravity (-9.8 ) acts on those perfectly, as well as the CFM, ERP, etc. The reason why it seems slow is because that BSP map is HUGE relative to Bullet's scale. How huge you ask? Well, that map, by default, is 275 trucks width, 64 trucks tall and 275 trucks length. If a truck is 4 meters long, that's about 1 km^2 of area used by not a lot of triangles (meaning those triangles at this scale are freakin HUGE as well, which is bad for bullet). The cubes that are spawning and falling are the size of 1 truck (size 10).

To 'speed up' this simulation and make it look more realistic, so to speak, you must scale your scene to fit with Bullet's scale. 0.03 = pebble (avoid this small, precision errors when that tiny) and 10 = truck. scale the BSP node by 0.1, so now it's only 27 trucks x 6 x 27. Which is about 100meters^2 area. Much better, the triangles arent nearly as huge so collision, gravity works perfectly at 9.8, sleep threshold and other constants work as expected and there is no jittering. probably should scale that a bit smaller if this bsp model is meant to have ~3m high doorways, else it's a giant castle in that case... anyways - Good stuff! Now to implement into my game...

I have been looking into a dynamic character controller, would irrBP be interested in having one built in?
Zurzaza
Posts: 153
Joined: Fri Mar 26, 2010 9:41 pm
Location: Filo (FE), Italy
Contact:

Post by Zurzaza »

very nice explaination SG, you give me some ideas for the next release:

> Add A function to disable body's deactivation
> Implement more character controller into the wrapper

I'll do something in the next days and during christmas holiday ;)
Thank you very much for your help.
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 »

Strange now the box from the top is falling :shock:

EDIT:Sent it to my friend, and the box hangs in the air for him, but not for me :x


EDIT2:

How would I make bounding box collisions?
I want other objects to collide with my mesh's bounding box :oops:
Working on game: Marrbles (Currently stopped).
GameDude
Posts: 498
Joined: Thu May 24, 2007 12:24 am

Post by GameDude »

serengeor wrote:Maybe its missing the bullet includes and not irrBP??
OK, do I just include the bullet physics library into the project, or do I gotta link them a special way?
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Post by serengeor »

@GameDude look through the last pages of this thread.
Last edited by serengeor on Sat Dec 18, 2010 9:51 pm, edited 1 time in total.
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 »

GameDude wrote:
serengeor wrote:Maybe its missing the bullet includes and not irrBP??
OK, do I just include the bullet physics library into the project, or do I gotta link them a special way?
you have to:
1) Download bullet SDK and extract them
2) Open C::B or Visual Studio Project
3) >Change the linking directory< in the project's options..
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 »

Zurzaza is there any way to create collision body for bounding box?
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 »

serengeor wrote:Zurzaza is there any way to create collision body for bounding box?
you can create an object as a "box" (because the bounding box...is a box! :P)...why do you want to create a collision body from the BB?
irrBP - an Irrlicht - Bullet Physics Wrapper.
The only irrlicht-physics wrapper that uses multithread technology.
SG57
Posts: 66
Joined: Fri May 18, 2007 5:51 am

Post by SG57 »

Zurzaza - I've added to your library a smidge by adding a collision-filter group number and bitmask to CIrrBPCollisionObject. I updated all the rigid bodies construtors with a default collision filter group number and bitmask so it's still backwards compatible or w/e. Basically This allows for the stuff said here to work:

http://www.bulletphysics.org/mediawiki- ... _Filtering

I don't know if you want my library source or if you can just type it into your current local copy. Either way I think it should be added to this library! :]

I'll post a screenie of irrBP in action soon, I spawned some 50 weapons into my world no problem lol.
Post Reply