Jump to content

Help creating a mirror


Recommended Posts

Greetings all! This is my first post and I am in the process of building my first map using Ultimate Doom Builder, learning as I go along and testing it in GZDoom. I have been independently researching to the best of my abilities through youtube videos, forum posts and the wiki, but on this particular issue I've struggled to find a solution.

 

I'm attempting to create a basic sink with a mirror in a bathroom. As you can see, reflected sprites are clipping through the right side of the mirror, including doomguy but also other stuff down the hallway opposite the mirror but that are supposed to be obstructed by a wall.

 

344351112_Image1.png.e9bf24c802f6f8d91df9ee0b56c108b9.png

 

Note that this glitch only occurs on the right side of the mirror. Not the left!!! This is despite no apparent difference to the setup to the right and left of the mirror.

 

In Image 2 you can see the setup. I use action 182 for the line mirror, and in front of it I have a translucent line just to create a nice texture effect.

 

2013562755_Image2.png.16f3ffc1e5a8bb236ab3335a9a79d55e.png

 

So far, I've followed the instructions of a number of guides to try and correct this, including making the mirror line one sided and creating a void sector behind it. Nothing has worked. My understanding is that it is no longer required to create a void the size of the room you're mirroring behind the mirror line.

 

The only comment I've found that sounds like it is describing my problem is the following made my Graf Zahl in 2016 (https://forum.zdoom.org/viewtopic.php?f=3&t=53769):

Quote

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.

 

That makes it sound like there's no possible way to implement the mirror using this setup? Any advice is appreciated!

Also, I'd further like to ask why the mirror only seems to function in software display mode using GZDoom, and not at all using hardware rendering? I've troubleshooted (again making one sided, removing translucent line, creating void sector, etc.) and I can't get it to reflect as a mirror in hardware display mode.

Thanks for your time.

 

Share this post


Link to post

Exactly what you said, mirrors need to have void behind them or they break in some way, it is even explained in the wiki.

Fortunately there's no really need (at least for me) to leave a void as wide as the actual room at the front, but this is your best shot to fix it.

Share this post


Link to post
3 hours ago, Kan3 said:

Exactly what you said, mirrors need to have void behind them or they break in some way, it is even explained in the wiki.

Fortunately there's no really need (at least for me) to leave a void as wide as the actual room at the front, but this is your best shot to fix it.

 

Thanks for your reply.

I have tried, just for the sake of troubleshooting, creating a void behind the mirror that is significantly bigger than the room. I have even tried cutting the level so that the mirror line is on the outer edge of the map, with infinite void beyond. The problem persists on the right side of the mirror (and continues to work correctly on the left side).

Edited by CharybdisMaw

Share this post


Link to post
8 minutes ago, CharybdisMaw said:

The problem persists on the right side of the mirror (and continues to work correctly on the left side).

Weird stuff D:

Have you tried creating an empty room and test if the mirror works there?
And can you post your wad or that part of the map?

Share this post


Link to post

It has occurred to me that the problem may lie with GZDoom

I tried playing a map that I know to have mirrors in it (Haunted Mansion from Civvie11 Massacre) and the exact same problem occurs in software rendering mode.
However, the problem goes away in hardware display mode.

Annoyingly, as I stated in the OP, the mirrors don't work at all in my map in hardware mode. Any advice as to why?

I will tinker with the GZDoom display settings to see what can be done.

 

EDIT: Sorry for double posting, I forgot that's a forum faux-pas. I would delete if I knew how.

I've apparently reached the max number of posts I can make per day so any followups will be edits to this post.

Edited by CharybdisMaw

Share this post


Link to post
2 hours ago, CharybdisMaw said:

It has occurred to me that the problem may lie with GZDoom

I tried playing a map that I know to have mirrors in it (Haunted Mansion from Civvie11 Massacre) and the exact same problem occurs in software rendering mode.
However, the problem goes away in hardware display mode.

Annoyingly, as I stated in the OP, the mirrors don't work at all in my map in hardware mode. Any advice as to why?

I fixed, now it perfectly works with hardware accelerated mode, the "problem" is that I don't really know what I did to fix it...

First thing I tried was the obvious "delete sector behind the line", but like you stated before it didn't work, so I started modifying shapes and linedefs in front and on the sides (I thought that maybe using a "transparent line" in front would cause issues cause of how mirror works, but nope).

Then, all of a sudden, one of the mirror I modified just happened to work... so I copy and pasted it onto the others et voilà.

 

Here's your wad back MAP01 fixed.rar 

 

My best guess it's that something you did (sector/linedef/other) just broke something in GZDoom (it happens in many different ways) and I probably modified that one thing that was causing the issue while modifying suff.

Share this post


Link to post
On 4/19/2022 at 5:12 PM, Kan3 said:

I fixed, now it perfectly works with hardware accelerated mode, the "problem" is that I don't really know what I did to fix it...

First thing I tried was the obvious "delete sector behind the line", but like you stated before it didn't work, so I started modifying shapes and linedefs in front and on the sides (I thought that maybe using a "transparent line" in front would cause issues cause of how mirror works, but nope).

Then, all of a sudden, one of the mirror I modified just happened to work... so I copy and pasted it onto the others et voilà.

 

Here's your wad back MAP01 fixed.rar 

 

My best guess it's that something you did (sector/linedef/other) just broke something in GZDoom (it happens in many different ways) and I probably modified that one thing that was causing the issue while modifying suff.

 

Thank you sincerely for the time you set aside to help me with this. I'd have liked to know what exactly you did to fix it as I'm trying to learn! But I'm glad it was possible through some tinkering.

That said the glitch is still present in software mode but I now believe this to be a problem with my GZDoom settings. Works perfectly in hardware mode. Thanks again!

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...