Search found 874 matches

by Dirk Gregorius
Tue Nov 21, 2017 9:11 pm
Forum: General Bullet Physics Support and Feedback
Topic: Get linear velocity at non-central point on a rigid body?
Replies: 2
Views: 1750

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

The velocity of any point on the rigid body can easily be computed like this:

btVector3 Lever= Point - Body->GetCenterOfMass();
btVector3 Velocity = Body->GetLinearVelocity() + btCross( Body->GetAngularVelocity, Lever);

I assume all points and velocities are in world space here.
by Dirk Gregorius
Mon Nov 06, 2017 5:12 pm
Forum: Research and development discussion about Collision Detection and Physics Simulation
Topic: featherstone ABA in Bullet
Replies: 1
Views: 2294

Re: featherstone ABA in Bullet

IIRC the squared omega (angular velocity) terms lead to simulation instabilities in practice. So Bullet added damping to improve stability.
by Dirk Gregorius
Sun Sep 17, 2017 7:19 pm
Forum: Research and development discussion about Collision Detection and Physics Simulation
Topic: Correct Contact Manifold
Replies: 3
Views: 2912

Re: Correct Contact Manifold

Then (according to several sources) one says that objects A and B were hitted in points Support(A,normal) and Support(B,-normal) respectively. And here happens something weird. I don't know where this is from, but I can think of many examples where this wrong. Obviously you are proving this is not ...
by Dirk Gregorius
Sat Sep 16, 2017 1:40 am
Forum: General Bullet Physics Support and Feedback
Topic: Bullet stress test with 5K dynamic cubes
Replies: 3
Views: 3498

Re: Bullet stress test with 5K dynamic cubes

Pierre open sourced Peel. You can download it here:
https://github.com/Pierre-Terdiman/PEEL

I have integrated Rubikon into as well and use it constantly to compare performance. So you can run these tests yourself.
by Dirk Gregorius
Thu Sep 14, 2017 9:28 pm
Forum: General Bullet Physics Support and Feedback
Topic: Bullet stress test with 5K dynamic cubes
Replies: 3
Views: 3498

Re: Bullet stress test with 5K dynamic cubes

Pierre has done excessive testing which you can read about here:
http://www.codercorner.com/blog/?p=748
by Dirk Gregorius
Wed Aug 30, 2017 10:14 pm
Forum: General Bullet Physics Support and Feedback
Topic: Raytest seems to be inconsistent?
Replies: 3
Views: 1781

Re: Raytest seems to be inconsistent?

This is actually a common problem with physics integration into the game. I usually wrap the raycast API of the physics engine and allow the user to specify the filter plus a list of ignored entities. E.g in your case I would call something like: pScene->CastRay( RayStart, RayEnd, Filter, PlayerID )...
by Dirk Gregorius
Fri May 19, 2017 5:27 pm
Forum: Research and development discussion about Collision Detection and Physics Simulation
Topic: What is the meaning of parameter Kcfm in PGS Formulation?
Replies: 3
Views: 5619

Re: What is the meaning of parameter Kcfm in PGS Formulatio

This might be unrelated to the soft parameters. Normally we solve for a relative velocity of zero at a contact point or limit, but you can also imagine to solve to revert some of the approaching velocity to model bouncy contacts (e.g. a ball) or limits. https://en.wikipedia.org/wiki/Coefficient_of_r...
by Dirk Gregorius
Tue May 09, 2017 2:52 am
Forum: Research and development discussion about Collision Detection and Physics Simulation
Topic: Non-linear Gauss-Seidel solver
Replies: 11
Views: 5312

Re: Non-linear Gauss-Seidel solver

Sure thing! I am glad I could help. One thing I found over the years is that the theory can be quite involved, but the final result is relatively simple. On the downside there are quite some problems in the detail and implementation. But you will figure those out along the way and there is often no ...
by Dirk Gregorius
Mon May 08, 2017 4:45 pm
Forum: Research and development discussion about Collision Detection and Physics Simulation
Topic: Non-linear Gauss-Seidel solver
Replies: 11
Views: 5312

Re: Non-linear Gauss-Seidel solver

I would add one step for clarity: For n Newton iterations Update J, M and C using p For m Gauss-Seidel iterations For k constraints Solve lambda = -C / (J * M * J^ T) Update dp Update p And then you merge it like you show. I would not say it is equivalent, but it can converge against the same soluti...
by Dirk Gregorius
Thu May 04, 2017 5:02 pm
Forum: Research and development discussion about Collision Detection and Physics Simulation
Topic: Non-linear Gauss-Seidel solver
Replies: 11
Views: 5312

Re: Non-linear Gauss-Seidel solver

Ok, I give it a try. :shock: We integrate the forces and velocities to find a new position p using some unstabilized method of choice. Given the new p we now want to find a correction dp such that C(p + dp) = 0 . We can approximate this as shown above by C(p + dp) ~= C(p) + J * dp = 0 We also want t...
by Dirk Gregorius
Thu May 04, 2017 3:52 am
Forum: Research and development discussion about Collision Detection and Physics Simulation
Topic: Non-linear Gauss-Seidel solver
Replies: 11
Views: 5312

Re: Non-linear Gauss-Seidel solver

No, there is nothing hacky about orthogonal projection. It is simply an alternativ to Baumgart'ish stabilization to keep your solution on the constraint manifold. The linked Hairer paper discusses projection methods in general and in the context of multibody simulation. The J is not stolen, it comes...
by Dirk Gregorius
Wed May 03, 2017 3:00 pm
Forum: Research and development discussion about Collision Detection and Physics Simulation
Topic: Non-linear Gauss-Seidel solver
Replies: 11
Views: 5312

Re: Non-linear Gauss-Seidel solver

Short answer: J * M^-1 * J^T * lambda = -C This is the inner linear system in a Newton solver. The lambdas are now 'pushes' and get transformed into translations dx and rotations dq similar to impulses. After you applied the pushes the Jacobian and mass matrix (inertia) changes, so you need to rebui...
by Dirk Gregorius
Mon May 01, 2017 5:13 pm
Forum: Research and development discussion about Collision Detection and Physics Simulation
Topic: Non-linear Gauss-Seidel solver
Replies: 11
Views: 5312

Re: Non-linear Gauss-Seidel solver

Box2D has a separate projection step for the position constraints. As you pointed out already in another thread velocity constraints are linear, but position constraints are not. So you need to solve a *non-linear* system equations. Conceptually you can think of an outer loop for the Newton solver a...