Tuesday, June 06, 2006

Got some decent Graphics stuff done tonight

Tonight I got some sweet Graphics work done, after having a couple of days of frustrating hardware-related programming errors which were totally NUTS!! On Sunday, I wasted most of the day trying to get an image to display in my OpenGL viewport. Nothing was visible, and I must have commented in and out every single line trying to get it to work. :) Haha it was totally crazy. After trying this for hours and my kind roommates reading through all of my code and still not finding any errors, I thought, "Hey, why don't I submit this to the school machine, ssh into there and see if it magically works there for some unknown reason!!" Haha and if I hadn't tried that, I might have continued to comment in and out for another 5 hours, haha. Ohhh man!!!

So the problem turned out to be that there is some difference between the OpenGL implementation on NVIDIA and ATI cards running under Linux. Since I am running Ubuntu, I think I am using some random open source Linux Video Card driver, and I have heard that the ATI drivers can be flaky at times. Turns out that for some reason, when I used the glMultMatrixTransposed(matrix) command, my Ubuntu Linux didn't understand this and draw nothing (or random figures) on the screen. I thought this might be because my camera was inside my objects, or because of a lighting problem but this was the only issue. By switching from glMultiMatrixTranspose to glMultMatrixd(matrix.transpose()) this completely fixed the problem. Crazy!! So it ended up working when I ssh'd into school so I figured it was some issue with my local machine, and it was.

Hehe so you think I might learn from this right??! Hehe well folks again I made the same mistake tonight of assuming that my hardware was correct, and assuming that if it wasn't then ssh'ing into the school would solve my problems. :) I had the image appearing, but when I switched from just drawing the spheres normally to using a glDisplayList, the final sphere I drew did not have a material attached to it! Crazy eh?! So this was a decently big problem as I couldn't figure out why it was missing the last material, and after several hours of trying lots of different things, then I tried to ssh into school and it still looked incorrect.

Turns out that Matt's old assignment also looked like this on my machine at home, so after class tonight I went to the Graphics Lab and it turns out that it WAS my machine acting up AGAIN!! :) It looked just fine on the Graphics Lab machines with and without the glDisplayList, so I uncommented it at home and I was finally past these hardware issues. Crazy!! So tonight I actually finally got some decent work done for Graphics, I did the translation commands for the root node of the hierarchical model that I am going to build, using the mouse motion to map to the translation amount. Good times!!

So it's 3:30 again and tomorrow I meet my Fine Arts Prof again to show him my new stuff. I hope he likes it, and I will post the final images once he decides they are done.


Hierarchical Modeling working in OpenGL

Sweet!! Translation on all 3 axes mapped to mouse motion

No comments: