Saturday, June 10, 2006

Graphics Assignment 3 (OpenGL Puppet) Done!

It was another long day but totally awesome and super successful. It was GREAT!! I was in the lab from about 3pm until about Midnight, and then came home, watched 20 minutes of SNL and then worked on this again for another 2 hours. :)

I got EVERYTHING done that I wanted to do, ohhh baby this was a sweet assignment!! So I now have a working "Puppet" in OpenGL, and you can select many of his joints (leg, knee, foot, shoulder, elbow, wrist, fingers, neck and head) and rotate them with the motion of the mouse.


The puppet's arm, leg, neck etc joints turn green when you select them

Today I did a few extra things, I added some cool headphones so he can rock out. Also I named him iPinocchio, cause my Dad said that would be a cool name for an iPod puppet. :) Most importantly, I got the iPod "scroll menu" to work!! I couldn't figure it out for hours tonight, and I was trying to do all this fancy multiple-display list kinda stuff. It was NUTS. So I temporarily gave up on it, and biked home, watched some SNL, ate some food and I was right back to it. I figured out the problems and now I am essentially mapping the x-motion of the mouse to a "fake" puppet joint directly above the iPod primitive geometric object. I then do a bunch of special case stuff like not changing the colour of the iPod when you select this special iPod joint and then also not applying the rotations from this joint since these rotations are used to specify which menu item the user wants to scroll to!! Good times!!!!!!!!!! I also use multiple display lists for this, so I actually have 6 separate iPods which I swap out by loading a different display list.

The reeeeeeally funny/awesome thing is that when you reset the joints in the program to their initial position, the iPod menu returns to it's initially selected menu item too!! This is pretty funny and was unexpected until I realized I just implemented the iPod Scroll Menu selection just like I did the regular iPod joints, so it just works out this way. Awesome!!

Anyway, great times and I love this class. But I gotta hand this in now and get some of my other work done as there is plenty I need to do for other classes as well. Sweeeeeeeet!!

Lower quality with starting camera position

Haha an error I ran into with Display Lists while trying to get the menu items to scroll, haha

Menu 1

Menu 2

Menu 3

Menu 4

Menu 5

Menu 6

No comments: