Page 1 of 1

btKinematicCharacterController wierd when size gets larger

Posted: Sat Feb 11, 2012 3:27 pm
by spixxel
Hi, i have made some test program that uses btKinematicCharacterControllers to simulate humanoids that can walk around but I have some problems that I don't know why the occur.

When I increase the size of the charactercontroller, or more preciesly the size of the capsuleshape that the ghost object contains and performance goes down rapidally

When the capsule is 0.75*0.75 then the stepphysics takes approx 0.55 ms

and dispatchAllCollisionPairs takes 0.05 ms
and updateActions takes 0.435 ms

but when I let the capsule size be 30*30 then the difference is huge.

then in 1 frame the stepsimulation takes 103 ms

and updateActions takes 97.097 ms
and dispatchAllCollisionPairs takes 5.915 ms

is this normal?, nothing else is changed and the charactercontrollers are not colliding with eachother

very glad for as many responses as possible (as long as they have suqqestions and information)

/Per

Re: btKinematicCharacterController wierd when size gets larg

Posted: Sun Feb 12, 2012 6:42 am
by spixxel
any1 got an idea about why?, would appreciate every suggestion

Re: btKinematicCharacterController wierd when size gets larg

Posted: Thu Feb 07, 2013 4:31 pm
by Pentium166
I'm having the same problem, I've searched the forum for it but this one is the closest with the problem I'm having now.
Does anyone have any ideia???

Re: btKinematicCharacterController wierd when size gets larg

Posted: Fri Feb 08, 2013 2:43 pm
by MaxDZ8
I speculate much more manifolds are generated. Mind checking your manifold count?

Re: btKinematicCharacterController wierd when size gets larg

Posted: Fri Feb 08, 2013 9:02 pm
by Pentium166
MaxDZ8 wrote:I speculate much more manifolds are generated. Mind checking your manifold count?
Sorry I forgot to tell that english isn't my first language and also...I'm a newbie on bullet (started two weeks ago) so...how do I do that???

Re: btKinematicCharacterController wierd when size gets larg

Posted: Sat Feb 09, 2013 8:02 am
by MaxDZ8
Call btCollisionDispatcher::getNumManifolds().

Re: btKinematicCharacterController wierd when size gets larg

Posted: Sat Feb 09, 2013 5:07 pm
by Pentium166
It's 2...it's always 2...even in the parts where I got slowdowns...

Re: btKinematicCharacterController wierd when size gets larg

Posted: Wed Feb 13, 2013 2:37 pm
by MaxDZ8
What broadphase are you using? I might want to investigate that.

Re: btKinematicCharacterController wierd when size gets larg

Posted: Wed Feb 13, 2013 5:57 pm
by Pentium166

Code: Select all

broadphase             = new btAxisSweep3(VECTOR3D(-200,-200,-200), VECTOR3D(200,200,200), MAX_PROXIES);
collisionConfiguration = new btDefaultCollisionConfiguration();
dispatcher               = new btCollisionDispatcher(collisionConfiguration);
solver                     = new btSequentialImpulseConstraintSolver();
dynamicsWorld         = new btDiscreteDynamicsWorld(dispatcher, broadphase, solver, collisionConfiguration);

Re: btKinematicCharacterController wierd when size gets larg

Posted: Tue Feb 19, 2013 6:44 pm
by MaxDZ8
I'm sorry I've grossly failed to explain myself.
I would like to replicate your experiment so I can investigate.
Do you mind sharing the code?

In the meanwhile, also try btDvbtBroadphase.