PDA

View Full Version : lighting question



schwinn
02-01-2002, 11:28 AM
I have a terrain model which contains a couple of buildings. I want to add a light source where all visible sides of the building, no matter what angle I'm looking at it from, are lit equally. How do I do that?

Bob
02-01-2002, 11:34 AM
Are your normals correct?

schwinn
02-01-2002, 12:39 PM
They seem to be. I have a list of triangles that I just loop through, calculate the normal for each & then draw it.
My initial camera position is at 0, 15, 10 with an up vector of 0, 0, 1.
A light position of 25, 20, 75, 0 is what I'm using right now. As I rotate around, the building sides look fine when they're directly hit by the light. When they move out of the light they look black.

blood.angel
02-01-2002, 12:43 PM
Could have four lights that shine on each side of the building.

Or one light at the cameras poisiton and move it all with your camera.