Mirrors?

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
User avatar
Hidden Hands
Posts: 1053
Joined: Tue Sep 20, 2016 8:11 pm
Location: London, England
Contact:

Mirrors?

Post by Hidden Hands »

Can Doom In DOOM II format handle mirrors? I wanted to add some to the bathroom of my MAP01, but not so sure if I can pull this off. Can anyone advise or help me with this?
User avatar
MaxED
Posts: 2246
Joined: Tue Feb 28, 2012 12:55 pm

Re: Mirrors?

Post by MaxED »

Set Action 336 to the line you want to be mirror.
User avatar
Mikk-
Posts: 2274
Joined: Tue Jun 30, 2009 1:31 pm

Re: Mirrors?

Post by Mikk- »

Standard doom format doesn't support mirror surfaces (iirc). You'd want to convert your map to UDMF first.
User avatar
InsanityBringer
Posts: 3392
Joined: Thu Jul 05, 2007 4:53 pm
Location: opening the forbidden box

Re: Mirrors?

Post by InsanityBringer »

If you desire to stick to Doom format for whatever reason (maybe you're making a map that works in more ports, but does fancier things in ZD? I dunno), you can use a custom [wiki=Map_translator]Map translator[/wiki] to make any line type you like available in the doom format (with some limitations).
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Mirrors?

Post by Graf Zahl »

Sigh...

Can't you people read? MaxED already posted the correct answer, but still it was followed by two other ones which show a complete lack of knowledge, and worse a complete lack of reading what came before.

ZDoom's xlat contains:

336 = 0, Line_Mirror ()

just as MaxED said.
User avatar
InsanityBringer
Posts: 3392
Joined: Thu Jul 05, 2007 4:53 pm
Location: opening the forbidden box

Re: Mirrors?

Post by InsanityBringer »

My apologies, somehow MaxED's post didn't appear when I was checking unread posts. (I had seen the original post before any responses) Guess I should scroll up more often...

And I mean I guess I should also read the xlat file but I was more responding to Mikk's post. whatever
User avatar
Hidden Hands
Posts: 1053
Joined: Tue Sep 20, 2016 8:11 pm
Location: London, England
Contact:

Re: Mirrors?

Post by Hidden Hands »

Thank you all.
User avatar
Hidden Hands
Posts: 1053
Joined: Tue Sep 20, 2016 8:11 pm
Location: London, England
Contact:

Re: Mirrors?

Post by Hidden Hands »

Just to say, putting 336 as a mirror line crashes my game upon bootup. Any idea why this is? I'm using UDMF and GZDOOM Builder.

EDIT: OKay, using action 128 works but now I have another issue. Only SOME of my mirrors are working, and the others are showing a texture from elsewhere in the level. Why is this happening? How do I fix it?
User avatar
Enjay
 
 
Posts: 27230
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Mirrors?

Post by Enjay »

First thing to point out is that you are not editing in Doom II format but UDMF. Doom II format, to most people, would imply maps in the original format used by id software. That's why you have to use line action 182 and not 336.

Now, on to the problem. Have you set things up correctly as per the wiki instructions?
Turns the line into a mirror. Note that the line must have enough void space behind it to fit all of the reflected geometry. Otherwise, areas behind the mirror will show up through the mirror as merged with the reflection. It is best to leave the same size of the current room with the mirror + 1 unit size in width, length and height, else HOMS (Hall of Mirrors) may appear.
Note that mirrors have limitations. They can be resource-intensive for the renderer, especially if there are recursive reflections. The software renderer also requires empty space behind the mirror to construct the reflected scene
So, if you are working with the software renderer (ie ZDoom rather than GZDoom) you need to make sure that there is a space behind the mirror with nothing in it at all. The space needs to be big enough so that everything you can see in the mirror could fit in to it.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Mirrors?

Post by Graf Zahl »

A lot of the mirror problems have been resolved with the portal stuff, which introduces proper clipping to the mirror plane. So the void space requirement have been relaxed quite significantly by now, (that is unless you target 2.8.1)
User avatar
Enjay
 
 
Posts: 27230
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Mirrors?

Post by Enjay »

In the software renderer too? Good to know, thanks. :)

When you say "relaxed quite significantly" does that mean there is no requirement for void space any more or is it more like try and leave some space but most of the time it will be fine anyway?
User avatar
Hidden Hands
Posts: 1053
Joined: Tue Sep 20, 2016 8:11 pm
Location: London, England
Contact:

Re: Mirrors?

Post by Hidden Hands »

I think that might be the problem then. My mirror room is very close to the building next door with very little space between them.
User avatar
Rachael
Posts: 13965
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Mirrors?

Post by Rachael »

As long as you are using a version newer than 2.8.1 (for example: a devbuild) that shouldn't be a problem.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Mirrors?

Post by Graf Zahl »

Enjay wrote:In the software renderer too? Good to know, thanks. :)

When you say "relaxed quite significantly" does that mean there is no requirement for void space any more or is it more like try and leave some space but most of the time it will be fine anyway?

The portal code needed a fully functional clipper to eliminate stuff behind a portal, the same code is also active for mirrors. There's one gotcha, though: You shouldn't use a mirror where part of a sector that's visible outside the mirror is partially obstructed by it. That can make sprites appear where they do not belong as the main view is not clipped by the mirror and sprites in a sector that is visible elsewhere are being processed normally and may escape some visibility checks.
That means, mirrors on structures that have valid sectors all around may glitch when looked at from the wrong spot.
Locked

Return to “Editing (Archive)”