Problem with volume shadow rendering

Started by
0 comments, last by karx11erx 17 years, 4 months ago
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]
_________karx11erxVisit my Descent site or see my case mod.
Advertisement
Problem solved. That was a little tricky.
_________karx11erxVisit my Descent site or see my case mod.

This topic is closed to new replies.

Advertisement