1

I am writing a path tracer. And I am ready to add more materials.I added a mirror like this : `

Spectrum MirrorBSDF::f(const Vector3D& wo, const Vector3D& wi) {
        return reflectance  * (1.0 / abs_cos_theta(wo));
    }

` But I do not know how to evaluate the BSDF of the glass material.Someone know? Thanks.

I implementd it. but something is error.My render image is this: enter image description here

.Why have some dark color around sphere?

Edric
  • 24,639
  • 13
  • 81
  • 91
bin guo
  • 21
  • 3
  • There is too little information to understand what is your problem. What are you trying to implement, Disney "principled" BSDF or something else? What is this library you are using, what is this `Spectrum` type, a float or double or something else? In any case, you can also try posting this question in the [Computer Graphics (beta) Stack Exchange](https://computergraphics.stackexchange.com/) site. – jdehesa Jan 17 '18 at 15:01
  • I posted this quesition to https://computergraphics.stackexchange.com/questions/6135/how-can-i-implement-this-bsdf . – bin guo Jan 18 '18 at 04:01
  • Scattering coefficients are either measured or computed by probabilistic math. Google some articles about **Atmospheric scattering (MIE Rayleight)** there you might find the equations you are looking for. Also reflectance is based on **Fresnells** so google that too. Here some stuff that might interests you: [multi band rendering](https://stackoverflow.com/a/29575362/2521214) , [GLSL mesh back raytracer](https://stackoverflow.com/a/45140313/2521214) , [GLSL volimetric back raytracer](https://stackoverflow.com/a/48092685/2521214) – Spektre Jan 18 '18 at 08:35

0 Answers0