So here is a powerpoint on constraints that I created and recently lectured on at the game physics club at Digipen. Slides Download
If anyone has questions on anything in the slides, feel free to ask.
Here are some new videos that are not in debug mode with cooler features.
This is just a cooler looking rope bridge with smaller length constraints than before.
And here is a small "structure" made using stick constraints instead of ropes. Currently, the constraints do not have a "strength" value, so all constraints have an equal strength. This means that when I hang objects from the top, the bottom tends to be violated. I could always add more constraints to the bottom to "reinforce" it, but I would like to give it a strength at some point.
I have also added a lot of other cool features in my GUI that cannot be seen on this video, including deleting specific constraints and editing them as well.
Also a newer video of our game with properly exported character models. I would show the new character, but he can't do much without me networking this...we'll have to record an official video at some point as a team.
I might try to throw in some velocity motors in the near future, but the semester is ending soon and the game will require more attention.
Monday, March 29, 2010
Tuesday, March 16, 2010
Sandbox Fixed
So I decided to actually try my sandbox on a different computer and it turned out it would crash on XP because of some dll linking issues. After some time I tracked it down to an issue in my crash handler. Anyways, I have fixed it and re-uploaded it. The download links have also been fixed.
Edit: forgot to also mention that I have now included the ability to make distance joint constraints since I have that working now. Instructions for how to use it are in the readme.
Download
Edit: forgot to also mention that I have now included the ability to make distance joint constraints since I have that working now. Instructions for how to use it are in the readme.
Download
Sunday, March 14, 2010
Constraints!
So I've been working on constraints for a while and got some stuff working so I thought I'd post some quick video clips. So far I have contact constraints and distance joints working, although contacts still have quite a few issues so stacking doesn't work yet. With the distance joints I was able to build a quick rope bridge that I made some videos of.
Some quick notes about these videos. First, this was my first attempt at making a rope bridge once I just found a big stability issue, so this video was recorded in debug mode. Second, you can see that contact constraints kind of work, but things like friction aren't the greatest in the first video. I had to make the block move slower otherwise it kept slipping off.
Anyways, that's a quick glimpse of what I'm working on. Pretty soon I hope to have contact constraints working well enough to stack and I'll also get up a better video that's in release mode. I will most likely be giving a lecture on constraints for the game physics club at my school soon, so I will be making some slides explaining constraints and the process of making them work.
Some quick notes about these videos. First, this was my first attempt at making a rope bridge once I just found a big stability issue, so this video was recorded in debug mode. Second, you can see that contact constraints kind of work, but things like friction aren't the greatest in the first video. I had to make the block move slower otherwise it kept slipping off.
Anyways, that's a quick glimpse of what I'm working on. Pretty soon I hope to have contact constraints working well enough to stack and I'll also get up a better video that's in release mode. I will most likely be giving a lecture on constraints for the game physics club at my school soon, so I will be making some slides explaining constraints and the process of making them work.
Thursday, March 11, 2010
Sandbox
So I set up a slightly stripped version of my sandbox that is available for download via this link Sandbox. The main thing that was stripped out is the soft bodies, as they currently will not collide properly with the heightmap ground and just fall through. I have not stripped out the code, just the interface in the GUI. In the download, there is a readme that explains the basic controls and how to operate my sandbox. A small bug I found after I uploaded is that after resetting the system, impulses are still used even if constraints is chosen. To fix it, just click impulses then constraints again.
I want to point out also that the constraints being used are not done, in fact they are very much in a trial state, but I wanted to include it incase anyone wanted to see. At the moment there is only a contact constraint, but it shouldn't be too hard to add other simple ones.
I want to point out also that the constraints being used are not done, in fact they are very much in a trial state, but I wanted to include it incase anyone wanted to see. At the moment there is only a contact constraint, but it shouldn't be too hard to add other simple ones.
Monday, March 1, 2010
Constraints starter
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...
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...
Subscribe to:
Posts (Atom)