irrBP - An Irrlicht - Bullet Physics Wrapper

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Post by serengeor »

try:
Irrlicht.lib
IrrBPLib.lib
BulletSoftBody.lib
BulletDynamics.lib
BulletCollision.lib
LinearMath.lib
I don't really remember how to do it, but usually I just mix them untill they work :D
Working on game: Marrbles (Currently stopped).
panto
Posts: 22
Joined: Thu Mar 17, 2011 5:44 pm

Post by panto »

No dice, I'm afraid..
Zurzaza
Posts: 153
Joined: Fri Mar 26, 2010 9:41 pm
Location: Filo (FE), Italy
Contact:

Post by Zurzaza »

The precompiled libraries, that are put in the "windows" package, can only be used with bullet 2.77. Otherwise you need to compile your own libraries.
As you can see Here, only "> Pre-Compiled Bullet 2.77 Windows Libraries" are present.
Try to download the lastest version of bullet (2.77) or to recompile the bullet libraries (I reccomend you to download the lastest version of bullet that contains a lot of bug fixes)
irrBP - an Irrlicht - Bullet Physics Wrapper.
The only irrlicht-physics wrapper that uses multithread technology.
ent1ty
Competition winner
Posts: 1106
Joined: Sun Nov 08, 2009 11:09 am

Post by ent1ty »

Could we please get raycasting support added?
irrRenderer 1.0
Height2Normal v. 2.1 - convert height maps to normal maps

Step back! I have a void pointer, and I'm not afraid to use it!
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Post by serengeor »

ent1ty wrote:Could we please get raycasting support added?
I think that you could implement it yourself easily. Just look at Raytracer example in the SDK.
Working on game: Marrbles (Currently stopped).
panto
Posts: 22
Joined: Thu Mar 17, 2011 5:44 pm

Post by panto »

Zurzaza wrote:...can only be used with bullet 2.77...
Oh my god, I seriously wish you would've told me that earlier.

Compiled now. So far so good! Nice!
Zurzaza
Posts: 153
Joined: Fri Mar 26, 2010 9:41 pm
Location: Filo (FE), Italy
Contact:

Post by Zurzaza »

ent1ty wrote:Could we please get raycasting support added?
Raycasting is already included in SVN version of irrBP, and it will be part of a new release (0.4) next monday ;)

@panto: glad to hear that ;)
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 I think I will not be using your wrapper in my project, not because its bad, but because it adds a bit too much complexity(maybe not the right word here) to my framework.
What I mean that this wrapper as any other wrapper adds another layer on top, and makes it a bit harder to use in my project, simply because it still doesn't have some functionality that I need, so I have to access it the real bullet stuff through functions and do the job there, etc. And also dealing with bullet it self is fun :D

Would you mind if I use some of your code as a base to my own physics manager?
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 I think I will not be using your wrapper in my project, not because its bad, but because it adds a bit too much complexity(maybe not the right word here) to my framework.
What I mean that this wrapper as any other wrapper adds another layer on top, and makes it a bit harder to use in my project, simply because it still doesn't have some functionality that I need, so I have to access it the real bullet stuff through functions and do the job there, etc. And also dealing with bullet it self is fun :D

Would you mind if I use some of your code as a base to my own physics manager?
Hi serengeor, i really appreciate your help in my project, and I respect your choice. Of course, you can use some of my code in your project, at only one condition: you have to respect the distribution license (Creative Commons 3.0 BY-SA).

Another question, what functions do you need to use, that aren't included in irrBP?
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 wrote: Of course, you can use some of my code in your project, at only one condition: you have to respect the distribution license (Creative Commons 3.0 BY-SA).
Oh well I'll work it out on my own then.

Zurzaza wrote: Another question, what functions do you need to use, that aren't included in irrBP?
It's mostly not the missing functions that bother me, but the second layer, as I have already another layer for game objects. And working directly with bullet gives me all the access I need ;)
Working on game: Marrbles (Currently stopped).
panto
Posts: 22
Joined: Thu Mar 17, 2011 5:44 pm

Post by panto »

Does anybody have a idea how I could implement a simple function like bool OnGround() using IrrBP? I know how to do it with the default Irrlicht collision manager (shoot a ray from character base position to -10 by Y axis from character base position - if collided, then the char is on ground).

Edit.
And I answer myself. It's quite easy, actually.

Code: Select all

	btVector3 btPosFrom = irrVectorToBulletVector( posFrom );
	btVector3 btPosTo = irrVectorToBulletVector( posTo ) );

	btCollisionWorld::ClosestRayResultCallback rayCallBack( btPosFrom, btPosTo );
	world_->rayTest( btPosFrom, btPosTo, rayCallBack );

	if( rayCallBack.hasHit() )
		printf( "hit" );
	else
		printf( "not hit" );
... where world_ is bulletManager->getWorld()->getBulletWorldPtr().
Zurzaza
Posts: 153
Joined: Fri Mar 26, 2010 9:41 pm
Location: Filo (FE), Italy
Contact:

Post by Zurzaza »

panto wrote:Does anybody have a idea how I could implement a simple function like bool OnGround() using IrrBP? I know how to do it with the default Irrlicht collision manager (shoot a ray from character base position to -10 by Y axis from character base position - if collided, then the char is on ground).

Edit.
And I answer myself. It's quite easy, actually.

Code: Select all

	btVector3 btPosFrom = irrVectorToBulletVector( posFrom );
	btVector3 btPosTo = irrVectorToBulletVector( posTo ) );

	btCollisionWorld::ClosestRayResultCallback rayCallBack( btPosFrom, btPosTo );
	world_->rayTest( btPosFrom, btPosTo, rayCallBack );

	if( rayCallBack.hasHit() )
		printf( "hit" );
	else
		printf( "not hit" );
... where world_ is bulletManager->getWorld()->getBulletWorldPtr().
you can also use the svn version of the wrapper (or the next 0.4, that is coming soon) to directly ray-test without using the raw function ;)
irrBP - an Irrlicht - Bullet Physics Wrapper.
The only irrlicht-physics wrapper that uses multithread technology.
Zurzaza
Posts: 153
Joined: Fri Mar 26, 2010 9:41 pm
Location: Filo (FE), Italy
Contact:

Post by Zurzaza »

Last night, i uploaded the lastest version of irrBP.
New Features:
> Multithreaded Bullet (Bullet has some leaks [about 300-400 bytes] when using multithread, sorry but i can't solve them)
> Lot of bug fixes
> Camera Scene Node (Beta)
> Source code more clean
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 wrote: New Features:
> Multithreaded Bullet (Bullet has some leaks [about 300-400 bytes] when using multithread, sorry but i can't solve them)
try valgrind if you have a linux machine, it should give you some hints where to look at.
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 wrote: New Features:
> Multithreaded Bullet (Bullet has some leaks [about 300-400 bytes] when using multithread, sorry but i can't solve them)
try valgrind if you have a linux machine, it should give you some hints where to look at.
I tried MLD (Valgrind for visual studio), but it seems that the leak is inside the core of bullet, I tried to remove it, but without success.
irrBP - an Irrlicht - Bullet Physics Wrapper.
The only irrlicht-physics wrapper that uses multithread technology.
Post Reply