How do I keep a held object visible when the scene is dark?

I have a first-person game where the player can spend a lot of time in total darkness. However, the player can also pick up an object and carry it around with them. I am trying to figure out the best way to keep the carried object lit/visible even if all the other lights in the room go out. Partially, this is to reflect the idea that the player would know what they’re holding, but also just so the player remembers that they’re still carrying something.

Initially I was hoping that there was a way to set up a light so that it only affects objects that have been tagged in some way, but it’s looking like UE4 doesn’t support that.

I don’t know if the best way to do this is through a post-processing effect, or if there is some dynamic lighting wizardry that will do the job. Also I currently don’t have a strong preference for whether a held object becomes immediately unlit as soon as it is dropped, or if it can stay lit for a second or two before fading into darkness, however I would really appreciate knowing whether a solution is flexible enough to work either way, or not.

Thanks!

Yeah a postprocess setting where only that actor is affected would be your best setup, but I’m not 100% on how to go about that. I would say a object highlight style PP effect and then use the enable Render custom depth node.

://www.michalorzelek.com/blog/tutorial-creating-outline-effect-around-objects/

Otherwise how about an emissive material?

Hope this helps
Don’t forget to accept an answer that best clears your question up or answers it so when the community finds your question in the future via search/google they know exactly what you did to fix it/get it going.

You could give it a bit of emissive value by multiplying the diffuse color with 0.1 and plugging it to emissive input(multiply by 0 when in light)
I would also suggest not making totally dark levels as gamers dont really like it, even though it sounds like a good idea for horror games and such on paper.

The easiest way is to enable an “emissive” effect in your material when he picks up the object → then you can see the object even when there are no lights :slight_smile:

Just create a parameter and connect it with emissive + change the value in your blueprint