Questions about using the BSDF library


#1

I have been playing around with the BSDF library lately and ran into a confusing issue. I am trying to use the SDevalBSDF function to get reflectance from the material for a given pair of incoming and outgoing vectors. Elsewhere in the BSDF code (e.g. in loadBSDF), the cieY variable holds this information. However after my call to SDevalBSDF the cieY value of the SDdata variable I passed in, is clearly not reflectance. The values are all greater than 1 and in some cases are extremely large (i.e. 10^3 or 10^4).

The BSDF files I have been trying behave as expected in the actual viewer, and I have confirmed that all the geometric info (i.e. surface normal and ‘up’, as well as transforming the in and out vectors to the BSDF reference frame) is correct. also tried multiplying by the solid angle of the pair using SDsizeBSDF but that results in reflectances that are too small.

Can someone enlighten me on what I am missing?


#2

The library is behaving as expected. BSDFs are a differential quantity that can take on any non-negative value. They integrate to 1.0 (at most) over projected solid angle, but they are not restricted to values less than 1 at any given pair of input/output directions.


#3

It seems I misunderstood the intention of the evalBSDF function, I didn’t realize it was returning the differential quantities.

Thanks for the quick reply!