Thursday, March 31, 2011

Daily Progress

This is more of an update than a new post, but I am happy to report that I have made a lot of progress today. I feel very productive and am excited to go to class to learn about importing model fbx's into my project and converting them into binary;-) I plan on using this first for displaying my bounding spheres.

So, things that I have accomplished so far today:
  • Fixed code to calculate transformations correctly. I now create temporary transformation matrices every update and have persistent model and modelView matrices in the base object of my primitive forms' class. This means that every update, none of the transformations are incremental, but rather the matrices are reset to identity and then the desired transformation is applied. I knew that my code was hacky before, but I didn't realize the deep repercussions it could have. Keenan even mentioned that it could lead to the object exploding or twisting on itself if you let transformations increment, such as constatly changing a saved rotation matrix. Happy that this is ironed out! Tranquility in my code garden.
  • Created a sphere in Maya and saved it with tri's rather than quads. I asked Nick, a graphics guy, to do the Tri conversion for me. Then I saved it as a .fbx, ready for use in my next set of work!
  • Fixed up bounding sphere creation code. Now that the transformations are working correctly, I can actually multiply the sphere center by it's LocalToWorld matrix to transform it just like the object, and the radius by the max. absolute scale to have it encompass the object. No more weird kinks, which leads to...
  • Sphere to sphere collisions working! I tested these using printf's, visually, and in debug by checking the values.
All in all, good progress that I am very happy about.

No comments:

Post a Comment