Jump to content
  • Advertisement
Sign in to follow this  

Problem with volume shadow rendering

This topic is 4254 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 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
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!