Sign in to follow this  
karx11erx

Problem with volume shadow rendering

Recommended Posts

I am having a strange problem with determining which faces of a model are visible from the light source. A few pics to illustrate this: The rectangle is the (test) face. The red line is the line from the light source to the rectangle's center. The yellow line is the face normal. If the rectangle is considered facing towards the light source, it is dark blue and the lines are red and yellow. If not, it is green, and the lines are blue. If the viewer is facing slightly upwards, the rectangle is considered facing the lightsource. If I point the viewer slightly down (below the horizontal), the rectangle is considered not facing the light source. If I get behind the rectangle, I have to point the viewer slightly above the horizontal to make it considered not facing the light. In the rendered image, the angle between line (light source, face center) and the face's normal doesn't change. Depending on viewer position and heading, the dot product between these two vectors is > 0 or <= 0 though. One hint: I am doing all these computations with all vertices projected according to viewer position and facing. I have found out that the distance from viewer to face center changes according to viewer orientation. The projection takes an aspect ratio into account. I have no idea what's going on here. WTH am I doing wrong? Please help. [Edited by - karx11erx on November 24, 2006 6:39:55 PM]

Share this post


Link to post
Share on other sites

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