Jump to content

One way mirror glass


Recommended Posts

I was playing with line portals, translucency and mirrors and came up with a nice reflective one way glass construct. I thought it looked really cool so I thought I'd share how I did it.

 

Disclaimer: I map in DiHF, so there may be another way to do this in UDMF...

 

Anyway:

Essentially, I use a one-way portal to simulate the translucent side and a mirrored linedef to simulate the reflective side. Translucent linedefs are used in front of these to make it look more realistic.

 

Summary:

So, you create linedefs as close together as possible, flagged like so:

 

OUTERMOST (mirrored side)
a--------------------- 156 (line_setportal), 0,1,0,0


b--------------------- 208 (translucentline) midtex for glass (e.g. COMPBLUE), 0,120,0,0 (the colour we want our mirrored glass to be)


c--------------------- 182 (line_mirror) No args, hence the 208 line in front...
VOID HERE
VOID HERE              Void here cos we are not actually using a transparent sector...
VOID HERE
d--------------------- [no special, tex not important]


e--------------------- 156 (line_setportal), 1,2,0,0. This is a portal to the one above, line 'a'.


f--------------------- 208 (translucentline) midtex for glass (e.g. COMPBLUE), 0,120,0,0 (the colour we want our see through glass to be)
INNERMOST (translucent side)

 


Steps (In Eureka editor):

Spoiler

 

Mirrored side:

a: visual portal on the outside. We are looking out, not in, so we only need the self line ID:

1.png?raw=true

 

b: A translucent line, textured as you prefer (MIDTEX) to simulate the mirror colour, if wanted.

2.png?raw=true

 

c: Line against the void. Give this a mirrored linedef. There are no arguments, hence the need for the translucent line in front.

3.png?raw=true

 

Translucent side:

d: Other side of void space. No specials needed.

 

e: The other side of the line portal. We are looking though this one to the outside (a: above):

4.png?raw=true

 

f: And a translucent line so the simulated glass looks more 'glassy'...

5.png?raw=true

 

 

 

 

Demo video:

Spoiler

 

 

 

 

And a download for the demo WAD:

https://github.com/smeghammer/snippets/blob/master/1wayglass/1wayglass.wad

 

 

 

 

 

Edited by smeghammer
fixed broken images

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...