Recursive Space

Creators: Alexander Bruce
Engine: Unreal Tournament 2004
Modification: UT2K4 Level Component

Last Update: 14th July 2007
Current Status: Working. Minor fixes left.
Further Development: Improving interaction with trace weapons
Download: Not yet available

Description: Bringing an old mechanic to a new dimension...

Demonstration / Purpose Problems Encountered Setting up the Recursive World Removing the Hall of Mirrors Detailed Backgrounds Working with Trace Weapons Further Development

Page 4 - Implementation - Rendering without the Hall of Mirrors


So far for all of the examples given, the correct texture was already applied to give a clear indication of what was happening, however we've not yet seen how to make the correct texture. Before we change the texture, if we were to jump into the game with our 6 portals set up to see what happens, we'd meet disaster.

Hall of Mirrors Game Start

Hall of Mirrors at Game Start

Hall of Mirrors Game End

Hall of Mirrors after shooting some weapons



As you can see, this is completely unplayable. We can't change how the Engine renders portals, as we don't have access to that code, and we've already cleaned up our zoning. So, what can we do? We can solve this by rendering even more to the screen. I know that this may not make any sense, as we're seemingly already rendering more than enough and have subsequently made the game completely unplayable, but this in itself isn't true. In the area where trails are being rendered, it's because we've specifically told nothing else to render, as the portals are completely clear.

To fix this, we sacrifice a slight amount of clarity through the portals. Instead of using the Final Blend shown in AngelMapper's tutorial, we'll create our own new texture from scratch and save it in a texture package somewhere. In the version available for download, the textures will come as a separate package to the map, so that we don't need to keep re-creating or re-importing the texture every time we want to use it. First, we'll create a new ConstantColor, as follows:

ConstantColor Texture

Black ConstantColor Texture


You may be wondering why we've got an Alpha value of 50, if this texture is a ConstantColor, which doesn't display Alpha information anyway. This is the value that will solve our Hall of Mirrors problem, and allow us to take things even further. So, to put this new texture to good use, we'll make a new Shader and apply it to that. I know that in AngelMapper's tutorial it was applied directly to a final blend, which is fine if all we want is clear portals, however when the entire world is rendering as a clear portal, it leads to some pretty bland environments. So, we want something that looks like this:

Shader Texture

Black Transparent Shader Texture


The important things to note in this picture is that our new AlphaBlack ConstantColor texture is applied as both the Diffuse and the Opacity. The Diffuse is so that we can have our currently clear portals displayed, whilst the Alpha controls the opacity. Now, if we were to just use this Shader as our texture, we'd have portals that rendered correctly, but we'd have some effects we didn't want as well, as follows:

Shadow Artifacts being rendered

Artifacts on the portals from the player shadow

Decal Artifacts being rendered

Artifacts on the portals from explosion decals



Getting rid of these artifacts is fairly straightforward. Select all of the portal surfaces, right click and make them unlit, as below:

Unlit Portals

Portal Settings - Unlit


So there you have it. Now you should have your anti-Hall of Mirror portal texture created. Where can you go from here? Well, the first thing that you can experiment is that magic number of 50 that we placed on our alpha texture. If the value is lower, the portals will be clearer, but it will take longer to clear the trails from the screen as the texture keeps overlapping upon itself. If the value is set higher, the portals will be darker, but you will eliminate the trails from being visible at all. Higher values are often better than lower ones, though 50 produces a nice balance of both clarity and covering trails almost instantly.

Back Home Next