SSS in Blender? Easy!!! Tutorial on line.

This is realy great!!!:smiley: Very nice solutuion. I hope this node will be implemented in 2.44 or at least the patch will be introduced into CVS. Thank you brecht, very elegant work. :yes:

ZanQdo made a build for windows :smiley: :

Thanks a bunch …

Peace :spin:.

Wow, Brecht! The results of that node are quite impressive! Please keep working on it. Until
we have real SSS implemented (I imagine it’s going to be a while yet) this is a really nice
fake SSS node! Very interesting!

//Mathias

@Brecht: I tested it, too - and it’s already looking very promising. Keep up the good work!

Thorsten

brecht, that is very nice! Do you have any ideas on what to do about the AA? It also does seem to blur out the details on textures a bit which is a bit of a shame. Very cool stuff though!

First, about the real vs. fake thing. This node is based on one of Jensen’s original papers here, with the difference that there is no color from the back of the object taken into account (yet), since this uses the colors from a single render pass. That paper only simulates multiple scattering, which has is the dominant type of subsurface scattering for skin. So where that places this node on the continuum from fake to real I’ll let you decide.
http://graphics.ucsd.edu/~henrik/papers/fast_bssrdf/

Anti-aliasing I have to look into still. That should be fixed automatically when this is integrated properly in the renderer (which is the eventual goal), but I might figure out a fix for this node before that.

About blurring out the textures, I get the impression as well this is happening too much. Maybe there is still an error in my implementation, but I haven’t been able to find it yet, and on the other hand, it does happen in Jensen’s BSSRDF papers as well, with most of the detail being visible through specular reflection. Realistic skin should have more than one layer though, with the upper preservering more detail and the lower blurring out a lot. So you can experiment using different blend modes to blend the result with other passes, combining multiple scattering results, … .

Also, remember that when you paint a texture, you already do some of this blurring because that’s how you perceive skin. Same goes for photo textures, so you’re sort of blurring the texture twice. What you can do is only blur the shading (divide diffuse pass by color pass), and afterwards multiply with the color pass. There is also a trick to partially blur the texture, by doing scatter(shading * pow(color, x))*pow(color, 1-x), where x indicates what percentage of the texture is blurred. The same trick works for the baking methods as well. Some examples:
http://users.pandora.be/blendix/texture_pow_0.0.png
http://users.pandora.be/blendix/texture_pow_0.5.png
http://users.pandora.be/blendix/texture_pow_0.8.png
http://users.pandora.be/blendix/texture_pow_1.0.png

I’ll upload a .blend for that later, my current blender compile doesn’t save .blend files that can be loaded with that patch.

Good try,I’m testing it,your teapot scene brecht works very good,but I’m tryng to instantiate more than a node to do skin stuff(2 layer,deep and thin layer),it takes too long,it’s slow(something like 100 sec.for 640*480.
Yes,skin need more than one layer,I use 2 with my tricky normal map techniques that are screen added with diffuse

Do you have some hints about this(about optimization)?
In your image I have seen samples parameter,where is?(in the build there isn’t).In the final release please expose it

The samples parameter is from another algorithm that’s not used now. You can tweak the results by setting the error high (I use 1.0), and then rendering the final image with 0.1. I think code optimizations are still possible, but not trivial.

Brecht,do you have plan to do backscatter?
If you do this,with some optimization,we finally can have a good solution(maybe you can add a id for material,to mask the scattering/blurring to only some surface)
Last thing,thanks! You are a really talented guy

1 Like

Quick question, sorry if this is stupid, but is it possible to have object ID as a mask, so that the node wouldn’t have to work over every single line when you only want one model with SSS? I don’t mean to sound ungrateful, by the way, it’s just a thought.

EDIT: I should mention that I’ve tried it and that it’s friggin’ awesome, by the way.

I think something like this should be the goal:
http://www.daz3d.com/i.x/galleries/0/-/?id=26153&sec=2

for backscattering- would it be possible to bake the translucency or transparency from the camera view to the model (in code not node)? if it is, this could be done before the lightmap, and then blurred in the same way as the light map and added to the lightmap.

Good method. I just tested it, anyway, you have to be careful and tweak the texture a little before blurring it… I ended up with visible seams…

Anyway, the technique is really good for quick sss. Thanks

http://www.subir-imagenes.com/imagenes/th_2280fdcd8e.jpg

This is one way to limit the scattering to one object.
http://www.falgor.net/pics/nodes.png

The monkeyface on the front has a pass index of “1” and the back monkey face as pass index of “2”.
That’s in the object buttons (F7). Here’s the crappy blend. works only with the new ZanQdo build.

I’m perfectly aware of how to use object IDs after, but it’d save processing time if it was possible to do it before. :stuck_out_tongue: Anyway, it’s not neccesary, I can just use ID masks, it was just an idle question.

kaeru

nice image. what i love about is the color play of the specular value. you see
not only white specular reflections but many dots with small colors.

claas

I did a little test trying to add in back scattering the easiest way possible. It’s not really working well yet, and I had to artificially increase the back scattering effect, but here’s a screenshot:
http://users.pandora.be/blendix/back_scatter.png

Updated patch and .blends are here:
http://users.pandora.be/blendix/scatter.html

Support for ID masks would useful yes, although you can work around it.

wow it’s great!

Brecht,please make the support for the id mask(and maybe grayscale mask as multiplier),this is really promising,it’s a pity if the setup become too much complex to use it in real scene at full power.A post production trick couldn’t be easily controllable,the better approach should be to do your work as a local shader,not a compositing trick(I don’t think it’s easier doing with the shader node system,light map are missing)
Did you know mental ray miss_fast_skin?,its’ use a similar approach,but that it’s a local shader.Using as a shader means we can combine it with all the stuff we want,and also means we can paint mask for traslucency(ear,noise,veins),but mental ray has light map port,a bit like your work(camera space information)but used in shading operation…
Your work can be perfect if it can integrated with the standard shading stuff as smooth as possible…
Btw,I’ll test your patch with some model and see where I can go,this multiscattering seems really robust to me,good work…

Yup, I’m good for the work-around. If no other alternatives come up, I’ll be fine with using it. Thanks again for all you’ve done so far. And the back-scattering looks great, personally.