Changing the environment.

Hi everyone.

So first sorry if i’m unclear with my english, i will try to write the best i can and answer your question if you have doubt ^^.

I’m starting a student project, and we are in a brainstorming phase.

One of the feature of the game that we want to make, is that, when the player reach a certain status, he will go in “madness” mode.
The madness mode will change some part of the environment. Basically, let’s say we are in a house, and we go in “madness mode”, the decor, and wall and stuff close to the player will change, like if you open a “parrallel door” and you will show stuff like in a church.

Let’s take some visual exemple because i find it very hard to explain ^^.

It would be something basically like this :

when you are in madness mode, the object and decor close to the player will change texture or disappear/appear.

And hese some screenshot of what we would like as a render :


The geometry of the space (wall, obstacles etc…) will not change, just what the player can see. Like in the screenshot above, you are in a house, you “go in madness” and you will now walk in a road in Paris (but you are still walking on the house and not in Paris).

I hope i’m clear enough, and you understand it ^^.

My question is, what would be your way to do a thing like that with UE?
We have some idea, but we really would like some feedback to see if we are right or if there is many possibilities and we just have to find what is the best for us.

Thanks for your answer and have a good day o/

Yes you can.

You can simply cast a SphereTrace and get every model that it touches then spawn something else in their place after destroying the old models.

The problem would be making the portal. I don’t think any game actually does a portal mechanism other than the Portal game of Valve. Even in Bioshock, they do not show the girl entering a portal in game. They make a transition with a flash as far as I remember. And in those screenshots, I think they also fake the ground she walks on.

The one at video is simple too. They are doable. How? It’s you need to figure out how to do it with the best optimization. :slight_smile:

Yes, what I was thinking is to do a sphere trace , and play with the “visibility” of each in the sphere. I hide the mesh and show the one I want, and when i walk forward the object going out disappear and others appear?

But that (easy?) option have a problem that will probably “brake” the immersion. If an object is big, well, it will disappear entirely in the same time.

I know nothing about shaders, I just know they can do awesome things ^^, do you know if I add a special “parameter” to the object, I can make one type of object disappear withing range and one that is visible when player is far?

Yes, ofcourse no object should appear or disappear instantly. Though keep two meshes in one place, with one visible and other not, can be costly. What you need to do is simply spawning another instead of the guy who got with the trace, destroying the old one.

About shaders I can’t help either but there are very simple lerps with ifs, getting an alpha channel to give the illusion. There is even a marketplace item that creates great illusion of disappearence.

You can add special parameters for everything as long as you create a blueprint of a said mesh. A cheap trick would be this: Have a blueprint of a Chair. Have a Timer for Chair and set it on looping for 0.5 seconds, or 1. Every time the Timer ticks, check the distance between the Chair and Player. If over 1000, disappear chair. Either toggle the invisibility (not efficient) or destroy self (efficient). You can also spawn something else before destroying the actor, another chair perhaps.

You could go even more advanced, having a Parent Actor and create children from it. So you don’t have to do the same setup over and over again for each mesh. :slight_smile:

Thx for your answer, it gave me some idea.
I found an exemple of exactly what i would like :

[video]Dead Space 2: All Hallucinations - YouTube