Friday, February 15, 2013

Graphics Assignment 4

Phew......This assignment was too big for me. This assignment needed a good structure.

In my structure, scene has information about the Light, Camera and the Entities.

Entities had information about Meshes and Materials that the mesh will use.

Materials had texture information and effects which will be applied to the Mesh.

So basically a mesh got data from 2 sides. 1. Scene and 2. Materials.

After a mesh had all the information it needed, during the Mesh Update, it drew on the screen. There were more than one entities on the scene, each with a different material and different effect.

I got stuck with a trivial thing for very long time. I could not see anything on the screen. Then Sagar Mistry was tweaking through my PIX and said there could be something wrong with the transforms. So then I checked my files and CameraPosition was {x,y,z} = {0,-10,0} instead of {x,y,z} = {0,0,-10}.

Controls

Moving the camera

W A S D

Moving the Light

T F G H

Moving the objects or meshes

Arrow Keys

Download Code



No comments:

Post a Comment