So I have begun the process of constraints and I felt I would share some of my initial insights and things to watch out for when starting.
First and foremost, always check what space you are in and make sure that everything is in the appropriate space. Most notably take care with your "r" vector and your inertia tensor. By "r" vector I mean the vector from the point of contact to the center of mass. Along the same lines take into account what direction your normal is facing. You may assume obj1 to obj2 while a paper may assume the opposite. And don't just flip the negative sign and see that it works, take the time to sit down and figure out if that is really the correct answer. That brings me to my second thing to be wary of...points of contacts. Make sure that your collision data is extra accurate as constraints seem to have bigger issues if the point of contact is not actually on the body. And thirdly, do not use the previous integration scheme I mentioned for constraints. By integrating and then reverting positions, the point of contact is no longer on the body which goes back to issue two. Then again, constraints should not need any fancy integration scheme because they can make stacking work on their own. The original Fedkiw method may still be applicable, but other one causes many issues with things other than constraints, such as swept collision. My plan is to use a more traditional approach to integration while developing constraints, and then try out the Fedkiw approach since it should introduce almost no negative effects on constraints or swept.
Now hopefully no one who reads this will fall to some of the same pitfalls that I fell into initially. Once I actually get my constraints working with friction and position correction then I'll post a more in depth blog on how to do constraints. I also plan to try something other than just a contact constraint, so I'll able to get a sense of how extendable my current approach is. Until then...
Monday, March 1, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment