Blend materials or maps based on surface orientation (Cycles)

Hello,

I have a problem but haven’t found a good solution yet.

In Cycles I want to blend together two materials of an object based on the direction of the surface. All the surfaces that look upwards AND downwards should have Material A assigned to it, all the surfaces that are horizontal should have Material B assigned to them. The transitions should be controlled by a curve or color ramp.

This is how the model looks.


There are tutorials here about landscapes and assigning rocks, grass or snow to the surface depending on the orientation or height, but I didn’t find a solution for surfaces that point upwards AND downwards.

Thanks,
Andreas

Make a node group that selects upward looking faces, then another that selects downward looking ones. Add the outputs (with clamp). Voilà!
From what you said, the tutorials should give you enough info to make the selector node groups.

Hi,

You could use the normal of the geometry to decide on the facing of the mesh
And then use the Z component of the normal to mix the 2 shaders

For example


Hopefully this is clear enough

Best of luck

Martin

The technique to manually create a blended box map might be useful:
https://mango.blender.org/production/blended_box/

Hey guys,

both approaches work great.

Thanks a lot,
Andreas

Can I say the question confuses me? How can a surface “face upwards and downwards” and not be horizontal?

If you meant “vertical” instead of “horizontal”, then the geometry node is probably your best bet.

Sorry - that was badly explained. It should be “facing” horizontal or as you said “vertical”. But the guys who helped me, got the problem and now it’s solved.

Thanks,
Andreas