Dev:2.5/Source/ShadingSystem/UI
< Dev:2.5 | Source | ShadingSystem
UI Notes
Issues (solved)
- Physically based materials often do not make a distinction between diffuse/specular/transmission, rather working as one big BXDF. At the source code level it is not too difficult to support these different subsets still, and various algorithms need them.The material UI we should then also support such combined BXDF's, but how do we organize the settings for this?
- Physically speaking there is definitely a distinction between reflection and transmission, and the issue of diffuse and 'specular' is the same, it all basically comes down to layering bxdfs.
- For example, a glass BSDF has a perfect specular BRDF, and a perfect specular BTDF, which are layered. In the case of glass, the layer weights come from the fresnel formula. This layering controls the proportion of returned color, and also an importance value for sampling (i.e. on glancing angles, you sample the BRDF here much more frequently than the BTDF). For shading inside a dielectric you also use snells law to determine whether to shade both BTDF and BRDF, or only BTDF (total internal reflection).
- A similar case exists for plastic materials, usually something like that would be done with lambert BRDF with a specular BRDF layered on top. Usually you'd use a fresnel blend weighting for these layers too, though it could be anything depending on how physically implausible you want to go :).
- How to represent this in a node UI? Maybe something like this: http://mke3.net/blender/devel/rendering/s/layer_bxdf_nodes.png
- Coupling the specular shader with the mirror reflection is the physically correct thing to do, and makes it easier to get plausible results. However it also raises the issues the when you enable mirror reflection, you will then have a glossy reflection by default.
- if by default it's using a brdf that's not perfect specular, that's correct, and that's how it should be. Having a soft reflection of light sources and a sharp reflection of everything else is totally nutty (i'm partially responsible for that, hooray!). But rather, instead of thinking in terms of enabling and disabling components, think in terms of having multiple materials, so if you want a perfect specular reflection, you just use a preset 'mirror' material, just like you would for hair etc.