Sunday, May 22, 2011

Gravity, The Ground, and a Tripod Rain

This weekend has been jam-packed with programming and I've gotten a ton done. Today, I successfully completed my implementation of traversing the collision hierarchy and detecting collisions on all levels of the tree. Here is a video demoing this with three tripods and their respective bounding volumes (the bounding volume models are turned on now for testing and demonstration purposes. While they are difficult to see within the collision models, the tripod objects are green when not colliding and red when colliding, like their collision models).



Days and nights have flown by and I feel like the entire weekend has melded into one long time day but I am very happy with the results and will not let up with working on this and getting it done! Getting the collision hierarchy traversal for collision detection to work was by far the hardest thing in the project, if not all year, so far. I spent hours drawing out pictures, writing pseudo-code and debugging. In fact, I have a Steno pad full of variable addresses, diagrams, and my workings out. Yesterday was fueled by two bottles of 5 hour energy and a lot of determination. At around 1:30, my mind couldn't handle tracing through the logic anymore so I decided to go to bed. I still did not have collisions working correctly. I took screenshots to detail my progress though and what I had is chronicled in the images below:

Dynamic Traversal: Not Colliding
Dynamic Traversal: Level 0 Colliding

Dynamic Traversal: Side View - All Levels Colliding = Colliding Forms

Dynamic Traversal: Top View - All Levels Colliding = Colliding Forms
This looked great until I moved the objects even closer together, at which point no more collisions were registered. I began to run through my code again and rewrite it, but I was like a maniac at that point-- desperate and totally off. This morning though, I got up and went at it. With several hours spent in a marathon session of logic processing, I began to iron out the implementation and voila! I then proceeded to test more tripods as well as adding velocity to them (like in the video). Now, the plan that I have laid out is as follows, with the yellow highlighting representing what I have done already and the red what needs to be done:
  1. Program in a ground plane with respective model 
  2. Implement Gravity
  3. Write function for collision detection between Collision Volumes and Ground
  4. Implement Rigid Body Collision Handling between the Ground and Collision Volumes
  5. Implement Rigid Body Collision Handling between Collision Volumes (The detection is already implemented) 
Tomorrow will be another day full of hard work, but I am determined to also make it one full of results! The train is now in supersonic mode.


No comments:

Post a Comment