How to set 6 materials for the 6 sides of the cube only with material nodes?

Yes it is. Use material layers. The idea is you set up a Material as a Material Function instead. In the actual Material you use these function to blend all the different “materials” together.

Here is a great tutorial:

1 Like