Is it possible to blend two materials based on the direction of the normals of the object?
So if you wanted a different material on the upward facing normals, like adding dust or dirt.
Another example might be if you wanted to have a material where the sun has faded the top of the surface.
I'm only really asking about how you would create the mask for the blend, not the material itself.
I thought there would be a way to do it using State Vector, normal but I cant work it out and there may be an easier way?
Thanks
Solved! Go to Solution.
Solved by CiroCardoso3v. Go to Solution.
No worries man. Glad to help
You can also use this shader I wrote in OSL.
It also works in the viewport.
shader SnowMask ( float Power = 4.0 [[ float min =0.03, float max = 100. ]], float Slope = 0.5 [[ float min = 0.0, float max = 0.9999999 ]], output color Out = 1.0 ) { Out = pow((N[2] - Slope) / .5, 1.0 / Power); }
Here is an example.
I use the Snowmask shader to dictate the normals that gets pushed through, and exposed a Slope and Power float set so the angles can get manipulated with a noise, as well as power can be noised up.
I then run an OSL curvature node in as a mask for the normal mask, and subtract the area beneath the statues dress, near the foot in the right side.
This returns a more realistic top/down scenario with occlusion as part of the equation.
You can then let the occlusion only work on 1 axis, 2 or all 3, depending on what you need.
This is the same as piping a vector into the Offset of the Arnold AO node, directional AO.