Search found 96 matches

by hyyou
Mon Jan 15, 2018 2:05 am
Forum: General Bullet Physics Support and Feedback
Topic: Coordinate Space Conversions? Are there any?
Replies: 4
Views: 5040

Re: Coordinate Space Conversions? Are there any?

Just want to add some little things to drleviathan's great answer :- the inertia's eigenvectors align with the cardinal axes of the shape's local-frame ^ btMatrix3x3::diagonalized() will help about this. In fact, this is the only way to have a concave RigidBody that is dynamic or kinematic. There ar...
by hyyou
Mon Jan 08, 2018 5:04 am
Forum: General Bullet Physics Support and Feedback
Topic: Getting from Rigidbody to GameObject (architecture question)
Replies: 1
Views: 2759

Re: Getting from Rigidbody to GameObject (architecture question)

Yes, it supports.
See btCollisionObject::setUserPointer(void*) / getUserPointer.
by hyyou
Thu Jan 04, 2018 2:02 am
Forum: General Bullet Physics Support and Feedback
Topic: Custom broadphase filter for city-sized world, need advice
Replies: 4
Views: 4258

Re: Custom broadphase filter for city-sized world, need advice

+1 drleviathan :lol: I heard a rumor that btAxisSweep3 and bt32AxisSweep3 is faster than the generic one "with a limitation that it requires a fixed world size". It is in Sweep and Prune (SAP) in http://www.bulletphysics.org/mediawiki-1.5.8/index.php/Broadphase ^Edit: Erwin doesn't think s...
by hyyou
Thu Dec 28, 2017 3:09 am
Forum: General Bullet Physics Support and Feedback
Topic: performDiscreteCollisionDetection (update manifold) for only a few bodies (ghost?)
Replies: 9
Views: 8434

Re: How to performDiscreteCollisionDetection (update manifold) for only a few bodies?

Thank drleviathan for the great detailed answer.
btPairCachingGhostObject is probably all I want (the 10-20 objects are all radar/sensor). I have never used ghost thingy before.

off-topic : It is lucky that this forum has you. :D
by hyyou
Wed Dec 27, 2017 2:18 am
Forum: General Bullet Physics Support and Feedback
Topic: performDiscreteCollisionDetection (update manifold) for only a few bodies (ghost?)
Replies: 9
Views: 8434

performDiscreteCollisionDetection (update manifold) for only a few bodies (ghost?)

I have a loop like :- btDiscreteDynamicsWorld_instance->stepSimulation(......); //has 1000 bodies (20% CPU) add / change position of 10-20 btRigidbody; btDiscreteDynamicsWorld_instance->performDiscreteCollisionDetection(); //<-- slow (10% CPU) iterating btPersistentManifold for collision callback; T...
by hyyou
Tue Nov 21, 2017 12:38 pm
Forum: General Bullet Physics Support and Feedback
Topic: Get linear velocity at non-central point on a rigid body?
Replies: 2
Views: 15042

Re: Get linear velocity at non-central point on a rigid body

I totally encapsulated Bullet, and coded such functions myself.
It is not convenient, but it works.

getVelocity_relativeToCM_worldAxis(Vector3 positionRelativeToCM);
getVelocity_relativeToCM_shapeAxis(Vector3 positionRelativeToCM);
getVelocity_absolutePosition_worldAxis(Vector3 worldPosition);
by hyyou
Mon Nov 06, 2017 10:05 am
Forum: PyBullet Support and Feedback
Topic: Questions about pybullet use in videogame
Replies: 4
Views: 7197

Re: Questions about pybullet use in videogame

Because no one answer ...

I am pretty sure that C++ Bullet is faster than its derivatives.

In practice, especially game, C++ itself is generally faster than python.
It is a reason that I lack knowledge to answer most of your questions.
by hyyou
Sat Sep 16, 2017 2:01 am
Forum: General Bullet Physics Support and Feedback
Topic: [solved] scale world 100x -> performance increase 3x
Replies: 3
Views: 4773

Re: scale the world up 100x -> performance increase 3x

Thank drleviathan. This is a very reasonable guess.
by hyyou
Thu Sep 14, 2017 6:53 am
Forum: General Bullet Physics Support and Feedback
Topic: Bullet stress test with 5K dynamic cubes
Replies: 3
Views: 22900

Bullet stress test with 5K dynamic cubes

I am trying to encapsulate Bullet to my ECS game engine. After some test, I can simulate 2000 cubes, dropped randomly on a 2D static plane. Cubes rarely touch each other. With rendering + my engine cost, in PC, I get :- >80 fps in normal case 50 fps in the worst case (a brief period that all cubes s...
by hyyou
Thu Sep 07, 2017 11:34 am
Forum: General Bullet Physics Support and Feedback
Topic: [solved] scale world 100x -> performance increase 3x
Replies: 3
Views: 4773

[solved] scale world 100x -> performance increase 3x

It is surprising that just scale every thing make so much difference in performance. :shock: First Experiment I created a scene with 1,000 cubes. Cube's size = 0.01f They scattered around a plane size = 5*5 (w*h) I got 20fps. The profile result states that Bullet Physics is the bottleneck. Second Ex...
by hyyou
Tue Apr 18, 2017 2:59 am
Forum: General Bullet Physics Support and Feedback
Topic: Scalling Bullet physics
Replies: 2
Views: 5722

Re: Scalling Bullet physics

It is a known limitation of Bullet. setLocalScaling is not a cure.

I agree with aviator : you have to manually swap the body.
by hyyou
Tue Apr 18, 2017 2:54 am
Forum: General Bullet Physics Support and Feedback
Topic: a lot of constraint connected together -> explode
Replies: 0
Views: 3175

a lot of constraint connected together -> explode

I have created many bodies with equal mass + constraint like this :- http://i.imgur.com/aaWhPsw.png ^ Image shows 401 chunk of body. 400 bodies are constraint-ed with a single body at the center. All bodies has equal mass. When I change the hook position e.g. bulletFixedConstraint->getFrameOffsetA()...