Download

Adding a fake skybox only for a specific area

Hi everyone,

I’d be interested to create some “location limited skyboxes” because in some of my levels, I would need to display a normal sky, but because some parts of the levels are supposed to be far away, I would need to have a normal sky, but without being able to see the others areas of the level if the player look around. I don’t really know if what I want to do is really clear, so I’ll link a screenshot to visually explain what I want.

Thanks for the help anyone could provide me!

Capture.PNG|690x334

You’ll probably want to use a box trigger area around the area where the skybox needs to be, and use that to either make the skybox visible (and hide the other one,) or load/unload a streaming level that contains your sky/lighting setup.

Actually, I thought to use these trigger box areas to set all the other elements hidden, but because my levels contains each, for the smallest ones, more than 500 elements that’s I’d need to hide, I wanted to do it in another way, like an HDRI Texture captured from a camera place really far away and assigning this material to an empty cube placed around the areas, but this seems to be not working as I intend for a reason that I ignore, so I’m waiting for a genius guy who could give me a new way to do that “easily”.

You could move those 500 elements to a sub-level and manage loading/unloading this level based on what the player should see.

Is it only client-sided ? Because if not I can’t use this method (my project is a multiplayer game)

You can have all the objects loaded on the server, and load/unload the level on the client. This works great as long as the objects are not replicated.

If you need to unload/re-load replicated objects, then you have the “virtual world” problem, where networking thousands of objects that can be affected by users ends up being a very hard management problem. You’ll typically end up with pretty strict interest management, where users only see replicated objects within a hundred meters or so of themselves, or see something like “the closest 200 replicated objects.”

But it sounds like these objects are just static scenery, and thus don’t need to be replicated.