GTKradiant - Hall of Mirrors


(lobo) #1

Hi,
Just wondering if anyone making an ET map or messing around with gtkradiant has had any success in using multiple mirrors to create a hall of mirrors effect without the flickering.

I’ve managed to create a simple test map with one mirror, but when I add another, all I get is the flickering effect.

I’m sure there is a way to fix this, either by using a hint shader or some other way but I don’t have that much gtkradiant experience.

Also, when I lean into the mirror, the players face disappears. I think this is something that can be fixed by clipping but I’m not sure how to clip the mirror to stop this from happening.

Any links to resources or tutorials would help.

Thanks.


(ETJump-Zero) #2

I’m pretty sure the hall of mirrors effect is not possible to do.


(stealth6) #3

As zero said hall of mirrors effect is not possible. You can’t have 2 mirrors where the faces can “see” eachother. As for clipping, just make the clip bigger than the mirror so you can’t get close.


(lobo) #4

Well, I know it hasn’t been done before but I think I can get it to work. It’ll make a really cool effect for a map I’d like to make.

As far as clipping goes, do I create a brush in front of the mirror brush and then clip that brush or clip the mirror brush? I’m missing something. =D


(stealth6) #5

[QUOTE=lobo;483801]Well, I know it hasn’t been done before but I think I can get it to work. It’ll make a really cool effect for a map I’d like to make.

As far as clipping goes, do I create a brush in front of the mirror brush and then clip that brush or clip the mirror brush? I’m missing something. =D[/QUOTE]

Create a brush in front of the mirror brush and apply the clip texture. Don’t use clipping tool.

Good luck!


(lobo) #6

OK I put a brush in front of the mirror brush and applied the clip texture and that stopped the player from getting cut off when leaning into the mirror.

But then I removed it and replaced it with a teleporter trigger that basically does the same thing, so if the player gets to close to the mirror now the player get’s teleported to the roof. =D

I was hoping that if a clipped brush or trigger was in front of the mirror, and the misc_portal_surface entity that’s locked onto the mirror, it would ‘block’ the view of any other mirrors in the area and not cause the flickering, but it didn’t work.

So now, instead, I’m trying to use the misc_portal_camera and info_notnull entities to project a view onto the misc_portal_surface brush but I can’t get it to work.

This is how I have the 3 entities set up, maybe I don’t have them set up right…:

classname: misc_portal_surface
targetname: portalsurface
target: portalcamera
origin: 640 304 72
This is the entity directly in front of a random brush with a walled texture. The instructions say to set the target to a misc_portal_camera that ‘sees’ the view you want to display on the portal (target: portalcamera).

classname: misc_portal_camera
targetname: portalcamera
target: viewfinder
spawnflags: 1
origin: 64 384 40
Instructions say to use the angles key or target a target_position or info_notnull entity to set the camer’s pointing direction (I didn’t see ‘target_position’ entity so I used ‘info_notnull’ entity, which gtkradiant says does the same thing).

classname: info_notnull
targetname: viewfinder
target: portalsurface
origin: 64 344 40
This is the info_notnull entity. I tried targeting the misc_portal_surface and the misc_portal_camera but neither one worked in projecting the view onto the portal surface.

If I can get the camera to work and put it with a teleporter, even if it means isolating them in different but identical rooms, I think I can create the illusion of a hall of mirrors.


(stealth6) #7

info_notnull doesn’t need a target and I’m not sure if it’ll work with a target.

To do what you’re trying to do, put the portal_surface infront of the mirror, then place the portal_camera 128 units in front of the mirror, then place the info_notnull between the portal_surface and the portal_camera (so 64 units in front of the mirror).

Now all 3 entites are in 1 line, with some distance between them.
Deselect everything. Select the portal_surface THEN the portal_camera THEN press ctrl+k.
Deselect everything. Select the portal_camera THEN the info_notnull THEN press ctrl+k.

Now the entities are connected like this:
portal_surface -> portal_camera -> info_notnull

Congratulations the camera is pointing towards the mirror. If this doesn’t work then hall of mirror effect isn’t going to work (which is probably the case).


(acQu) #8

I have read somewhere that the engine does not support this, because it would basically end in an endless loop or something :smiley: but could be wrong …


(ETJump-Zero) #9

Yes, this is where I based my comment on. It’s just been so long since I read the article, I didn’t want to sound like I’m absolutely sure.


(lobo) #10

Well, I couldn’t get the entities to work, but I discovered something else in the process.

I was able to create a window with breakable glass on one side and a mirror on the other and you can see through the glass from the outside and you can see your reflection from the mirror side. And if you break it, the whole mirror goes with it.

So I put two in front of each other and the flickering is mostly gone but it’s replaced with a white void.

It’s not exactly an infinite loop but I’m gonna keep playing around with it, I think this might work.

to be continued…




(RayBan) #11

I think your pretty much trying to create a black hole, that will suck all the universe as we know it into nothing… and ya… no shader for it…


(obsidian) #12

I think this could work if you could build a GPU with an infinite number of frame buffers. :slight_smile: