PDA

View Full Version : Mirrors in Source?



Euphoria
6th January 2007, 19:35
I've just started mapping in hidden and I was wondering- is it possible to create mirrors? There arn't any in Half Life 2 or any source mod, but if it can be done in Deus Ex why not source?

Ging
6th January 2007, 19:56
Different engines - there's 0 functionality available within Source to make a mirror that would reflect everything (especially the player model)

Zabiela
6th January 2007, 20:44
(especially the player model)

Considering your client doesnt render one.

Boxy
6th January 2007, 20:52
I've just started mapping in hidden and I was wondering- is it possible to create mirrors? There arn't any in Half Life 2 or any source mod, but if it can be done in Deus Ex why not source?

Closest you will get at the mo either a really high (256) cubemapped surface that is fully reflective OR
a func_monitor withe camera facing out away from the monitor its relaying to OR
to build a 'fake' copy of the world you want reflected behind where the mirror is, being sure to use a transparent shiny texture for your mirror surface.

Of course none have amazing results and not truely reflecting everything.

Fluffy
6th January 2007, 21:49
Closest you will get at the mo either a really high (256) cubemapped surface that is fully reflective OR
a func_monitor withe camera facing out away from the monitor its relaying to OR
to build a 'fake' copy of the world you want reflected behind where the mirror is, being sure to use a transparent shiny texture for your mirror surface.

Of course none have amazing results and not truely reflecting everything.


You can get a mirror-like texture with real world reflections going, but most of the time the client has real world reflections disabled (due to the stress on performance) and you really dont get too much extra with it... (not to mention you dont get to see yourself either...)

Paegus
6th January 2007, 21:59
didn't dystopia fix the no-player model problem?

would be nice for self-shadows though... maybe in HL4 they'll finally get around to it.

Ging
6th January 2007, 22:11
Not sure about dys fixing the non-player model issue, it's a bit of an ingrained engine one as far as I know (just because you don't get rendered if you're in first person mode).

Paegus
6th January 2007, 22:19
i recall a goof-off session a while back where we all played CS:S in 3rd person with the cameras inside our heads. wasn't all that bad actually. though the crosshairs never quite lined up.

Demented
6th January 2007, 23:47
HL2 traditionally doesn't have mirrors. It ruins all the suspense to see Gordon Freeman in the mirror!
Or at leats that's their excuse for not implementing it.
Apparently, not seeing your reflection in the water isn't as disbelief-causing as not seeing your reflection in a mirror.

paul|zero
7th January 2007, 04:24
Its possible to do third-person in source, but because of prediction and some other issues with how the pose parameters (body/aim/move pitch and yaw) for the player model are calculated, its buggy. Garry fixed it for his mod which makes extensive use of cameras. I made a third person mode using the antlion model which accounted for prediction, as well. So, first fix the third person bugs, then change it so that when rendering cameras the local player renders his player model. Then a mirror is just a camera pointing out from its monitor.

It's definitely not an engine limitation, its just something that Valve didn't fix up because they weren't using it.

Euphoria
7th January 2007, 10:08
In a nutshell, it is possible to work it but is too much hassle to be bothered with, especially since I wasn't planning on using mirrors as a major feature in a map. Thanks for the answers anyway:) .

ill
11th January 2007, 12:57
i think valve will make mirrors in hl3 :)

Euphoria
11th January 2007, 16:11
i think valve will make mirrors in hl3 :)

But as Demented said, when you play as Gordon Freeman in HL you aren't supposed to see yourself, so they may not (if they ever cease this episodic content and create a full hl3 game.)

Paegus
11th January 2007, 17:48
But as Demented said, when you play as Gordon Freeman in HL you aren't supposed to see yourself, so they may not (if they ever cease this episodic content and create a full hl3 game.)

why not? it's not like we don't know exactly what the dude looks like since his face is plastered all over every HL2 advert, box and ice-cream cone.

http://img260.imageshack.us/img260/2310/mirrormirrorsc7.jpg (http://imageshack.us)

if nothing else rendering a player model would give self-shadows. can't knock looking down and seeing where your shadow is falling. now if only they'd get on with proper dynamic light sources that are created on the fly by doors and players and so on and so forth.

Night Raider
11th January 2007, 18:25
In Half-Life, it's all about immersing the player into the game. You feel as if it were you who is interacting with the characters in your environment. Yes, you play as Gordon, but you never get to seehim ingame, because Valve really wants to make you feel like you are in the game. That's also the reason why there are no cutscenes, all important dialogue is transmitted to you while in the game.

I think mirrors should be implemented, but never be used in the actual game. Maybe as an extra feature for developers.

Paegus
11th January 2007, 18:57
and yet despite that claim practically everyone in the game who isn't there solely to shoot at you goes "OMG IT'S GORDON FREEEEEMAAAN!" whenever they see you...

hold water that does not...

Night Raider
11th January 2007, 19:30
Well, there really isn't a way to add your name if the game relies heavily on voice acting for communicating to the player. What I'm saying is that in HL2, you can very naturally say that you are Gordon Freeman, and as soon as someone calls out that name, you know they are calling for you. Instead of, for example, knowing that the one being called is the character Gordon Freeman, and not you, except you are controlling said character and so they are actually calling you, not Freeman. When you see Freeman, you remember, "Oh, I'm not moving in the environment, I'm just controlling a character which is moving through the environment, but is not actually me." Instead, if you can't see the character, it's harder to make that jump, and even harder when you're in the middle of a firefight.

Paegus
11th January 2007, 20:41
in so far as a game is concerned there is no practical difference between seeing someone else being reflected in a mirror and being referred to as if you were someone else. at least you have the choice not to look in the mirror. unless you mute the game you wont be able to not be referred to as Gordon Freeman whether or not you believe that's who you're controlling.

it's an excuse for not doing things imo. i'm not knocking the lack of cut scenes though. nor the lack of player voice since they'd never be quite what i'd be saying were i in the character's position. not rendering player bodies was done because they couldn't figure out a 'nice' way to do it not because it would ruin the immersion. i for one would feel a heck of a lot more immersed if "i"... oh idk... had LEGS...

Demented
11th January 2007, 22:20
It worked better in Half-Life than in Half-Life 2, because in Half-Life you were only rarely referred to as Gordon Freeman, and the expressed perception of him was very vague, at best.

Everytime in Half-Life that Gordon Freeman was mentioned, they mentioned it in the context of Gordon Freeman doing things that the player had already done. I.e. the special forces wanted Gordon Freeman dead because he was causing such a ruckus, which the player had done while merely playing the game. Thus, the identity of the player and Gordon Freeman were linked.

In Half-Life 2, Gordon is a messiah before the player ever steps off the train. Adios, suspension of disbelief. Mirrors might have actually helped immersion. (A la Prey and Duke Nukem) :p

Ging
11th January 2007, 22:41
But as Demented said, when you play as Gordon Freeman in HL you aren't supposed to see yourself, so they may not (if they ever cease this episodic content and create a full hl3 game.)

The episodic stuff is, in all but name, HL3 - Gabe said as much a while ago. (and it's taking them just as long to do the three episodes as it would to do a 'complete' HL3)

Euphoria
12th January 2007, 19:20
I hope they don't do a tomb raider with the hl series- eg. using the same engine repeatedly over the years but adding little graphical updates, and barely changing the gameplay, to the point where you've done it all before. You've got to admit, there is that danger there...

Paegus
12th January 2007, 19:45
umm... they already did...

Fluffy
13th January 2007, 00:34
umm... they already did...

basically...


Although, you have to admit, the whole "GldSrc to Src" thing was a big leap for updating the same engine... and other than that, everything is either a game addition to the storyline or it's a third party mod marketed by valve... (EG: episode 1 and episode 2 engine enhancements...)