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.