Diffuse translucency way too difficult to set up in Cycles

Hi,

In the majority of cases of 3D foliage, translucent surfaces such as grass blades, tree leaves and so on are modeled as a thin, one sided polygonal surface without any thickness, due to a sheer amount of geometry required to achieve foliage of sufficient density. It’s very rare to see clumps of grass or tree leaves modeled with actual leaf thickness, because it’d often bring viewport performance down to a crawl due to extreme polycounts.

Because of this limitation, it is not possible to utilize diffuse transmission techniques, which require some volume in order to return meaningful result, such as SSS, to shade these types of foliage. This excludes any possibility of using Principled BSDF to achieve this. The golden standard to handle this is a simple diffuse scattering on the backface, generally known as a simple translucency in most renderers. Cycles has this shader component too, in a form of Translucency BSDF.

The issue is that it’s very difficult to set it up correctly. One would assume that the setup for somewhat physically plausible material with thin translucency is pretty straightforward. You just mix Diffuse BSDF with Translucent BSDF, and then you mix the result of these two with Glossy BSDF using a Fresnel as a max factor, like this:
MixFresnel
…and while it may appear fine at a first glance, it is wrong. The Fresnel reflection looks correct from the front, but from the back, it fades between completely reflection-less material and completely metallic material in a very narrow view angle range:

This issue stems from the core design of Cycles’ shader mixing, where Fresnel node is intended to carry also internal reflection. And the occurrence of internal reflection is based on a face normal orientation.

Fixing this, and getting a correct translucent material with right Fresnel from both sides requires quite a bit of understanding of theory behind rendering engines. The fresnel formula for the back face needs to be inverted, like this:


Only then, one can get a correct fresnel reflection on backface:

The biggest issue is that many of the Blender users are hobbyists or beginners. There is little to no chance they will stumble upon this solution by accident. Something like basic translucent material used for such a common task as shading foliage, which occurs in a lot of scenes, should not require such a deep technical knowledge.

Some users likely won’t notice something is happening, and end up with back faces of their foliage looking metallic, significantly impacting their output quality in a negative way. Others may notice it, and opt to simply mix Glossy BSDF by simple amount, rather than Fresnel falloff, which will also affect resulting quality of a material in quite a negative way. I think Cycles should kind of guide users to get good results out of the box, even if they lack advanced technical knowledge about rendering.

Here are two proposed solutions:
1,
Internal reflection should be part of Refraction BSDF, not Fresnel. This would also resolve other confusions coming from the fact it’s not possible to get a good looking refraction without mixing it with Glossy BSDF using Fresnel. But I understand it would require a deep changes in the core handling of Cycles shader Mixing, so it’s less likely.

2,
Perhaps the best solution would be to add one simple switch to Principled BSDF called “Subsurface Mode” with two options: SSS (Default) and Thin. By default, Principled BSDF would behave exactly the way it does now. When switched to “Thin”, instead of SSS, Principled BSDF would compute a simple thin translucency, exactly the same thing Translucent BSDF does:


Subsurface input would then be used as a Mix factor between Diffuse and Thin Translucency, in the same way Mix shader factor works when mixing Diffuse BSDF and Translucent BSDF, and Subsurface Color input would then become Translucent BSDF Color input.

Principled BSDF handles glossy reflections correctly on both front and back faces, so the issue would be resolved.

Furthermore, this step would greatly simplify foliage material creation. Currently, Principled BSDF material can be used for almost everything except thin foliage, which is quite a frequent use case. In that case, user has to get back to the old workflow of creating a complex material shader network like this:


Which, with the introduction of the “Thin” mode for Principled BSDF could be simplified to this:

And would not require advanced understanding of rendering to pull the shader off, aside from much faster setup and also the fact Principled BSDF could then be used to cover all of the common material types, instead of almost all of the common material types.

Thank you.

8 Likes

So, am I missing something? Or is this not considered an issue?

We should indeed have better builtin support for this. Thin surface support for the Principled BSDF is on the roadmap.
https://wiki.blender.org/index.php/Dev:Source/Render/Cycles/Roadmap

3 Likes

Good to know that, thanks!

I know that the scope of Code Quest is not large enough, but any chance of this making it into 2.8? I mean, I can do it myself using the trick above, but I would like Cycles to work well out of the box for everyone, without a need to have deep understanding of rendering. I am a bit worried about what kinds of obscure ways people use to create thin translucent materials these days :slight_smile:

It’s quite possible this will be in 2.8 since the final release is quite a while away, but there’s no guarantees. Cycles development continues mostly independent of the code quest or 2.8 planning.

1 Like

Any updates if this is going to happen? I’m currently building a foliage collection for my professional archviz purposes and remembered that there might be changes to how thin translucency is rendered.

I just hope this “fix” will be done in such a way that old hacky foliage shaders won’t break. :slight_smile:

No news on this at the moment.

Up. Getting close to 2.8 release… Thin translucency going to make it or not?

I’m curious, when mixing translucency for foliage (like a leaf, or grass) is there any correct value to put into the mix fac? Or is it just subjective? Without it properly integrated into the Principled BSDF node as you inch closer to 1 you lose all the physical properties of the Principled shading. I just can’t find a physically accurate way to mix translucency into my shader setups. For a long time I though using an Add node was the way to do this, but as I have read this too is innacurate.

1 Like

Bumping this thread again. It’s really important to solve the odd fresnel behavior in both Eevee and Cycles because pretty much no one knows about this corner case yet almost everyone breaks their teeth on it.

CGCookie has released a recent video about Glass Materials in Eevee, and check this timemark:

I mean, if even CGCookie, one of the largest Blender tutorial creators does not know about the ugly workaround one has to do to actually make Fresnel node behave correctly:


…then how can you expect average user to?

6 Likes

That’s not correct for thick glass. This workaround is only for thin glass. 2D geometry or bubbles.
What it needs is a thin optics checkbox.
In the video, these models have volume, so using Fresnel straight out of the gate is technically correct.

That being said this isn’t the only issue with it. It also ought to have a roughness input which requires a different overly complicated workaround to achieve.

Hi,can you expand the above node group to include specular and normal map ,add all the map input in Principle shader would be best ~

I also have problem with Translucent, it affect my diffuse that turned to the Sun…
Example:
with Principled only shader


with Translucent 50/50

See difference? It add translucent for behind of the Sun but lower diffuse level.
How to handle this situation?, I want diffuse not to change, and behind the Sun my petals were translucent.

Add:
I only could fake it with boosting value with Hue node…

You can revert to regular Principled BSDF based on the side (normal) of your mesh, as in here:

Another method i used in the past is to not worry about physical correctness and use the add method, dimming the translucency as much as it looks good:

But that’s physically incorrect and won’t work when the direct light will hit a backface.

Which one of the two ?
(oh, actually both are incorrect I know)

And with backface it only work for mesh that have face turned to sun and backface is opposite, but if backface is turned to the sun and face is opposite it have incorrect calculation (hope you understood me).

So for now fakes with diffuse value works the best for me…

I do. So you have a lot of sunflowers and their orientation may vary, right?
Give the second setup a test. Again I know it’s not correct, but sometimes it gets the job done.

1 Like

Tried second setup.



it lighten diffuse shader and it need to correct with hue node =)
my God, how this is hard to setup…

I think Translucent need some rework.
I thought I did something wrong, but now I see that is something odd with Translucent.

Thanks for helping!

But that’s physically correct behaviour due to the conservation of energy. If 50% of light gets scattered through the back of the surface, that means that only 50% is reflected, and that’s why the front side appears darker. So there’s nothing wrong with translucency in this case.