About pbrMaterial of SSS

When I use PbrMaterial of Scattering Enabled = true; but, the opacity texture of hair will affect the skin!like my image.When I set it false;The hair has return to normal;


When I use NodeMaterial for hair,like this…

Hello! Can you share your model with us, or a similar model with the same problem?

SSS do not play well with alpha @CraigFeldspar can provide with more details.

@PatrickRyan
@CraigFeldspar
It will not only affect the alphaTexture, but also affect all other materials, including Node and PBR. When the alphaTexture is not used, it will also be affected by the scattering switch. Is there any other way to block the scattering switch so that the scattering only affects the skin material.

Yup this is the part @CraigFeldspar should be able to guide us on

Hey @lajaylar, sounds like one of the effects you use is not SSS-compatible. Could you make a PG repro ? So I can give it a closer look

1 Like

@CraigFeldspar
DearMast:
here is my updata github PG,

I’m sorry I can’t use the playground to make pg. it seems that I have encountered some problems that I haven’t solved.

@lajaylar any way you could reproduce the issue on a simpler case in a playground ? It would be tremendously faster for me to analyse on a PG instead of a full project

1 Like

@CraigFeldspar
this is a simpler case of pbrMat PG.
https://playground.babylonjs.com/#U7IBH1#4

this is a simpler case of nodeMat PG.
https://playground.babylonjs.com/#U7IBH1#5

thank you Master!

1 Like

Here you go my good sir

Once this is merged and a new alpha build is issued, the problem should be solved.
I noticed though that since we use a cutoff alpha value for transparent pixels and geometry write, there are some artefacts we applying SSS over layers of alpha.

@sebavan some improvements could.be made to smooth out irradiance over alpha, instead of hard cutting when values cross the threshold of 0.4. Maybe for 5.1 ?

1 Like

yup 5.1 could be a good target

I look forward to it.
thanks.

Hi @lajaylar just checking in, were you able to test the new build? :smiley:

the pbrMaterial build has been repaired, but the performance is not very well. Node has not been repaired yet,
Continue to look forward to… :smiley:

1 Like

The Subsurface of Babylon is extremely powerful, look forward to improving it in the future

3 Likes

@sebavan @CraigFeldspar


Dear Master:
I updata the version for 5.0.0-alpha.65,when I turn on the Scattering Enabled btn, The edges of the hair are very rough.
Is there any good way to solve it? Thanks!~~~~~~
simple PG

Yup scattering with alpha is really hard to achieve, let s see if @CraigFeldspar has some tricks for it ?

Pinging @CraigFeldspar in case he hasn’t seen this the first time :slight_smile:

2 Likes

yep thanks @carolhmj it slipped through somehow :slight_smile:

For now alpha uses a cutoff value for SSS, giving you this “rough edges” artifact. In the future we may implement some blending/interpolation technique for this, but right now I’m afraid that there is no workaround :confused:

1 Like

@CraigFeldspar@carolhmj@sebavan
Through the further understanding of PBR material and through many attempts, I have summarized a set of methods and means that can reflect the effect of SSS, which have been realized in PBR and NODE at the same time. Now it can perfectly achieve the effect I want. Thank you again.



2 Likes