convexSweepTest Kinematic Object

Post Reply
codemonkey
Posts: 4
Joined: Sun Jul 24, 2005 2:46 am

convexSweepTest Kinematic Object

Post by codemonkey »

Hi all,

I’ve spent the last while integrating Bullet and I’ve created a Kinematic RigidBody and convexSweepTest for player input and movement.

I added a class btPlayer, basically cut-down version of the btRaycastVehicle, so the player would be updated inside the physics step, and implemented a basic collision response to project the velocity run parallel to the collision surface. This system works fine with static primitives (boxes, spheres etc) but when I added a collision proxy (i.e. stair ramp with hand rails) it caused massive FPS drop.

I did a big of digging, I have two questions:
1. The Optimized AABB Tree, generates down to the polygon level, is there anyway to customize the generation behavior? What are the best practices to get the AABB to generate correctly? Since I have only 24 triangles in my proxy would it be cheaper to test every triangle rather than transverse the AABB tree?
2. Is there a way to get the convexSweepTest to do a quick board-based test First? Currently it tests every btCollisionObject in the world.

Regards,

Chris.
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Re: convexSweepTest Kinematic Object

Post by Erwin Coumans »

You should not need to worry about the AABB tree traversal cost.

It would be good to re-create a similar demo for Bullet, so we can do some benchmarking and see how we can improve performance.
Can you help with that, doing some profiling or a Bullet demo?

Thanks,
Erwin
codemonkey
Posts: 4
Joined: Sun Jul 24, 2005 2:46 am

Re: convexSweepTest Kinematic Object

Post by codemonkey »

Hi Erwin,

I'm in the process of modifying the character demo and I'll upload it once it’s completed.

I did a bit more testing, and I found that if I changed the collision shape too either btMultiSphereShape or btSphereShape, it runs at a better FPS. Previously I was using the btCapsuleShape.

Regards,

Chris.
tbastos
Posts: 2
Joined: Mon Apr 21, 2008 5:56 pm

Re: convexSweepTest Kinematic Object

Post by tbastos »

Hi,

Are there any news on the new kinematic character controller (Erwin or codemonkey)?
I have two weeks to put together a demo where a player must walk in and visit a building with multiple floors, stairs, etc.
I would like to use Bullet, but I don't have a lot of time to roll my own fancy character controller.

I know bullet does not have a kinematic character controller yet, but as it seems to be on the verge of being released, I thought I would ask... is it happening anytime this week?

Thanks for your help!
nadro
Posts: 17
Joined: Tue Jul 03, 2007 10:37 am

Re: convexSweepTest Kinematic Object

Post by nadro »

I also waiting for new version of Bullet Character Controller, more kinematic controller looks interesting:)
Last edited by nadro on Wed Jul 16, 2008 12:13 pm, edited 3 times in total.
codemonkey
Posts: 4
Joined: Sun Jul 24, 2005 2:46 am

Re: convexSweepTest Kinematic Object

Post by codemonkey »

Hi Erwin,

Over the weekend i ported my Character Control to a bullet demo(see attached). I took your advice and profiled it, and found most/all my problems were caused by me :oops:. This is by no means complete but atleast it might give people a starting point.

regards,

chris.
Attachments
CharacterDemo.rar
(11.53 KiB) Downloaded 382 times
Post Reply