Dim the scene except some specific objects

Hi I want to do something like this
As you can see the environment is dimmer than the player, the enemy and those particle effects

I have tried to use 3 camera to render the environment a semi-transparent black image, and the other objects respectively by culling mask (ordered with respect to their depth)
However, if the other objects is behind the environment(let’s say the player is behind a wall), as the depth of the player camera is higher than that of the wall, the rendered player’s will be on top of the rendered wall

One good way to do this:

All objects that need to be lighted, like main character, items and objects, put them on another layer, with a bright lamp or lights, that only affect characters, objects and items on that layer.

And leave the enviroment, and objects that are to be dimmed on another layer, with a lamp, or lights, that are scripted or triggered to dim, when certain events are to occur.