So the semester at DigiPen has finally ended. I have replaced the old Sandbox download with the most recent version of it that was the final result for my classes. I have not taken the time to strip out the features that are not %100 finished, so some things will not work as desired, most notably is soft bodies.
Also, my game has been finished and now has a new video as shown below:
Now for an update as to what I am doing now. First, I will not be continuing on my current team, but will instead be joining team Semi-Mobile from DigiPen on their game Redivivus to polish it up for competitions.
Exactly what I will be doing on the team is not decided, but I will most likely be doing some tools, along with helping out on physics and wherever else is needed.
Another thing that I will be doing this summer is working on an open source game engine that one of my teachers is making for eventual public consumption. Me along with 2 other guys (one from Redivivus) will be doing the physics, math library and collision tests for the engine.
Along with this, I will still be working on my own Sandbox, but I am currently ripping apart large sections of it and re-doing how a number of things work given that I know how to set things up much better now. I would hope to have a working version of my sandbox within a month. Most likely, nothing will look different, maybe I'll get around to putting shaders in, but most of the changes will be internal structure changes.
Wednesday, May 5, 2010
Friday, April 16, 2010
Dimension of constraints
So I currently have a very basic motor in, just achieves a certain angular velocity as an equality constraint, but I thought I'd mention an issue I ran into.
Constraints can only be solved on one dimension at a time in constraint space. Well what does this mean? When a constraint is moved from normal euclidean (or another space) into constraint space it becomes a generalized coordinate. An example of such things is the contact constraint. When we look at it we see that the constraint is in multiple directions, the x,y,z. But in reality the constraint is along one dimension, the normal. So what becomes a two dimensional constraint space problem? How about friction. Friction constrains the movement in the plane perpendicular to the normal. Well there are an infinite number of directions to pick from if you use only one, but if you use two then you can cover the entire space. This brings me to where I actually learned this issue, with motors. If you want to make a motor have a target angular velocity of 1 about the x, 0 about the y and 5 about the z, well you can't, at least not with once constraint. As some may recall, we have three degrees of rotational freedom, so obviously we can only constrain 1 degree at a time. So to take care of this issue we have to have 3 constraints, one for each axis angle we want to rotate about.
I'm trying to get a better way to manipulate my motors, mainly via the arrow keys so I can control a player, but things aren't set up well for that right now on top of the fact that our gold at DigiPen is due in less than a week now. After this semester I might be re-gutting most of my engine, but I'll try to get a basic video up before then.
Constraints can only be solved on one dimension at a time in constraint space. Well what does this mean? When a constraint is moved from normal euclidean (or another space) into constraint space it becomes a generalized coordinate. An example of such things is the contact constraint. When we look at it we see that the constraint is in multiple directions, the x,y,z. But in reality the constraint is along one dimension, the normal. So what becomes a two dimensional constraint space problem? How about friction. Friction constrains the movement in the plane perpendicular to the normal. Well there are an infinite number of directions to pick from if you use only one, but if you use two then you can cover the entire space. This brings me to where I actually learned this issue, with motors. If you want to make a motor have a target angular velocity of 1 about the x, 0 about the y and 5 about the z, well you can't, at least not with once constraint. As some may recall, we have three degrees of rotational freedom, so obviously we can only constrain 1 degree at a time. So to take care of this issue we have to have 3 constraints, one for each axis angle we want to rotate about.
I'm trying to get a better way to manipulate my motors, mainly via the arrow keys so I can control a player, but things aren't set up well for that right now on top of the fact that our gold at DigiPen is due in less than a week now. After this semester I might be re-gutting most of my engine, but I'll try to get a basic video up before then.
Monday, March 29, 2010
Constraints Update
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.
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.
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)