Sign in to follow this  

Little help with lighting in action.

This topic is 4201 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

I created a cube with texture. And a plane in front of the cube and bigger than the cube surface 2 times. I enabled light and rotate it around the objects. When the light position is in front of the plane the plane. The plane got shine right? But the problem is the back of the plane and the cube also shine. So How do I fix it!? Sry if my english is suck. I dont speak english or use english everyday.

Share this post


Link to post
Share on other sites
It's un-clear what the problem is.

Is the problem that the cube (or plane) doesn't cast shadows on the other object? If so, you need to use some global illumination method (stencil shadow volumes; depth shadow maps; etc) to make the shadowing happen.

Is the problem that your plane is visible from both sides, and is lit when you're looking at it from the rear, when it is facing the front? If so, then your plane is not back-face culled. You need two-sided lighting to make that case work right -- or you need to turn on back-face culling, and generate the plane as two separate planes, facing in each direction.

If the problem is something else, then please describe, step by step, what you are drawing, where the camera is, what the light is, and what you are getting. Then describe, step-by-step, what you actually want to see. One or two screen shots might help.

Share this post


Link to post
Share on other sites
I knew it I wrote it confuse. Well I mean that There were 1 cube and 1 plane in front of it. And I point light in front of a plane which in front of the box. The box shouldn't shine right? Because it behind the plane but my problem is the box also shine while it was behind the plane. I dont know what to do to fix..

Share this post


Link to post
Share on other sites

This topic is 4201 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