# How to mix 2 Material into geometry nodes?

I would like to mix 2 materials with the geometry nodes, just like I did in the left material example, where, via a mix node which in this case I am using to simulate 2 different Red / Green materials.

I'd like to Use 2 Red / Verse materials in the Geometry Node, and do the same.

I find the "Replace Material" node very nice but I don't think it's possible to do it with it. I made this visual example to make it easier to explain what I would like to do.

Anyone have any idea if this is possible and how?

• You could use the same shader editor "Mix Idea" material and use the set material node in geometry nodes to use that material in geometry nodes? Jun 21, 2022 at 7:35
• The idea is to use 2 different materials and mix them in geometric nodes Jun 21, 2022 at 7:36
• Why do you need to use GN for such thing? GN assigns material based on geometry (vertices) ... so the purpose matters. Jun 21, 2022 at 7:38
• @vklidu I agree with what you said, and if animation is required, the values can easily be edited. I guess this is more of a feature question (to ask if its possible) rather than a question where there really is a problem. Jun 21, 2022 at 7:43
• I would still appreciate if you can answer my comment. To offer solution that fits to your needs we need to know more about Why GN and How do you plan to use it. Because like I said ... for such sharp material edge you need to generate some how vertices at that place (if the Factor for split has to be GN parametr). Jun 21, 2022 at 10:39

Inside GN system is material assigned according to geometry (group of vertices/faces). For such sharp material mix you need vertices at that place (or generate them).

Here is an example with Boolean operation. Plane is used as Factor to control location / rotation... by rotation or moving plane you generate vertices dynamicly.

• Great setup, +1! Jun 21, 2022 at 8:00
• Good job. But unfortunately I don't like dealing with external objects. I would have preferred to manage through a Procedural node Jun 21, 2022 at 8:19
• Sure, no problem :) Jun 21, 2022 at 10:33

do you mean like so?

You have to subdivide the default cube one time to get this result.

• I've been avoiding geometry nodes for quite a long time now... But the answers here make me feel they're not that hard, I guess. Good answer though, +1 Jun 21, 2022 at 7:39
• @YousufChaudhry: thank you...although i am not sure that this is what the OP wants.... Jun 21, 2022 at 7:40
• i have no idea...but i hope it will come ;) the mix rgb node is pretty handy if you want to e.g. animate from one position to another (so you can misuse it as an easy way to move a point along a line via fac) Jun 21, 2022 at 7:47
• you can plug e.g. position into mixrgb because position has 3 floats and rgb as well. Geonodes doesn't use alpha values for rgb....but no, you cannot use red lines as output Jun 21, 2022 at 7:53
• You need more vertices to "snap" in shorter steps ... see blend file (I added subdivision node and merge Thresholds into Value node to set it easier. Or you would have to add some math to position middle vertices up&down depending on Threshold value to sync height. Jun 21, 2022 at 18:45