PDA

View Full Version : Lighting and viewing



aus79er
03-30-2002, 10:41 AM
I have a 3D object which i am displaying using triangles.
The problem I am facing is that the object doesn't look 3D.
what are the steps i should take to enhance the view.
Can anybody explain me the steps in detail.

Also I have problem regarding calculating the normal to the surface.Its ok for flat surface,but the top surface of cube is not flat,but its a sculptured surface(uneven)...how should i go about find the normal.

Thanks in advance,
aus

ThinIce
03-30-2002, 11:55 AM
Add this before you start drawing the triangles:

glRotatef(10,1,0,0);

That should change your perspective a bit. Of course you'll need mroe information than this. I wuol reccomend you look at the great tutorials at:
http://NeHe.GameDev.Net

zed
03-30-2002, 12:16 PM
http://www.xmission.com/~nate/smooth.html