Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to make a mirror in the editor??
Traggey Offline
is mildly amused

Posts: 3,257
Threads: 74
Joined: Feb 2012
Reputation: 185
#11
RE: How to make a mirror in the editor??

(05-09-2013, 10:28 AM)martinnord Wrote:
(05-09-2013, 09:56 AM)palistov Wrote: Even if you could see the player (most games neglect to have player models visible in first person beyond their arms), mirrors are very impractical in games. The cost of redrawing or computing what part of a scene is visible in a mirror would make frametimes so high they would get arrested for drug abuse. To emulate one you'd have to carefully build the environment around the "mirror" and get a custom-made player model. Probably way more work than it's worth.
What about taking a screenshot of the environment and using it as a texture for reflection, and only letting the mirror mirror the player and other moving objects? (in case you havent realised we are now in the part of discussion where its no longer in amnesia)

Mirrors in game engines are done with cubemaps, cubemaps don't work that way. Either you mirror the entire thing, or you don't.

A low-res real time cubemap isn't too expensive, but you really don't want to use it in an area where ''action'' will go down.

And when I say low res, I mean 64 x 64, anything above that will have quite the impact.
05-09-2013, 01:13 PM
Find
Tiger Away
Posting Freak

Posts: 1,874
Threads: 16
Joined: Nov 2012
Reputation: 55
#12
RE: How to make a mirror in the editor??

Have different models that show stages of change. One where you look like normal, one that shows you as a monster and all the stages between that. Place all those models in the same place, where you want them and make all of them inactive except the one where you are normal. Then you can make them change with triggers or timers. Like the others said, you could take a screenshot of the surroundings so that the "mirror" shows what's behind you.
05-10-2013, 10:07 AM
Find
Traggey Offline
is mildly amused

Posts: 3,257
Threads: 74
Joined: Feb 2012
Reputation: 185
#13
RE: How to make a mirror in the editor??

(05-09-2013, 10:18 PM)Robosprog Wrote:
(05-09-2013, 01:13 PM)Traggey Wrote:
(05-09-2013, 10:28 AM)martinnord Wrote:
(05-09-2013, 09:56 AM)palistov Wrote: Even if you could see the player (most games neglect to have player models visible in first person beyond their arms), mirrors are very impractical in games. The cost of redrawing or computing what part of a scene is visible in a mirror would make frametimes so high they would get arrested for drug abuse. To emulate one you'd have to carefully build the environment around the "mirror" and get a custom-made player model. Probably way more work than it's worth.
What about taking a screenshot of the environment and using it as a texture for reflection, and only letting the mirror mirror the player and other moving objects? (in case you havent realised we are now in the part of discussion where its no longer in amnesia)

Mirrors in game engines are done with cubemaps, cubemaps don't work that way. Either you mirror the entire thing, or you don't.

A low-res real time cubemap isn't too expensive, but you really don't want to use it in an area where ''action'' will go down.

And when I say low res, I mean 64 x 64, anything above that will have quite the impact.

Do you have any idea what the cubemap for the reflective water is? Seems interesting, since I abuse that water in outdoor maps like the local village whore.

Cubemap from the reflective water is most likely just a normal pre-baked cubemap, nothing to worry about.
05-10-2013, 11:52 AM
Find
Acies Offline
Posting Freak

Posts: 1,643
Threads: 60
Joined: Feb 2011
Reputation: 73
#14
RE: How to make a mirror in the editor??

Just made this:
http://www.youtube.com/watch?v=f-UZ9mt9Izs

It's a water material - no cubemap. Some weird things happen. Performance-wise it's not advisable, go for a cubemap if possible. It's "real time" reflection though!

[Image: mZiYnxe.png]


05-10-2013, 07:19 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#15
RE: How to make a mirror in the editor??

It should be noted that World Reflection must be turned on in the graphics settings for Amnesia for water materials to reflect the environment.

Tutorials: From Noob to Pro
05-10-2013, 07:54 PM
Website Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#16
RE: How to make a mirror in the editor??

(05-10-2013, 07:19 PM)Acies Wrote: Just made this:
http://www.youtube.com/watch?v=f-UZ9mt9Izs

It's a water material - no cubemap. Some weird things happen. Performance-wise it's not advisable, go for a cubemap if possible. It's "real time" reflection though!

That's brilliant! I'm guessing there are certain stuff that does not exactly work in the mirror.
Just like particle-effects that doesn't know it's on the surface of the water, and therefore shows itself as if it was underneath it.
Did you look at the objects that moved weird?

Trying is the first step to success.
(This post was last modified: 05-10-2013, 11:25 PM by FlawlessHappiness.)
05-10-2013, 11:25 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#17
RE: How to make a mirror in the editor??

(05-10-2013, 11:25 PM)BeeKayK Wrote: Just like particle-effects that doesn't know it's on the surface of the water, and therefore shows itself as if it was underneath it.

Particle effects are reflected by the water material reflection. That just shows how much more it can impact performance.

Tutorials: From Noob to Pro
05-10-2013, 11:30 PM
Website Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#18
RE: How to make a mirror in the editor??

Yes, they are reflected.
I've just experienced that even though i've placed them above the surface, it looks like they are underneath it.
Which only happens because of the water-material

Trying is the first step to success.
(This post was last modified: 05-10-2013, 11:44 PM by FlawlessHappiness.)
05-10-2013, 11:44 PM
Find
Acies Offline
Posting Freak

Posts: 1,643
Threads: 60
Joined: Feb 2011
Reputation: 73
#19
RE: How to make a mirror in the editor??

Weird things:
1. Odd pure white box at 00:18-->00:23. (It's possibly a fog area "bleeding through" the walls + mirror).
2. At 00:25 --> 00:37. I seem to be looking into a cubemap at the other side of the room (@ the glass window).

[Image: mZiYnxe.png]


05-11-2013, 12:57 AM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#20
RE: How to make a mirror in the editor??

So, those two things should not be in range of the mirror, for it to display properly

Trying is the first step to success.
05-11-2013, 01:04 AM
Find




Users browsing this thread: 1 Guest(s)