Friday, January 25, 2013

Game Graphics Assignment 3

this assignment wasn't too bad. I had extra time early and decided to get this out of the way. I had done all of this in game engineering already. In that class we had to do per vertex and per pixel lighting with both diffuse and specular. So doing per pixel diffuse lighting was simple. All of the specific function calls i just looked at my old code for.

To move the camera use wasd (there is no forward and backward, the camera always faces 0, 0, 0)
up: w
down: s
right: d
left: a

To move the light use the numpad
numpad8: Up
numpad2: Down
numpad4: Left
numpad6: Right
numpad7: +Z, towards the camera at first, then passing and going behind the camera
numpad9:  -Z, away from the camera

The main problem i had is that i forgot how assert works. I had put a function call in the assert statement. So when i went to release mode that call was optimized out. Other than that it went fairly smoothly.

One thing i did do that i wasn't sure if i should have or not was i took out the color from the vertex. We aren't using it and without the color it is 32 bytes instead of 36 bytes. I can easily add it back in if we use it later.

Everything should be working. Although i can't always tell if the lighting is correct or not.
http://www.eng.utah.edu/~codyh/u0789429-Graphics-Assignment-3.zip

I wasn't entirely sure what you meant by the texture resource in pix. i double clicked on the texture and got a picture of it. So i think that is what you mean.

No comments:

Post a Comment