An Interesting Observation About Source Engine's Graphics

Spiffae

Newbie
Joined
May 22, 2003
Messages
1,211
Reaction score
0
Hi -

I've been playing a lot of CS: Source, and I think i've determined something about how HL2 (and all source games) can seem to have so much cool realtime reflection (on guns etc.) without taking a huge rendering hit.

It has to do with environment maps. An environment map is essentially a 360 degree photograph that is an approximation of what is going on around a given object.

In most games, You'll see one, maybe two environment maps per level. mostly it's something along the lines of sky above, ground below, and it works for giving you nice chrome deagles and such. In Source, however, there are dozens, if not hundreds of environment maps. It seems that Valve has a tool that allows them to break a level into chunks, and then quickly generate environment maps that accurately portray what's around. In de_dust, there are five seperate maps between the CT spawn, and the entrance to the "T" dome area. generally the differences are subtle, but it really makes a difference when you're transitioning from outdoors to indoors. Let me illustrate.

(This would be easier to do if I had a weapon that was a ball of chrome, and it's easier to see in motion, but we'll work with what we've got)



Here's near the CT Spawn. You can see the rear of th gun reflecting the shadowed wall behind me, and the rest reflecting sun and sky.

1.jpg




Now it gets a bit more interesting. I'm standing near a wooden door, and it appears that the door is reflecting in the side of the gun. It's actually just a good environment map, but the illusion is almost perfect.

2.jpg




Here we're entering the dome tunnel (whatever the CT kids call it) you can see a glint of light from the entrance shining on the back of the gun, but the front and sides are dark, reflecting the dark walls inside.

3.jpg




Now in the underpass. Halfway throught the tunnel, the gun is reflecting both the entrance behind me, and the light coming in up ahead. It's just an environment map, but it's a great illusion of true reflection.

4.jpg




My Favorite - almost out of the tunnel, you can see the gun reflecting the sky, sun, and sand up ahead, while the back is still showing the tunnel exit that i'm standing in. It looks great.

5.jpg



This isn't CS:S related, this is a fundamental technology of the Source Engine. I thought this might be enlightening. I only posted it here because the HL2 forums don't have IMG code enabled. :D

Comments?
 
Nice screenshots. I had never really taken that close of a look at the desert eagle's reflections before, and they do look impressive. One thing I noticed however is while wielding a sniper rifle, the environment map switch can be quite apparent at times. I also tried to reflect the busted-up blue car near the counter-terrorist spawn point, but it doesn't work. Still, I think Valve was wise to use this method because, as you already stated, it hardly affects the framerate.
 
I think this was mentioned in that shading .pdf a while ago. It's pretty cool, although I think I can see the reflection in scopes switching environment maps sometimes.
 
Yup, a real nice post, Spiffae. When you can look at each shot as a still frame like that, you really get a good idea of how much the gun reflections shift as you move through light and dark.

I see very little difference between a fairly-accurate environment map and a real reflection, and any day I'd take a slightly smoother framerate over the gimmick of being able to put my gun against an enemy's face and see his nose reflected on my barrel.

-UnmarkedOne
 
a very good explanation Spiffae :thumbs:
yeah this technology is defnitely very nice ;)
 
UnmarkedOne said:
Yup, a real nice post, Spiffae. When you can look at each shot as a still frame like that, you really get a good idea of how much the gun reflections shift as you move through light and dark.

I see very little difference between a fairly-accurate environment map and a real reflection, and any day I'd take a slightly smoother framerate over the gimmick of being able to put my gun against an enemy's face and see his nose reflected on my barrel.

-UnmarkedOne

that would be nice though :)
 
Use the scopes reflection, much easier to see the difference. You can see it change before you go to the sniper nest at CT spawn.
 
Malambis said:
Use the scopes reflection, much easier to see the difference. You can see it change before you go to the sniper nest at CT spawn.
Yeah, it's much more obvious with the scopes. Absolutely beautiful looking, but the way they transist from one area to another does look a little bad - it's just a simple change and it looks a little rough, maybe they could change something so that they softly blend from one to the other in the future... if anyone knows what I'm talking about.
 
It looks pretty fantastic - although the transitions, as abom has said, look kinda bad.

For example look at the reflectivity on the crowbar in the Ravenholm video.As soon as Gordon goes into a new area the transist is a bit harsh - and it reflects the new area. If you stand on a spot and move round - it looks gorgeous, but when you move alot the transitions tend to look slightly bad. Also - I noticed that in the crowbar's case when reflecting daker areas - the crowbar turns totally grey including the wooden part (which looks weird)
 
lans said:
It looks pretty fantastic - although the transitions, as abom has said, look kinda bad.

For example look at the reflectivity on the crowbar in the Ravenholm video.As soon as Gordon goes into a new area the transist is a bit harsh - and it reflects the new area. If you stand on a spot and move round - it looks gorgeous, but when you move alot the transitions tend to look slightly bad. Also - I noticed that in the crowbar's case when reflecting daker areas - the crowbar turns totally grey including the wooden part (which looks weird)

um, crowbars don't have wooden parts. I'm not sure what you're talking about.
 
dunno if anyones mentioned this, but its much more noticeable on the scope. just look at the glass, and as you spin round, you see the environment behind you. plus, its much easier, when you run through into another section ( outside into tunnel ), to notice the shift in the image.
 
Good post spiffae! Haven't seen you around the forums for a while :thumbs:
 
Back
Top