How to set alternating materials on geometry node instances that use multiple materials?

There is a light colored material and a dark colored material and an emission material. I want the instances to alternate between light and dark but without removing the emission material on that 1 face.

alternating instances 01.blend (118.8 KB)

image

This is the simplest way to deal with that kind of problem, make 2 different objects to instantiate, otherwise you’d have to deal with vertex groups / vertex material groups, attributes, modulos and what not to alternate between the textures. If your use case is just 2 different object with 2 different textures assignations, then just instantiate 2 different objects.

Otherwise, with a single object with 3 materials, 2 already assigned to the object vertices:

2 Likes

You can use the Replace Material node, but as @audiumn has pointed out, if you don’t want to Realize the instances it is still best to create 2 instances, here the difference is that the 2nd instance is dynamically created by GN and you only need the one object reference.

Good luck.

1 Like

Thank you both so much.

Solution awarded to audiumn because the 2nd example is exactly what I was trying to do through trial and error. However, I’ll be using zeroskilz’s much simpler solution. I should probably go read the manual some more. I was not aware of the geometry to instance node.