Link? Wire? Assign? the color of a pixel in a map to the color of a light.

Not a Vray specific thing but something I’ve been wanting to do for many years. Essentially, I have an animation and want to UVW it across an array of lights so that each light(s) color is that of the nearest pixel.

I’ve tried wiring the color of each light to an objects material diffuse slot, which works for just color, but if I place a material in the diffuse slot, it obviously doesn’t work.

I need to find a way to link the color of a light to the pixel of a map.

Thoughts?

The goal is to use this with an animation for content.

Could you elaborate more on this? Some kind of illustration of the effect would be very helpful.

I tried a camera projection map as the driver for the color of an array of rectangular lights I could change the color of the lights by moving the camera, but it changed the color of all the lights (I tried copies and instances but same effect). So this doesn’t work.

If it’s what I’m thinking then why not use an array of planes for the lights, attached as one and using a light material?

He needs a single color per light. I tried it that way too but if you use an image you will get multicolored lit planes sometimes. Unless you precisely create an equal grid layout as the pixels in the animation, so you never have a light on the edge of where two colors / pixels meet.

Yes exactly, so as in the attached, where I process the image to be pixel blocks and use that for both light image and its opacity.
Or maybe that’s not what the OP wants at all and is something completely different :slight_smile:

I’m facing exactly the same problem recently. Did you solve it somehow?

Maybe something like this, where the colour is coming from refraction.

This looks quite simple and effective! Thanks!
What I found as a solution is forest can do pretty the same. It’s a bit tricky and I don’t know are there any benefits compared to your solution.

Out of interest, what was the Forest method?

You can pick a color and assign to a light from a surface texture (Forest Color → Tint and get color from map)

Ok, that’s what I thought, though trying that I can’t immediately see how to colour each of the instances a specific colour based on that map, only randomised values.
As you said, the refraction method does the trick in quite a simple/elegant way anyway :slight_smile: