• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

Level Design [Help]Mirrored Textures

slavek

Grizzled Veteran
May 4, 2006
3,059
943
UnrealEd: Viewport #1
I know mirrors are technically obsolete in UE2 however I have got them working to an extent. The only problem I have run into is that when a mirrored surface is above a nearby adjacent area, the area under the mirror will be rendered. Curious to know if anyone has worked around this besides smart level planning.

In SDK

Spoiler!


Spoiler!

 
Don't they only work ingame if the UseStencil setting in the ini is changed from its default to True?
I'm not sure you can expect this from players. Barely from players who download the map manually, even less from the workshop people and not at all from someone who got it from playing on a server that had it in rotation.:(

Anyway. Sorry I can't help with the problem. Nice looking map though! Very Doom 3 like.
 
Upvote 0
That did it! Can no longer see through walls and such. Cheers! :D

Now this leads me to question; What are the detrimental effects of having bUseStencil set to true? Maybe its not stable in certain situations? Does it affect more than what we currently see? I'd like to see a TWI member with Engine experience chime in here. Is there a reason it has not been set to true by default or is it just something that has never been thought about?
 
Upvote 0
As far as I know it only makes the game not work on certain ancient graphics cards. They were recent enough for UT99 and still a possibility on the lower end users when UT2003 came out, I suppose. I'm fairly sure that's the only reason it defaults to False. To ensure maximal compatibility.

Nowadays you won't find anyone with a GeForce 1 anymore and if you did they couldn't play Killing Floor on that toaster anyway.
 
Upvote 0
Might be something to bring up with TWI. If there are no practical disadvantages to having it on by default then it would give mappers more bling for their maps. ;)

This is still probably old or solved already but there's code that can be added into weapons to prevent problems with bUseStencil and scripted textures

Code:
simulated event RenderTexture(ScriptedTexture Tex)
{
    local RenderDevice rDev;
    local string sInitVal;

    // Lovely hack for scripted textures :)
    rDev = GameEngine(FindObject("Package.GameEngine", Class'GameEngine')).GRenDev;

    sInitVal = rDev.GetPropertyText("UseStencil");
    rDev.SetPropertyText("UseStencil", "False");

    // Draw stuff

    rDev.SetPropertyText("UseStencil", sInitVal);
}
 
Upvote 0