Split Point Light to have 2 colours

Is there a way to make a point light have a different colour at the top from the bottom. I’m interested to see if I could make the bottom third red and the remainder green (for example)…

I do not have the first clue whether this is possible, and if it is how you could begin to implement… The hemisphere light would seem to be similar, but I’ve not quite understood how that works yet.

Would it just be easier to have 2 point lights, each with a solid that masked off the respective areas (this approach may only work half & half)

I can answer only this part of your question:

Yes, it is possible. See this example (it is with spot light, though):

https://threejs.org/examples/?q=light#webgl_lights_spotlight

image

BTW the idea with two split lights is also interesting. It might be possible to implement it too. Have you tried it?

1 Like

Here is another idea:

  • green (0,1,0) point light – left image
  • anti-green (0,-1,0) spot light, it will undo a section of the green light – middle image
  • red (1,0,0) spot light to add red light in the gap in the green light – right image




Here it is in action:

https://codepen.io/boytchev/full/XWPLKOr

image

3 Likes

@PavelBoytchev Thanks! That’s actually amazing!

1 Like