In our journey on diffuse shading we have seen how a diffuse principled implementation better suites modern workflows than the classical Oren-Nayar implementation. The main offender on the Oren-Nayar implementation (rombo DiffuseGeneralized, Arnold Std Material) is that it is based on single scattering and so it leaks energy (diffuse gets too dark with increasing roughness).
Currently the problem is a bit more complex that this but we will not dig in any further. We just say that Oren-Nayar is based on a microfaceting model and because microfaceting BRDFs generally derive from Smith's GAF (geometrical attenuation factor) which is based itself on random height fields, it cannot properly model porous/granular/particulate materials.
Let's see how we can easily build up an intuition for a microfacet model. We don't need to necessarily however so we can skip this part until we see some beautiful pictures 🙂 meaning we should just get a clue on how this model lets appear our objects and we're done as there are no parameters at all other than the diffuse map/color.
The picture above tells us a couple of things. What we (or the renderer) generally sees is the smooth macrosurface which is determined by a geometrical normal. What a 'rough' diffuse or reflection ray will see is instead the rough microsurface. We have seen in the reflection slope post that a reflection to be able to model roughness is hitting a microsurface from where it will get a certain direction. The wider the roughness the wider the spectrum of directions or under the point of view we're into right now, the rougher the microsurface.
So to model a certain class of materials we use the microfacet representation .. we say that our reflection rays are hitting a rough microsurface from where they are scattered and because they do this by construction, the microsurface is implicit to the model and we don't need our geometrical object to be explicitely modelled like that. We also easily see why this model is called an 'height field' .. because the micro rougheness simply resembles a bumpy surface. Naively we can approach this ourself by putting a rough normal map on our smooth object and let rays scatter due to the bump inclination.
DiffuseSmooth node instead is based on a different representation. The model is generically called Lambertian Sphere or spherical Lambertian particles.
So we have seen two models till now. A bump/heighfield/microfacet model where rays scatter in different directions because of the rough microsurface and this new one where the surface is modelled by a multitude of little spheres and rays scatter because of that.
Now look at the above picture carefully. The last two columns on the right are BRDFs that are smooth at distance but that model the micro geometry analytically which means here without having to model each little sphere effectively.
Note another thing. The last column before the last two BRDFs (where we can still see the sphere packing) could be either modelled by a bump (height field) or like here by a dense pack of spheres. But only till a certain density. When the density is too sparse (up rows) it can be modelled only by sphere packing. This is the whole point of having a Lambertian sphere scatterer model. It should be clear at this point why an heighfield model cannot approach these kind of things. Because where spheres are sparsely packed (they have void between them) a ray could get lost into while it's never the case for an height field as there're no holes.
What DiffuseSmooth does is to approach analytically sparse sphere packing that happens in porous materials like dust sand powder soot etc. Of course having a certain appearance itself, it can be used anywhere we wanna approach that kind of look. So let's see the main difference in appearance between DiffuseGeneralized (also Arnold Std Material) and DiffuseSmooth.
On the left we have our classic diffuse Lambert, on the right we have the new Lambert-Sphere BRDF model. We can easily note the increased backscattering and saturated colors at grazing angles with back lighting. Backscattering makes it more flat and less shaded.
Take care this model has no parameters. We can just choose between the analitycal and the fast analytical version. The Hapke one is an older implementation which is there mostly for comparisons with this last one (which is based on the Eugene d'Eon's model).
Now based on its appearance we can use it wherever we need a more flat or 'open' diffuse shading. We use it for examples on the intro image that models plaster stuff but also on the following cartoony stuff where the lack of too much shading is good to enforce a toony appearance.
It works pretty cool also for any thing that needs a flat diffuse without too much shading. We can effectively use it as a replacement for the classic diffuse in many scenario.
It comes with a default specular layer so we can use it easily as a standalone material. It has a minimal overhead compared to classic diffuse but for usual scenes it is completely negligible.
diffuse, diffuse smooth, lambert-sphere, lambert, arnold, arnoldrender, arnoldrenderer, shader, material, reflect, reflection, microfacet, arnold shaders, arnold download, arnold materials, arnold renderer materials
4 thoughts on “Lambert-Sphere BRDF”
Great examples, especially for the Toon scene! I’m inspired.
Btw if you’re on Houdini, the cartoon scene is right available in the demo scenes pack.
Is the cartoon available for Maya as well?
We’ll make it available for Maya in the next update, stay tuned !