Sign in to follow this  

Lighting my scene, half working

This topic is 4305 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi guys, I have a scene, It is enclosed withing a cube. Each side of the cube is a grid of quads. I have added lighting; I place a positional light at the origin, the centre of my scene. But only 3 of the sides of my scene are lit. I think it is because I use one fucntion to draw a grid then translate & rotate them into the requred positions; 3 of my sides are rendered the wrong way around (the wrong winding). How can I enable lighting to light both sides of my grids? Thanks for any help given!

Share this post


Link to post
Share on other sites
Sounds more like the normals for the grid are opposite direction to what they should be for the face that is not lit. Double check the normals for the vertices first. You might be generating the normals and then of course your translation and rotation means they end up facing the wrong way. I have a habit of drawing them to convince myself they are correct, but for a grid this should be fairly obvious by just looking at some debug output.

F451

Share this post


Link to post
Share on other sites

This topic is 4305 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this