Product Chat / How would you create a mirror ?, ideas needed.

Author
Message
perelect
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 23rd May 2015 00:56 Edited at: 23rd May 2015 03:13
I have just been wondering about, if it possible to create a mirror for a bathroom or bedroom scene.

So if you look into it you see your self and everything behind you as well.

I assume some sort of camera control is used.

Was there anything like this in the Reloaed days..

Cheers.
I may be old, but at least my memory still ....hmmm

Pavilion dv6 Notebook, Intel(R) Core(TM) i5-2410M CPU @ 2.30 GHz, Win 7 64 bit, 16 GB Ram, Radeon (TM) HD 6490M, 2336 MB Memory. Resolution 1366x768, Intel(R) HD Graphics 3000. (WEI 5.8)
!nullptr
Forum Support
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 23rd May 2015 03:11 Edited at: 23rd May 2015 03:14
I tried this the other day using a simple image.

Took a screen capture of the "behind" view, whacked a dummy face on the view, cropped it into a mirror frame. When I walked up and was facing the mirror I switched to an image.

I hashed it out of boredom and it looked a bit lame but it might give you an idea

EDIT: This may even be a way using camera control - use alpha for the actual reflective part? Outside mirror frame is captured front view for the image.
Development/ Gaming Rigs
Sys 1: i7-4770 (3.5)/16Gb/128 SSD/3Tb/970gtx/2 x 23, 1 x 27 LCD - Sys 2: i7/8Gb/670gtx/1.5Tb/1 x 23 LCD - Sys 3: Amd Quad/8Gb/645gtx/1Tb/30" LCD
PM
Jerry Tremble
GameGuru TGC Backer
11
Years of Service
User Offline
Joined: 5th Nov 2012
Location: Sonoran Desert
Posted: 23rd May 2015 03:36
That's a good workaround! If we had multiple cameras (as well as control of them) I think it would be the way to go. Otherwise, I'd bet a shader could be made that could do it, and would behave more like an actual mirror than a camera. I'd bet it would suck a lot of resources, though!
MAME Cab PC: i7 4770@3.4Ghz (passmark 9945), 12GB RAM, Win 8.1/64, GeForce GTX645 (passmark 1898); Shiny new laptop: i7 4800MQ@2.7Ghz (passmark 8586), 16GB RAM, Win 8.1/64, GeForce GTX870M (passmark 3598); Old laptop: i5@2.3Ghz, 8GB RAM, Win 7/64, Intel 3000 graphics
PM
Errant AI
Forum Support
17
Years of Service
User Offline
Joined: 24th Aug 2006
Location: [REDACTED]
Posted: 23rd May 2015 03:40
We don't yet have the capability for multiple active cameras/render targets. I sort of doubt we will see that before a major graphics system overhaul but I could be wrong. Until then, we're limited to various forms of fakery.
Gigabyte P67A-UD4-B3, Intel Core i7 2600K, 16GB Corsair DDR3, EVGA GTX 970 SC, Win7 Pro 64-bit SP1, Primary monitor @ 1920x1080, secondary monitor @ 1024x1280
perelect
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 23rd May 2015 04:42
Thanks Guys,

I will store this idea away, for another day.

I remember many, many years ago when Duke Nukem was released it had mirrors in it.

I wonder how they did it back then.
I may be old, but at least my memory still ....hmmm

Pavilion dv6 Notebook, Intel(R) Core(TM) i5-2410M CPU @ 2.30 GHz, Win 7 64 bit, 16 GB Ram, Radeon (TM) HD 6490M, 2336 MB Memory. Resolution 1366x768, Intel(R) HD Graphics 3000. (WEI 5.8)
Errant AI
Forum Support
17
Years of Service
User Offline
Joined: 24th Aug 2006
Location: [REDACTED]
Posted: 23rd May 2015 06:07
An old-school brute-force method is to have the "mirror" just be an opening between two mirrored but otherwise identical rooms. With GG, the tricky part would be to have any characters in the "reflection" to accurately mirror any activity. Someone really good with .lua could probably pull it off. I think it would be neat (in a horror game) to have some messed up stuff going on in the "mirror" lol
Gigabyte P67A-UD4-B3, Intel Core i7 2600K, 16GB Corsair DDR3, EVGA GTX 970 SC, Win7 Pro 64-bit SP1, Primary monitor @ 1920x1080, secondary monitor @ 1024x1280
!nullptr
Forum Support
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 23rd May 2015 06:14
It's kinda ironic. I was researching a story from the 1950's about Maralinga, an atomic bomb testing site. An aboriginal family was found sleeping next to a bomb crater and was taken into Maralinga for a shower, something they had never had.

The lady, one Edie Milpuddie saw herself in a mirror and screamed and ran out of the shower block. She was yelling there was someone else in the bathroom!

That's why I tried the mirror trick, to test whether I could implement that part of the story. As funny as it might seem, I thought it would be a very chilling incident to recreate.
Development/ Gaming Rigs
Sys 1: i7-4770 (3.5)/16Gb/128 SSD/3Tb/970gtx/2 x 23, 1 x 27 LCD - Sys 2: i7/8Gb/670gtx/1.5Tb/1 x 23 LCD - Sys 3: Amd Quad/8Gb/645gtx/1Tb/30" LCD
PM
perelect
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 23rd May 2015 06:54
@ Errant AI

That's an idea I can work with, a mirrored room with an opening in the wall.
That's got me thinking again ......

Thanks again guys



I may be old, but at least my memory still ....hmmm

Pavilion dv6 Notebook, Intel(R) Core(TM) i5-2410M CPU @ 2.30 GHz, Win 7 64 bit, 16 GB Ram, Radeon (TM) HD 6490M, 2336 MB Memory. Resolution 1366x768, Intel(R) HD Graphics 3000. (WEI 5.8)
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 23rd May 2015 17:48
Yes that would be your best bet. Should be possible given a bit of time with Lua I think.


SPECS: Q6600 CPU. Nvidia 660GTX. 8 Gig Memory. Win 7.
rolfy
17
Years of Service
User Offline
Joined: 23rd Jun 2006
Location:
Posted: 23rd May 2015 19:25 Edited at: 23rd May 2015 19:29
Here's a vid from an old FPSC Classic level which shows a brute force mirror effect on the floor. Everything, even the characters and flame decals are mirrored and flipped and the floor is semi transparent. All the same you could have done this instantly and easily in x10 with a slice of water just above the floor surface, since we already have reflection with water in GG perhaps this effect could be hijacked or improved on for proper reflective surfaces since it is shader driven.

Pirate Myke
Forum Support
13
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 23rd May 2015 19:33 Edited at: 23rd May 2015 19:33
Good idea, but the water plane would kill the AI completely right now.

Maybe using a cubic texture label as _C apparently in the basic shader might be a better try.

It was showing up on the charger model issue and turned out that when that texture was labeled back to _D the issue went away.

this is used on the weapons for the reflection and is a very blurry map, so a sharper one would pull it off better. Now if it could be animated texture, on a sprite decal better yet.

But a true mirror reflection, that would be superb. especially with a shader doing it.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit

3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 23rd May 2015 21:38
All this sound pretty nice!

3com
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 8.1 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics

PM
Teabone
Forum Support
17
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 24th May 2015 01:32 Edited at: 25th May 2015 02:26
Lee once mentioned he wanted to create output videos within the engine that would reference placed cameras. This could technically be a mirror as the mirror itself would also be where you place the camera so it shows your character looking at it (only in 3rd person would that work). However we dont have camera markers yet (not sure if they are planned) and no video shaders yet in GG that im aware of.
i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce 420 GT
vrg
9
Years of Service
User Offline
Joined: 27th Aug 2014
Location: Netherlands
Posted: 24th May 2015 07:15
Isn't there any for example any metal texture with reflection that will give the same effect?
perelect
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 24th May 2015 08:56 Edited at: 25th Jun 2015 19:31
Update:
I been playing with shaders, im just trying for a water reflection of any object to start with, but still no luck.

I might not be using the correct type of textures as well.

But you can do some interesting things with shaders.

Any tips or working examples would be great..

[video=https://youtu.be/3kQWcXLt7YE]
[video=youtube]https://youtu.be/3kQWcXLt7YE[/video]
https://youtu.be/3kQWcXLt7YE

How do you attach youtube videos correctly.? like rofl did above.

Thanks for all the ideas and comments,, keep them coming..


I may be old, but at least my memory still ....hmmm

Pavilion dv6 Notebook, Intel(R) Core(TM) i5-2410M CPU @ 2.30 GHz, Win 7 64 bit, 16 GB Ram, Radeon (TM) HD 6490M, 2336 MB Memory. Resolution 1366x768, Intel(R) HD Graphics 3000. (WEI 5.8)
Errant AI
Forum Support
17
Years of Service
User Offline
Joined: 24th Aug 2006
Location: [REDACTED]
Posted: 24th May 2015 10:37
Quote: "How do you attach youtube videos correctly.?"


Like this...

Gigabyte P67A-UD4-B3, Intel Core i7 2600K, 16GB Corsair DDR3, EVGA GTX 970 SC, Win7 Pro 64-bit SP1, Primary monitor @ 1920x1080, secondary monitor @ 1024x1280
perelect
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 24th May 2015 11:02
Thanks Errant AI,

I tried a few ways but not that one..
I may be old, but at least my memory still ....hmmm

Pavilion dv6 Notebook, Intel(R) Core(TM) i5-2410M CPU @ 2.30 GHz, Win 7 64 bit, 16 GB Ram, Radeon (TM) HD 6490M, 2336 MB Memory. Resolution 1366x768, Intel(R) HD Graphics 3000. (WEI 5.8)
perelect
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 4th Jun 2015 01:12 Edited at: 4th Jun 2015 01:16
I noticed with using transparent walls some objects were not visible through the wall. see picture.
To overcome this you must place the transparent walls on the map at the end after every thing else is placed.

I later noticed if you use a different shader it seems to fix this issue. But I have not tested this 100% yet with all media.
So far the skyscroll_basic shader seems to work pretty good for glass and clear water.

The pictures of the glass walls have opacity set to 255,200,150,100,50,25,0. in the DXT5 texture, and transparency = 5 in the fpe.
The texture is a water ripple. That is the effect that's shown on the glass walls.

Still no luck with a realtime mirror effect yet, but I have achieved some good effects for water and glass, along the way.
I may be old, but at least my memory still ....hmmm

Pavilion dv6 Notebook, Intel(R) Core(TM) i5-2410M CPU @ 2.30 GHz, Win 7 64 bit, 16 GB Ram, Radeon (TM) HD 6490M, 2336 MB Memory. Resolution 1366x768, Intel(R) HD Graphics 3000. (WEI 5.8)

Attachments

Login to view attachments
Gtox
3D Media Maker
9
Years of Service
User Offline
Joined: 5th Jun 2014
Location: South Africa
Posted: 4th Jun 2015 05:28
Just out of interest, I've been playing Deus Ex for old times sake, and I was surprised to see fully working mirrors in the game (apart from proper mirrors, there are also some highly reflective floors which reflect the player as well as the environment). Not bad for a game that's 15 years old, especially since I don't seem to see working mirrors in modern games.
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 4th Jun 2015 18:16
Quote: "especially since I don't seem to see working mirrors in modern games."

you see a lot of security cameras and such though, basically the same thing
life\'s one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
Teabone
Forum Support
17
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 8th Jun 2015 19:52
A good example would be Duke Nukem 3D. You can see yourself in the mirrors and even the players shadow while in first person.

i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce 420 GT
perelect
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 9th Jun 2015 01:22 Edited at: 9th Jun 2015 04:40
@ Gtox, I must admit I had never heard of Deus Ex before.
I Just googled it and watched a video for a new release of it coming out soon, it looks good.

@ smallg, That just made me think about the snipers scope in GG. it shows a reflection or a scrolling texture when you move it around, I will look into this, when I get some free time next week.

@ Teabone, Yes I remember that game, and that mirror in the bathroom.
" Damm I look good", I think...
That is actually what made me think of this mirror idea in GG.


Thanks Guys

Ill keep trying..
I may be old, but at least my memory still ....hmmm

Pavilion dv6 Notebook, Intel(R) Core(TM) i5-2410M CPU @ 2.30 GHz, Win 7 64 bit, 16 GB Ram, Radeon (TM) HD 6490M, 2336 MB Memory. Resolution 1366x768, Intel(R) HD Graphics 3000. (WEI 5.8)

Login to post a reply

Server time is: 2024-05-08 00:50:05
Your offset time is: 2024-05-08 00:50:05