Download

Blacken Out World Except For A Specific Area

Hello everyone,

I am currently working on a Top Down RPG game where I unfortunately ran into a hurdle that I can’t seem to find my way out of yet. I am trying to achieve an effect similar to the one used in pillars of eternity and divinity original sin, where once the player enters an interior location, the outside world is covered in black and only that of the interior location is still visible: https://lh3.googleusercontent.com/proxy/HANSY-Iv2Fnaf3lYoNlQzPeNFN_9hQbWP2wxB4pLNQXr87ru4JNImxVCTLz5zCpOPmaM8ukF9HZMacAil6ZT9ISjo-PhUV2nOQ25B8KAsQ

I managed to replicate this effect in two worlds now, the way I did it was that I changed the visibility of several black cubes surrounding the interior to visible once the player enters a house for example. While this solution worked, it was very fiddly and took a hell of a lot of time to tweak and set up perfectly. There must be a better solution than that. I looked into enabling a fog that would darken the world entirely and to mask that fog in the interior location but that doesn’t seem as a possibility. So I thought, what better to do than ask the question here and see if there’s someone more informed than I in these matters.

Thank you fellas.

Postprocess.

Here’s the material:

](filedata/fetch?id=1788862&d=1594894845)

You apply it to the camera. This is what it looks like for the third person map:

PP.jpg

Tell me if you get stuck.

Note: It’s always good to quote or like, otherwise I don’t get a notification.

Thanks for the reply ClockworkOcean!

This solution, while it does work, does not exactly capture what I want, the player will not be able to see the whole interior and if he’s at the edge of the room, then he’ll get to see the outside. I want to more like transition the player in a way that hides all the outside with a layer of black while only showing the interior. Is this a possibility perhaps?

If you want that kind of effect, maybe try spawning a black mesh with a hole in it on top of the room.

I don’t know how you’ve done it, but if each room is a BP, it would be pretty easy to change the BP to switch on/off this kind of mesh.

This is how I’ve been doing it so far, but its not ideal. It’s very hard to create a proper mesh when dealing with not just basically structured rooms and several floors. I hoped there was maybe an easier way or atleast a faster way to do it.

There might be some fancy ways, but I’m not aware of them…

I guess I’ll stick with this method until better solutions come to light. Thanks a lot for your help ClockworkOcean!

I wonder if you could build a postprocess material like this and slap that on a mesh that surrounds the zone you want to be in. Of course, you’d have to figure out how to invert it.
https://www.youtube.com/watch?v=nqatEfc5w5I&t=4983s

While I have been able of replicating a similar effect, inverting the post process seems to be the problem. This thing is turning out to be more complicated than I initially anticipated.