Subsurface scattering for realistic fabric?

I hope this is in the right forum! I’m having trouble creating realistic fabric. My main concern is that fabric tends to let some light pass through it, and I’m having trouble getting that effect. I’m thinking my best bet is to use SSS but for some reason the results aren’t quite right. Ill post a test image to show you what I mean.

Any hints for achieving this effect would be great, or even just an explanation on how to use SSS properly would be good. Haven’t found too many good tutorials.

Thanks!!

Attachments


I hope you can get some answers to your question… I agree about the lack of tutorials on SSS. Seems like sometime seeing glowing ears and milk is about all you see with sss. , I’d love to see other real world type objects that would benefit using SSS, and some tips for setting it up right.

Alternatively, you can use a mix of shader nodes with plain translucency, this might actually work better if your cloth mesh has no real volume.

Brecht has stated before that the 2.68 SSS implementation doesn’t work well in various cases, you might want to grab a recent trunk build if you want to make serious use of SSS because the implementation has been greatly improved (using the new ‘cubic’ or ‘guassian’ falloff).

The reason fabric lets light through it is due to the fact that is is woven from threads, and there are millions of “holes” in it. The light passes right through without bouncing at all. Try using a black and white tileable mask, the one I’ll post is pretty generic for like a rag or something, but I think you’ll have better luck with it than SSS. You can replace the diffuse node with your fancy fabric material.

I promise you’ll see light shining through. Either throw in a mapping node, or just scale up the uvs to adjust the size of the “holes” Good luck.





fab4.jpg (modified from google images)

1 Like

Thanks! I’ll test these methods and then post back with some results!

Alright, a couple quick tests. The first uses the tileable mask, exactly as proposed above. I like the results, sure enough there is light coming through the “holes” in the fabric. I’ve thrown in a mapping node and turned the UV scales to 100.

The second and third images use the same setup, except that the diffuse node has been replaced with an SSS node. The first of the two images has the scale set to 1, and as you can see, the shadows are almost completely eliminated giving the fabric a very flat and unrealistic look. The second image has the scale turned down to 0.07, and the radii are turned to 4, 6, and 2 respectively. In this image the shadows are preserved, and it looks a lot like the image with the diffuse node in it (image #1). The only difference as far as I can tell is that there tends to be more blues in the shadows and where the fabric is thicker (in the top fold), and more yellows in the lighter areas.

This is a huge improvement and a big step forward! However, I still feel as though I’m missing a bit of a “glow” from the fabric. The backlight comes straight through and creates crisp, defined lines. I would like to find a way to soften those lines a little and create more of a glow.

As it stands, this method is excellent for thin, light fabrics. It still isn’t quite perfect for heavier fabrics…Any suggestions are welcome!




Here’s another one, same settings as the SSS shader @ 0.07, but with non-colour data selected in the tileable texture node. I find it is a little better for heavier fabrics, although the lack of glow remains a problem. Also note that in each of these examples, the “fabric” has a solidify modifier added to it.


RE: using the SSS node – this is kind of speculative, as I don’t know exactly how it’s implemented, but from trials, it seems that the SSS effect is based on mesh volume as described by the base polygon cage surfaces, and is not calculated with modifiers like Solidify taken into account. In actuality, light diffuses through the fabric based on its composition and real-world thickness to give the “glow” effect I think you’re after. It may be necessary to apply your Solidify modifier and create an actual thickness to the mesh to achieve a true imitation of diffusion with SSS. In that case, your SSS scale may need to be quite small to avoid the shadow-smearing you found in the early attempts.

I would probably mix a bit of transparency into your fabric material (5 - ~20%), as even a dense fabric (denim) will allow some light through the “opaque” threads. Also try some different fabric masks. And yeah I think you need to apply the solidify modifier to to give SSs a chance to bounce around inside the mesh. And don’t forget a tiny bit of rough gloss mixed in. But I think your tests are very good and headed in the right direction.

And keep in mind that you can replace that diffuse node with a complex mixed node setup, just feed into that slot at the end. But I wouldn’t recommend simply one SSS shader, as that just isn’t right for cloth. Post some more tests.

to get a nice SSS effect i think you also need to add some back light source
to better see the SSS transparent effect !

happy cycles

Here’s another tileable mask I made, this is more like denim. Toss it into the mix if you want.
edit:*And I agree with Ricky, increase the back light strength.



*Modified from google images.

Why not use a combination of diffuse and translucen shader? It would be faster than sss and you get the effect you want.

one thing here
SSS has been change in latest SVN see major thread on cycles!
in last 2 weeks
so this is not included in the 2.68 version!

should give better effect !

happy cycles