2
$\begingroup$

I'm trying to create an effect where a creature has a part of its body that's really thin and translucent, and the blurry silhouettes of the bones can be seen inside it when light is behind it.

In technical terms, this means I need to have an object where light rays can pass through it, but only if it's thin enough and there are no obstructions inside the object. Translucency, really. (NOT transparency or SSS.)

This is actually exactly what the Translucent shader does (I tested it, and it does exactly what I need), but that shader literally only has parameters for color and a normal map, making it practically useless unless I can find a way to intelligently mix it with the Principled BSDF node. I don't know why the Principled BSDF shader has no parameter for translucency. I mean, sure, SSS is basically the same effect as translucency in theory, so maybe the developers thought it would be redundant, but with SSS (or maybe it's just Blender's SSS), external obstructions between the SSS object and the light source just aren't as clearly visible as with the Translucency shader, and obstructions inside the the SSS object are completely invisible for some reason.

I could try to fake it with rough transmission, but I need a way to use the thickness of the mesh (or, in more technical terms, how far a light ray must travel to get from its entry point to its exit point in the mesh) to control the transmission, and I haven't figured out where to get that data. Using a hand-painted texture map to manually control the transmission looks like crap, because it just lacks the detail.

Does anyone have any ideas of how I could go about this?

$\endgroup$
2
  • 2
    $\begingroup$ Hello :). This is a good question. I usually just mix Principled BSDF with Translucent, but I'd be really nice to have it all in one shader. $\endgroup$ – Jachym Michal Sep 13 '20 at 18:45
  • 1
    $\begingroup$ Related: Translucent leaf using Principled BSDF $\endgroup$ – Jachym Michal Sep 13 '20 at 18:47
3
$\begingroup$

I'm not sure why there is no Translucency option on the Principled shader. Perhaps there is a way to get translucent behavior from the Principled shader, but not that I know of. Here's a possible way to combine the two shaders, which should take thickness into account.

There's an answer here that goes over a way to find the approximate thickness of an object and use it in a shader by using the Ambient Occlusion node with Inside enabled.

While I'm not sure of your exact situation, I think it could be a reasonable way to mix the main shader with the translucency. I'd start by seeing what the Ambient Occlusion node outputs. It might be good enough as is. You'll probably need to adjust the distance though. I'd set it a bit higher than the thickest point on your mesh that you want to be translucent.

In some quick tests I did, I found the output might not be perfect on it's own. However, it's a pretty good start. You may want to mix in the Pointiness output of the Geometry node to isolate any raised sections (bumps, veins, etc.) that shouldn't be translucent. Mixing the two outputs using a Math node set to Maximum seemed to work well.

A quick hand painted texture could be used to "mask" the general areas that you want translucent. Add a Math node set to Multiply to add in the texture. This would just ensure that nothing is translucent that shouldn't be.

Here's a really quick test I did as a proof of concept. Far from perfect, but I think the idea is there. The dark spot is a Suzanne that I placed just underneath as a test. The mesh is just a subdivided cube with a thin section in the center and a couple sculpted "veins".

enter image description here

And the node setup:

enter image description here

As you can see there is a few spots on the outer edge that ended up translucent. With some tweaking of the ColorRamps it might get a bit better, but manually masking might be the way to go.

$\endgroup$
1
  • $\begingroup$ Thanks, that really helped! I used the AO node with "Inside" toggled on, fed it through a color ramp for control, and plugged it into the transmission socket. One problem is that it the silhouette of the bone is very sharp, even with the transmission roughness set to 1, but maybe I'll be able to find some way to fix that. $\endgroup$ – christsdude Sep 14 '20 at 1:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.