Subsurface Scattering in BabylonJS

If you want you can download my fork here : graphic-assets/3D-models/Lee-Perry-Smith-Head at master · Vinc3r/graphic-assets · GitHub and use Blender 2.8 to export in a format C4D will like. I’ve also generated a normal map, but in a quick & dirty way, using NormalMap-Online :smiley:

1 Like

Ill give that a look when I get a chance here, and if that fixed it Ill bake out the SSS maps.

1 Like

Good god, you guys are way too fast…hehe, I have the lps head blend file somewhere in my archives but if not: https://www.blendswap.com/blends/view/40095 has a blend file as well. I don’t think we need hi-res textures for SSS dev and testing. A beauty pass in ZBrush with all the skin pores and alphas is a little overkill but you should see the light scatter from the ears. One of the impt pts is to ensure the model is of the right scale as the scattering ‘should’ be dependent on real world scale.

Maybe its the scale that is putting me off, let me see if I can figure that out then. Cause as it is I cant get any SSS effects to display through the ears or anything. And toggling the effect shows no change in the pixel colors even at a sampled level so its definitely not working as is.

Here the head .glb dimensions:

(I’ve made a noob action: importing a 3d model made by other without checking it’s size :smiley: , but compared to a default export using MakeHuman, it looks alright )

Odd, that is the size I have it exported too from C4D… hmm the plot thickens! if I have time to debug it today I will.

Alas, I can’t provide much help here as I don’t use Substance. But it might be best to check with SP if their SSS uses raytracing or screen space to fake the effect. If its the later, then ‘scattering from the ears’ would be unlikely. You should aim to get the SSS on the lips tho or on the dragon model, that would be the minimum baseline.

Hi all,

Thanks for adding this great new feature. I love the playground examples demonstrating the new subsurface member of the pbr materials. Really beautiful work!

After reading the new documentation and searching the playground, it’s still unclear to me how to achieve the effect in my original post. Here’s the link again:

https://threejs.org/examples/webgl_materials_translucency.html

The following playground might make a good starting point:

https://www.babylonjs-playground.com/#RRYXWN#1

I’d like the torus knot to take the appearance of cloudy glass with a glossy surface that is illuminated from behind as in the ThreeJS example in the link. The illumination of the surface should change as the view of the knot changes with respect to the lights.

Any help would be greatly appreciated!

Never really played with SSS, so your topic give me wish to tweak it.

Here my testing scene, 'could be helpful for you: https://www.babylonjs-playground.com/#RRYXWN#18

As you was talking about refraction in addition of SSS, you can play with it too: https://www.babylonjs-playground.com/#RRYXWN#17

1 Like

You can have a look here where we detail how our translucency support and refraction is working: Master Physically Based Rendering (PBR) - Babylon.js Documentation

1 Like

Thank you Vinc3r!! Those examples are exactly what I needed to see! After experimenting with some of the values, I think I finally understand how these subsurface settings work together. The effect is much easier to achieve than I thought. I love that I don’t have to provide a thickness map for every combination of subsurface material and mesh. It’s nice to have the thickness map as an option though for fine tuning things.

sebavan,

Thanks for the link to the documentation. I did consult this first but somehow, after reading it and toying with some of the existing playground examples, I still couldn’t find the right combination of settings. Vinc3r’s examples really helped me get a feel for how the parameters could be combined to achieve the effect I was after.

Thanks to everyone for making this feature a reality! This is very cool stuff. Nice work!

1 Like

So I just see a picture in a 3D news, reminding me this thread:

I tried to get as close as possible (note that the picture comes from a precomputed rendering engine), result is alright I think:

I can’t succeed to activate the mirror effect of the ground, don’t know why, if someone can help?

5 Likes

pinging @sebavan for the ground question

This is a cool demo :slight_smile:

It is because you need to create the env after the meshes you want to reflect are available else, there is nothing to reflect:
https://www.babylonjs-playground.com/#RRYXWN#28

Or you could add them manually in after the creation like this:
https://www.babylonjs-playground.com/#RRYXWN#31

5 Likes

Could nodeMaterial do it like this, Master?

Yup it can do most of what the PBR material can :slight_smile:

1 Like

Are there any scattering nodes in NME? MASTER

Good question for @Evgeni_Popov ?