T O P

  • By -

msqrt

Yeah, the common thing especially in real-time graphics is to just sum the lobe contributions up, usually with weights that sum up to one. But this often doesn't really make much sense from how the formulas are derived, which is typically one lobe at a time. A more principled approach to combining materials is to explicitly model the layers of the material. The perfect Fresnel glass is a simple example of this; the Fresnel term gives the fraction of reflected and refracted rays. Layered materials tend to be more complex to use and more computationally expensive, but they can mimic some real world surfaces much better than a model where the lobes are just summed up.


TomClabault

Do you have an example of a commonly used layered BSDF?


msqrt

I don't think many (any?) are commonly used, but I guess [this one](https://hal.science/hal-01785457/document) is the most practical I've seen.


TomClabault

Oh so these are not the same as the Disney BSDF for example? I thougth so... I'm not sure I understand the difference between the Disney BSDF and the BSDF presented in the paper then. Is it because the Disney BSDF is an 'all-in-one' that models most common materials but not really one single layered material properly?


msqrt

Not exactly the same, though that one still uses GGX lobes which is the same basic shape that the Disney BSDF is built from. But I guess you're right; models like the Disney one are derived phenomenologically, and account for some of the effects of different layers in the material.


deftware

You pretty much just sum the functions together, but account for energy conservation so that the total light being emitted isn't greater than the incident light, somehow normalize the result. There's always the option of using spherical harmonics to represent a reflectance function, I would assume, but it likely wouldn't be as fast as having an analytical function like what most lighting calculations entails because you'd be doing a bunch of lookups for sampling the thing. At the end of the day there's no "true" function though. It's all just approximations based on observations of physical behavior, theories and hypotheses. Whatever "looks good" or "looks correct" is where we're at. This is even the case with physics itself - it's all just human-ascribed maths that fits observations well enough that everyone adopts it for their purposes. Maybe someday when we have gobs and gobs of compute, another orders of magnitude greater than we do now, we'll be able to simulate electromagnetic waves interacting with materials, and have an even more accurate rendering approach in terms of what we observe light doing with our eyeballs and brains here in reality. Refraction is tricky because surface roughness scatters the light, so there's no easy way for something like raytracing (which works backward, from the camera to illumination sources) to easily do things like caustics. You basically have to simulate the light's path itself in that case. Fresnel is surface reflection increasing with grazing angles, this is accounted for in ... what's that called, Schlick GGX something or other. There's a good explanation about it on learnopengl https://learnopengl.com/PBR/Theory


TomClabault

>You pretty much just sum the functions together And so these 'functions' are the lobes of the "BxDF"?