Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Patrik Svensson

Raytracing, BRDF reflection/refraction

This topic is 5480 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''m trying to implement a raytracer and have a few basic questions. I have a BRDF that I use to calculate reflections and it works very well. The problem is refraction. Ok, the BRDF calculates the amount of light that is reflected given two vectors k1 and k2. Imagine the following: (reflection and refraction is prefectly specular for now) (and no absorbation occurs) 1. Ray r intersects an object at position P 2. Calculate direct lightning from lightsources 3. Calculate reflect_dir 4. Amount_of_reflected_light = Raytrace(reflected_dir)*BRDF(incident_dir,reflect_dir,normal) 5. Refraction? If my material transmits light how do I calculate the amount of refracted light? QUESTION? Amount_of_refracted_light = Raytrace(refract_dir)*(1.0-Amount_of_reflected_light)?????? QUESTION? If I get "total internal reflection" when using Snells equation do I just ignore the refraction or do I treat it as a reflection? So, basically could someone explain in detail how refraction works together with reflection when using a BRDF. Cheers, Patrik

Share this post


Link to post
Share on other sites
Advertisement

  • 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!