Jump to content
  • Advertisement
Sign in to follow this  

volume rendering and local illumination

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

For local illumination of volume rendering, we assume the light reflects at the isosurfaces. And the common way to get the normal at a point on the isosurface is from the gradient. However, I have a question: How do we know if the gradient vector will be an inward or outward facing normal? I noticed that I was not getting correct lighting, but when I reversed the direction of the gradient, the lighting came out correct.

Share this post


Link to post
Share on other sites
Advertisement
The gradient of a function always points in the direction in which the function increases. If your function is positive inside objects and negative outside, then the gradient faces inward. Otherwise it faces outward.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!