4
$\begingroup$

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?

enter image description here

$\endgroup$
7
  • 1
    $\begingroup$ 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? $\endgroup$ Jun 21, 2022 at 7:35
  • $\begingroup$ The idea is to use 2 different materials and mix them in geometric nodes $\endgroup$
    – Noob Cat
    Jun 21, 2022 at 7:36
  • 3
    $\begingroup$ Why do you need to use GN for such thing? GN assigns material based on geometry (vertices) ... so the purpose matters. $\endgroup$
    – vklidu
    Jun 21, 2022 at 7:38
  • $\begingroup$ @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. $\endgroup$ Jun 21, 2022 at 7:43
  • $\begingroup$ 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). $\endgroup$
    – vklidu
    Jun 21, 2022 at 10:39

2 Answers 2

7
$\begingroup$

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.

enter image description here

enter image description here

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

do you mean like so?

enter image description here

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

$\endgroup$
10
  • $\begingroup$ 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 $\endgroup$ Jun 21, 2022 at 7:39
  • $\begingroup$ @YousufChaudhry: thank you...although i am not sure that this is what the OP wants.... $\endgroup$
    – Chris
    Jun 21, 2022 at 7:40
  • 1
    $\begingroup$ 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) $\endgroup$
    – Chris
    Jun 21, 2022 at 7:47
  • 1
    $\begingroup$ 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 $\endgroup$
    – Chris
    Jun 21, 2022 at 7:53
  • 1
    $\begingroup$ 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. $\endgroup$
    – vklidu
    Jun 21, 2022 at 18:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .