Welcome
Welcome to UT-SLV

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features like the chat. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. In addition, registered members also see less advertisements. Registration is fast, simple, and absolutely free, so please, join UT-SLV today!

[Tutorial] Multiple skyboxes

Help, requests, tutorials all go here

[Tutorial] Multiple skyboxes

Postby Metalfist » Wed Aug 21, 2013 11:31 am

Angelmapper's tutorial can also be used for UT.

Multiple Skies

Have you ever had an idea for a level where you wanted to have more than one skybox? The effect is supported by the engine, but for the most part people don't know about it.
In this tutorial, I will guide you through the small amount of coding needed to make it happen, and teach you how to use it. Let's go!

The first thing we need to do is create the new actor. To do this, we're going to make a new actor under ZoneInfo. Open the Actor browser and navigate to Info >> ZoneInfo. Right click it and hit New.

Image

In the menu that pops up, set the Package to MyLevel. This makes it so that the code is saved in the map file, and we don't have to include any extra files with our map. Set its name to MultiSkyZoneInfo and hit Ok.

Image

A new window will pop up where we can code our new actor. To get the multiple skies to work properly, type the following into the screen:
Code: Select all
class MultiSkyZoneInfo extends SkyZoneInfo
placeable;

var() SkyZoneInfo WhatSkyZone;

simulated function LinkToSkybox()
{
SkyZone = WhatSkyZone;

}


Once you have that entered, hit the Compile Changed Scripts button and you should get a message at the bottom saying "Success: Compiled 18 line(s), 4 statement(s).

Image

Once that is done, our new actor is ready to use. Now we need to set up our level. There is one thing we need to understand about multiple skies first. There can only be one ZoneInfo actor per zone, and that includes SkyZoneInfos and MultiSkyZoneInfos. If there is more than one they will interfere with each other and not work properly. In addition, you cannot look at two different skies at the same time. Any zone that has a MultiSkyZoneInfo has to be separated from zones with a different sky by a "buffer" zone, with no line of sight between them. In the following example setup, the dark green zone is the "buffer" between the red and light green zones. The surfaces highlighted pink have been set to Fake Backdrop, as well as the ceiling in those rooms:

Image

Another option would be to have the areas completely isolated and linked by teleporters, but keep in mind that you can see other parts of the level through fake backdrops, and if you can see through to a zone with a different sky then it will not work correctly.

Image

Now you should have your level set up and ready to put the MultiSkyZoneInfos in. To use our new actor, select it and add one to each of the zones with fake backdrops.

Image

Open up our MultiSkyZoneInfo actor's properties and hit Find next to the MultiSkyZoneInfo >> WhatSkyZone field. Your cursor changes, now you are in the find mode. Go to the SkyZoneInfo actor you want it to use and click it, and it should appear in the property box.

Image

Do this for each MultiSkyZoneInfo in your level. Double check that none of the zones can see each other, and that the buffer zone is separating them. Let's go in and test our level!

Be sure to check every angle in your rooms, sometimes it will look like it is working, but if you turn a certain way the engine will see two skies and try to show both at the same time, giving you a flickering image or a hall of mirrors.

That's it for this tutorial, good luck!

Image
ImageImage
Image
"Lets go, roast some EVIL SCUM!"
Image
User avatar
Metalfist
Site Admin
 
Posts: 200
Joined: Thu Aug 08, 2013 4:17 pm
Location: The Netherlands
Highscores: 2

Return to Help & Tutorials

Who is online

Users browsing this forum: No registered users and 1 guest

cron
suspicion-preferred