Realtime Fake SSS - Big Update!

Updated post:

I completely reworked the shader. Now it simulates lighting depth, better light scattering, more user controls to define scattering color and diffuse color. Plus its about 2x as fast.

Now I am making this shader with more than heads in mind. Here is a candle that uses a slightly modified shader:

The head and textures I used are from:

Here are some more pics:

EDIT: The orange juice doesn’t have any textures, and the water only has generic textures. This shows the flexibility of the material setup.




(I’m talking about the top picture)

so far for me the thing that stands out is that the ears especially look like plastic. I’m not very good at either of the things you are attempting (SSS and BGE), so I can’t help you there. Have you seen Ben Simonds tutorial on SSS?

Maybe lower the specularity?

I see this was moved. I was debating whether to put it here, I eventually decided to put it in focused critics because I thought I would get experienced user or possibly professionals who worked with SSS in blender or another program and could critic my work. But here is fine too :wink:

Okay, so I fixed the ear, it looks less like plastic. I also changed how the simulated scattering works, its more noticeable now. I created a proper spec map, and optimized the setup.



I recently made a skin shader for medical simulation based on Paul Debevecs and Nvidia papers. Perhaps it could be replicated also in Blenders material node editor. looks like it would fit nicely into blenders nodes, at least for a render, as a realtime material you would have to fake most of those effects. But I dont have to tell you that :slight_smile:

What SSS papers are you referring to? I couldn’t find pauls SSS papers.

Anyway I thought I would post a comparison between your SSS shader and mine to show the similarities/differences:

5 layer soft Shading:

Diffused Lighting:



I would have posted the light scattering, but you can hardly see it…

I am also working on a depth shader to replace what I have simulating the light scattering. I got the idea from an old nVidia paper. Basically you render the model from the front, get the zdepth, then render it from the back and get the zdepth, then you get the difference between the 2 passes, and get a density map.

I am changing it a bit, I am calculating the depth with a combo of orco, local, view, normal, and UV vectors.

Here is my progress:

Very cool!


I am in the progress of reworking the shader to simulate lighting depth and better subsurface scattering.

Here are a few screens:


I updated the info and added pics at the top!


wow, thats simply awesome :slight_smile:

I look forward to seeing the final result!

It’s looking exceptionally good, Excaliburr. Really, REALLY good job on the graphics. That orange juice isn’t a BGE render, is it? Is it animated - maybe with shape keys or something?

Excellent job,Ex! :slight_smile:

Thanks for the comments guys.

@SolarLune: I used the fluid sim to get the orange juice, which was way cool because I could run the fluid sim in realtime with my SSS shader! Every thing you see here is in the BGE.

Some details:
The shader uses 2 passes for the SSS, one based on light distance with depth, the other based on a SSS intensity map (which I just use vertex pain) You can change the colors for both to get pretty good looking fake SSS.

For the diffuse stuff, I mix 2 shaders to get soft shading then add some of the depth based lighting for some back lighting. Both of the 2 shaders used for soft shading can have their colors changed for even more control. Finally the result is multiplied to the diffuse map (if you want one) then added to the spec.


Last couple of questions.

  1. So you did it with the fluid simulator - that’s rendered in the BGE, but not animated, right?
  2. What’s the FPS look like? And how many faces is the orange juice?

You should post a screenshot of the orange juice with a nice countertop and glass in the gallery - I’m sure people would love to see that. It’s looking great.