How to Reveal Objects Using Lights.

Now I know I won’t be able to use the actual lights to reveal the object but the idea is to make it look like that is happening.

So the idea is that the player will have a torch and in the levels, there will be different coloured lights that the player can redirect to solve the puzzle. All of these lights will reveal different objects in the room based on the colour they are. So a red, blue, green, yellow etc light will each have their own objects they can reveal in the room. (Kind of like an Ultra Violet light but for an object instead of text.) So I was wondering if anyone knew how I could do this. Also, I know about raycasting but what I’m going for is the effect that the lights are revealing the objects slowly as opposed to them just appearing and disappearing instantly when the light hits or leaves it.

why not?

https://docs.unity3d.com/ScriptReference/Light-cullingMask.html

Well with the way light culling masks work is that it will only let the light hit it as oppose to showing the actual object itself. If you make it so that the object isn’t in the lights culling mask it just lets light pass through it like a ghost or glass.

had a thought on this… you’d probably do better looking at shaders for this kind of effect. Lighting, geometry and material would all be there.

Yeah I’ve dug into shaders a little and so far it kind of does what I’m asking for but the only problem is with the way it works right now. It will only cause more problems in the long run and so I was hoping that someone could suggest something different that will give me the desired effect.