# Dirk Gregorius

Member

1162

• #### Days Won

3

Dirk Gregorius had the most liked content!

2877 Excellent

• Rank
Contributor

• Role
Programmer
• Interests
Programming

## Recent Profile Visitors

16590 profile views

1. ## Box2d overview

Box2D does not use incremental manifolds, but builds full manifolds each frame. The contact and friction impulses are matched between frames using contact IDs. Erin has given a bunch of talks over the year which cover certain aspects of Box2D in detail. You can find them all here: https://box2d.org/downloads/ The problem you are looking at is covered in quite some detail in the presentations from 2007 - 2009. Also note that there is a simpler version called Box2D Lite which might be an easier entry into this topic. I have recommended in the past (and still do) to start from there if you want to start a small home project. https://github.com/erincatto/box2d-lite HTH, -Dirk
2. ## Is simple matrix decompose normalizing 3x3 part safe?

The simple decomposition has problems if you use non-uniform scale in non-leaf nodes as this will introduce shear. I think the FBX documentation even states this as a problem. Practically I would not worry about this very much. Personally I use the built-in decomposition of the FBXAMatrix and never had problems.
3. ## Is simple matrix decompose normalizing 3x3 part safe?

I use polar decomposition. It decomposes a 3x3 matrix into a rotational and 'stretch' matrix. This is a good resource on this topic: https://research.cs.wisc.edu/graphics/Courses/838-s2002/Papers/polar-decomp.pdf Say you transform a vertex by a hierarchy of rotations and scale. E.g. v' = R2 * S2 * ( R1 * S1 * v ) v' = R2 * ( R1 * R1^T )* S2 * ( R1 * S1 * v ) v' = ( R2 * R1 ) * ( R1^T * S2 * R1 * S1 ) * v v' = R * S R * S is obviously a valid decomposition, but the scaling factor is not a pure 'stretch' as it still contains rotation. This can lead to interpolation artifacts. If you just want to bake the scaling part into some geometry this will be fine. So what kind of decomposition you choose depends a bit on what you are trying to do.
4. ## Algorithm How to Shapecast

No, not shape cast. Google for "Conservative Advancement"
5. ## Algorithm How to Shapecast

The best solution would be a method called Conservative Advancement. The question is whether you want to consider rotation or only linear movement. Erin Catto extended the algorithm and gave a good presentation here: http://box2d.org/files/GDC2013/ErinCatto_GDC2013.zip This is a non-trivial problem. If you google the term you will find a bunch of resources.
6. ## Question on finding contact point

I think this is not correct if you mean general triangle meshes. Both SAT and GJK only work for collision/distance between *convex* polyhedra. Also, you use SAT for nearly all boolean overlap tests I am aware of. At least in a specialized form. It is the basic idea for these kind of tests. For distance between two AABB you can write a simpler and faster specialization, but for OBB vs AABB/OBB I would already use GJK.
7. ## cadjunkie    Dirk Gregorius

Hey Dirk, a couple years ago I wrote an article about particle systems using second-order constrained dynamics method and you made the following comment:

Quote

In games we usually don't solve on the accelerarion level though, but use simple first order world steppers. For particle constraints and springs we even use very simple position based dynamics. Maybe you want to talk about how to derive these steppers in future articles?

My interests have taken me back in this direction, and I was curious to know what your favorite first-order method is. Is there one you consider more worthwhile than the others? I would love to take your suggestion and write an article about it.

1. It really depends on the problem. For cloth I would use simple position based dynamics. The reason is that these days it is well understood by artists and they know how to get the effects they want.