Yves Poissant ypoissant2 at videotron.ca
Tue Dec 1 04:43:15 CET 2009

```From: "Matt Ebb" <matt at mke3.net>
>> Matt proposes a Sample_F output here but it's not entirely clear to me
>> how this works, I also couldn't understand from the Houdini
>> documentation for example if their BSDF F value is just a
>> vector/scalar value or also contains information on how to sample it.
>
> I've done some research on this, and I think I have a fair idea of
> what's going on in there. I actually suspect it's quite similar to
> what I was toying around with before [1]. Rather than containing
> merely values, the brdf type probably contains some function pointers
> to pre-made functions (i.e. lambert distribution, phong distribution,
> etc), since that's really the only way to represent a Scattering
> Distribution _Function_. It also contains some other flags to say what
> kind of scattering it can represent (diffuse, glossy, specular,
> emission) etc, and probably some custom data to represent bsdf
> parameters (like a glossiness slider).
> I'm guessing this via a few VEX functions:
> * sample_bsdf() [2] that takes a bsdf, 2d random samples, and shading
> geometry as input, and returns an outgoing vector - eg. for lambert a
> cosine weighted vector in hemisphere, and
> * eval_bsdf() [3] which takes a bsdf and shading geometry input and
> returns a colour (proportion of light that's reflected) - eg for
> lambert, L.N .

Just a thought, In the literature, it is common to name the BRDF as a
function f in equations. f usually takes wi and wo as parameters: the
incident and the exitant vectors and it returns the proportion of incoming
radiance that is reflected back in wo direction. Also written as f(wi -> wo)
to better indicate the direction. All other surface properties and
geometries are implicit. Maybe the Houdini F comes from that?

Yves

```