Subsurface on foliage not working correctly.
Me and my friend are having issues setting up some subsurface on our trees/ivy on our level we are working on. We read over the document but still have our branches/vines using the subsurface. We noticed that then the black was the subsurface mask so we inverted it within Photoshop/Oneminus Node and it turns out much ugly.
How do we get our shader to work correctly so only leaves/ivy are subsurface and not the branch/vine.
As you can see here with the invert we have the branches using the SS as well as the leaves but from afar it looks good (but not what we want)
As you can see here we are using the 'correct' SS mask and it makes the leaves look completly wrong even with different values. It still slightly goes onto the branches.
Here is our shader network.
asked Feb 13 '15 at 04:30 PM in Rendering
So the reason you are having issues is because of the '1-x' node. I have set up my own material using a combined approach from one of the example materials in the engine and a 'FuzzyShading' Node. My approach is just a bit more complex, but gives you greater control over the subsurface strength.
Custom Subsurface Ivy Shader
The thing to pay attention to here is the 'Alpha' channel of the diffuse texture is being fed into the 'Opacity Mask' input, and the 'Opacity' input is being derived from the red channel of the masked texture sample.
Original/Simpler Subsurface Shader
This set up is a bit more straight forward and uses a multiplier and a desaturation node. This allows for a greater range of control for the overall color.
Comparison in the World
The one of the left is the shader I created, and the one on the right is the original/second shader. Both approaches work great, but with the one I created you can convert the constants to parameters if you wanted to create a material instance for customization.
Let me know if you managed to get your SSS to function as intended, or if you are still having some trouble.
answered Feb 13 '15 at 10:25 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here