1
$\begingroup$

I am trying to get the lights in this image to alternate red - green - red - green, etc. Not sure what math I need to get that to occur in the shader. Currently I just have an object info node running Random into the Fac of the ColorRamp.

Lights are generated onto the wire via a geometry node setup. Geometry node set up.

The full composite with lights (not alternating).

Current Christmas light shader.

$\endgroup$
4
  • $\begingroup$ as Luiz wrote correctly in his answer: you provided nearly no useful information so that we can just "guess" how you GN node tree look like. So either provide your node tree or even better, provide blend file so we don't have to guess what you made and you will get a precise answer than one, which you might answer to "yeah, but that doesn't work with my node tree" - which is frustrating for both sides: the one who answered and for you $\endgroup$
    – Chris
    Commented Nov 16, 2022 at 10:00
  • $\begingroup$ Thanks, Chris. This is my first time using Blender Stack Exchange. $\endgroup$
    – Tasal
    Commented Nov 16, 2022 at 15:22
  • $\begingroup$ can u please elaborate why Luiz answer doesn't help you? Or what's your problem with it? thx. $\endgroup$
    – Chris
    Commented Nov 16, 2022 at 15:37
  • $\begingroup$ It helped a lot, I am trying to implement it into my workflow, but his works only if the light is the only object that gets the material in the node setup. In my case I used one object but assigned it two different materials: The plastic holder (green shader) The light (emission shader) So I am trying to instead make a collection and use that as my replicated "object". $\endgroup$
    – Tasal
    Commented Nov 16, 2022 at 16:03

1 Answer 1

1
$\begingroup$

I don't know how is your geometry node setup, so I'm not sure if this will work.

You could use the Math node on Modulo to alternate the scatter on the points, and then assign different materials.

enter image description here

$\endgroup$
1
  • $\begingroup$ Added my geometry node setup if you think that will help clarify my issue. $\endgroup$
    – Tasal
    Commented Nov 16, 2022 at 15:21

You must log in to answer this question.

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