Re: Question about BSDFClosure functions

brecht <brechtv...@...>

Hey Alejandro!

Great to hear from you, I had no idea you were involved in this

On Jan 14, 6:31 pm, Alex Conty <a...@...> wrote:
I have a question that I couldn't find an answer to in the
documentation or source code. The BSDFClosure has eval_reflect,
eval_transmit and sample functions. Some rendering engines have an
additional function to compute the average reflected or transmitted
color independent of the incoming light direction, by the integrating
the bsdf over the incoming light direction without any lights. In PBRT
for example this function is called rho.
I understand the main use for this is importance sampling. I'm afraid
I'm not allowed to say how we do things here at imageworks, but there
are other ways to do importance sampling. That function would make
things easier, of course, the problem is that not all BSDF's can be
easily integrated. The expensive method is not an option, it would be
overkill. So you need an analytical solution which is not always
I incorrectly interpreted what would actually be given to the
renderer, I thought it would be a single bsdfclosure that somehow
included additions and multiplications, but looking at the source code
more closely, it's a weighted sum of different closures. That leaves
importance sampling and other things more to the rendering engine, so
that solves my question. I was assuming otherwise because this imposes
a limitation on how you can combine/manipulate closures, but I guess
there's still closures written in OSL that could be used to get around
the limitation.


Join { to automatically receive all group messages.