Eevee objects in front of SSS shaded object has weird problem

I’m having an issue with how hair is being rendered in Eevee when it’s over a SSS shaded object. Here’s an example:

Notice the blue color dispersion where the hair overlaps Suzanne’s mesh.
image

At first I thought it was a hair issue, but then I realized it’s any object in front of the SSS shaded object.


image

Anybody with an idea how to resolve this problem? I want to retain the look of the SSS without this weird dispersion issue. File for exploration:
2.8 MonkeyHairTest.blend (1.2 MB)

1 Like

In Subsurface Radius in the shader node editor. Change the values to 0.3 for every place.

1 Like

I think you might be running up against a core limitation of a screenspace based sss effect. I’m not aware of a good workaround for that.

This is what I get if I do that:
image


I don’t think that’s it, unless I’m misunderstanding you. Sure, it gets rid of the blue, but it no longer looks correct.

I certainly hope not. =/

SSS in Eevee is a screen space effect. What you’re seeing is an inherent artifact of the algorithm.

Try
0.5
0.2
0.2

And higher specular. At least it’s a work around that looks practically the same.

Hey, thanks for the suggestion, but sadly it loses quite of bit of detail:

Compare that with the original

The sacrifice for speed is accuracy. You can always render it in cycles if you want accurate SSS.

1 Like

I wouldn’t say such artifacts couldn’t be resolved, especially in light of Clement’s experience and the many other bugs that have since been fixed, but ensuring features play well with other is inherently a more difficult job in Eevee development than Cycles development. As mentioned it is not impossible in most cases, but it’s not trivial and a fix can take a while.

Still, the potential payoff is immense considering how many Eevee animations are being pumped out already. Resolving these issues will mean producing them will be nearly as easy to make as stills (at least the visual part).

That is a fundamental limitation of screenspace effects. I’m sure you could do some rinkydink workaround disabling layers and recompositing them back together, but it’s simply limited by what is in the screenspace buffer. Like how SSR doesn’t reflect things that are offscreen. I highly doubt that those issues can be simply optimized away. Of course I’d be happy to be proven wrong.

I would hope such artifacts can be resolved, as how it is currently is fairly unusable, at least right out of the box. I’m thinking of creating a map to drive the “Subsurface” parameter on the Principled BSDF, which I think should help with this issue.

A tangential question, but does anybody know if Marmoset is based on the same kind of technology as Eevee? I’m assuming “yes”. And maybe somebody who knows Marmoset can chime in here, but I can’t find examples where Marmoset’s SSS suffers from this dispersion artifact that Eevee does.

For instance, I came across a thread where a user is talking about SSS with his model in Marmoset, and I can’t spot this problem happening.


Close-up of where the hairs overlap the geometry looks good.
image

So if they do indeed share the same tech, then it looks like it certainly is possible to address this issue.

1 Like

For anybody else who faced this limitation: if you turn on Space Screen Refraction in render tab and in material with SSS, blue outline disappears

1 Like

For me, giving the object in front even the slightest bit of SSS, like 0.001, makes the artifact go away mostly. The SSS radiuses can all be zero.

What does your result look like? For me, yes, the blue disappears, but so does the SSS effect, which is counterintuitive.

Maybe post your result? It makes no difference for me.

Maybe it only works in my special case then. Have a look: thin green planes in front of a cube with sss, right plane has sss 0.001.

sss-artifact

sss-artifact.blend (122.3 KB)

2 Likes

Yeah, didn’t notice that
Maybe we should try BigBlend’s solution with separate albedo option

Thanks for providing your file, that’s interesting! That would seemingly resolve the issue for things like glasses on a character. But, sadly, doesn’t seem to work on a separate material for hair. I wonder if there’s a way to do it.

I think we can combine 2 solutions.

Set Radius to 0.5, 0.2, 0.2 and scale to 0.05, then we can have an acceptable result, well, almost.

Thank you Vefery - one of the rare occasion where thread trawling actually solves my problem!

1 Like

Just wanted to give an update on this.

So when I discovered this problem, I made a bug report (now nearly 2 years ago!). At that time, it seemed this is a limitation of SSS in Eevee and there’s no easy fix.

Then today, by coincidence, I saw on the release notes for 2.93 where it said “Sub-Surface Scattering do not leak light onto nearby surfaces.”

I clicked on the link for the task, and lo and behold, it seems to be precisely the fix I thought it was. It even specifically mentions my bug report! Looking forward to testing this out!

Edit: Does anybody know how we can tell if the latest experimental build has a feature written in the release notes? I just downloaded the latest 2.93 alpha and the issue still looks the same. =/