Archived

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

Patrik Svensson

Raytracing, BRDF reflection/refraction

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