Half-life 2 lighting...

Sorze

Newbie
Joined
Nov 1, 2003
Messages
476
Reaction score
0
http://www.halflife2.net/forums/showthread.php?t=1298&page=13&pp=40

http://media.pc.ign.com/media/492/4...mg_2102380.html

I just read the most recent mail in the "Info from Valve" Thread, from Shuzer, and Gabe talks a bit about lighting in hls (just a little bit..). Shuzer spotted a hanging light, and asks if you can shoot it so that the light wobbles around.
Gabe says it does, and that the lighting reacts accordingly.

Is this new information? I wasn't sure if this was possible in Source before now, but there should be a possiblity for at least a few realtime light sources in every map right?
This would make the lighting system similar to far cry's lighting system, wouldn't it?
"Normal" lights everywhere and a few dynamic lights sprinkled here and there..

I wonder if the shadows from objects (barrels etc) react accordingly, from what I've heard, their shadows are projected from a singled light entity, and thus, it shouldn't work..

Thoughts..?


Edit: You gotta admire the specularity on the wall and the floor in that screenie! Make things look sooo much better!
 
I believe there was a Havok physics demo on the Havok site demonstrating this.
 
yeah well.. Surely not all of it!?

I must be missing something, if thats the case..
 
A bit of clarification, that was Rick, not Gabe :)
Anyhow, I should've asked if it'd cast dynamic shadows. But yeah, the lighting in HL2 isn't fully dynamic Sorze.
 
The Source engine will utilise both dynamic and still light maps. In some cases where there is a hanging light like the one in that photo where the fixture is physically simulated they'll use dynamic lighting. In the case where it is a light fixture where it is actually fixed to the wall and not physically simulated it will probably just use the standard still light maps that similar to what was used in HL.
 
It's probably not the most ideal thing to do though, because in a situation of a movable lightsource in a room, the pre-rendered lightmaps would remain the same, while character and object shadows would deform.
The limit for shadow casting lights is one per area.
 
Shuzer said:
A bit of clarification, that was Rick, not Gabe :)
Anyhow, I should've asked if it'd cast dynamic shadows. But yeah, the lighting in HL2 isn't fully dynamic Sorze.
They've stated too that there will be dynamic shadows.
 
Actually, i don't remember it being official information but you could 've expect it. It's a directx 9.0 game and even Far Cry has it so..
 
Chris_D said:
They've stated too that there will be dynamic shadows.

Ooh yes, that's what i like to know to. What do you mean by dynamic shadows? I know how dynamic lighting is, but i can't form a visual image of how dynamic shadows are. I mean, shadows are shadows right? Can anyone explain a bit more?
 
That's kind of what I thought, that the lighting will light stuff up, but barrels and other objects might not cast the shadows any differently. That'd look a bit stupid, I'd think..

I've heard that they support dynamic shadows before too, Gabe:
"We approach this differently than Doom3." (<Paraphrased)

But how much support..? Can you make a map in all dynamic shadows, but then it would run like shite or what?
 
Chris_D said:
They've stated too that there will be dynamic shadows.
I know this, but, my question wasn't if the lamp in question would cast such shadows.

I sent a reply to Rick's e-mail, hopefully I'll get a reply back soon :)
 
If your in a completely dark room, and you flip a switch to turn on the light ficture hanging from the roof, then shoot the fixture which swings back in forth as a result, your shadow which is being projected against the wall behind you will move around in accordance with the light source.
 
I still can remember a guy from a games magazine who went to Valve. It was one of the first HL2 previews back in 2003. He discribed he saw a room with a lamp and when you shoot at the lamp the lighting and shadows changed: were totally dynamic.

Can someone remember this?
 
Half-Life 2 has superior lighting in the area of dynamics, DooM III only uses Static Lightmaps I think. (unless the level builder actually creates a dynamic lightmap) HL2 on the other hand uses properties on certain light types that tell the engine whether it is static or dynamic.
 
It's still not clear. Pre-rendered shadows obviously cast properly ON moving models like boxes and people. Shadows cast by these moving models, however, don't seem to cast on each other properly (like boxes on a table don't seem to cast shadows right on the table,a nd in some case, they acst THROUGH the table and onto the ground!). We've yet to see any moving lightsources which change the way shadows are cast, but Valve does seem to imply that this is possible as an effect, a la Far Cry. But we've yet to see it in action. At the moment, how they are going to deal with shadows and moving lightsources, as well as the stencil shadows interacting with world shadows, is pretty much unknown. It looks pretty darn good even without dynamic shadows, and gives them a lot of space to work with, but a degree of realism is certainly lost.
 
Apos said:
It's still not clear. Pre-rendered shadows obviously cast properly ON moving models like boxes and people. Shadows cast by these moving models, however, don't seem to cast on each other properly (like boxes on a table don't seem to cast shadows right on the table,a nd in some case, they acst THROUGH the table and onto the ground!).

Pretty sure that was mentioned in an e-mail, and VALVe said it's been fixed.
 
Apos said:
It's still not clear. Pre-rendered shadows obviously cast properly ON moving models like boxes and people. Shadows cast by these moving models, however, don't seem to cast on each other properly (like boxes on a table don't seem to cast shadows right on the table,a nd in some case, they acst THROUGH the table and onto the ground!). We've yet to see any moving lightsources which change the way shadows are cast, but Valve does seem to imply that this is possible as an effect, a la Far Cry. But we've yet to see it in action. At the moment, how they are going to deal with shadows and moving lightsources, as well as the stencil shadows interacting with world shadows, is pretty much unknown. It looks pretty darn good even without dynamic shadows, and gives them a lot of space to work with, but a degree of realism is certainly lost.

I would have thought dynamic shadows were a basic element to be included in most modern FPS's. Although FARCRY doesn't actually use 'proper' dynamic shadows, for instance moveable objects that can be physically moved around do not seem to cast shadows.
 
Half-Life 2 has superior lighting in the area of dynamics, DooM III only uses Static Lightmaps I think. (unless the creater actually creates a dynamic lightmap) HL2 on the other hand uses properties on certain light types that tell the engine whether it is static or dynamic.

Lol, no. Doom3 uses per-pixel lighting: fully dynamic (as in every single light in the game is rendered dierctly in the engine during run time). Hl2 uses a mix of static pre-rendered lighting, high fidelity soft stencil shadows on moving objects, and, possibly, we're hearing, dynamic lights, though we've yet to see it.
 
"Dynamic" is a little broad, really. All it implies is "changing/moving" which the shadows in HL2 certainly will do on objects that are movable (all moving objects, not just some like in Far Cry). But it won't be fully dynamic, as in some shadows won't move.
 
It supports dynamic lights but it looks like most will be light maps. Doom3 is different, all lights are dynamic and the whole thing is unified, one system for everything (last time i checked).
 
Apos said:
Lol, no. Doom3 uses per-pixel lighting: fully dynamic (as in every single light in the game is rendered dierctly in the engine during run time). Hl2 uses a mix of static pre-rendered lighting, high fidelity soft stencil shadows on moving objects, and, possibly, we're hearing, dynamic lights, though we've yet to see it.

the dynamic lights part was what I was getting at, sorry if my post was a bit waffly, id didn't appear to have them implemented, i.e. so called 'dynamic lights' were stuck in a repeating cycle insted of reacting to user input (for instance shooting a lamp attached to some cords suspended from the ceiling didn't affect the lighting what so ever, the lights were just stuck in a continuous cycle). The light itself was creating shadows as it should (which were dynamically changing). That's what I meant when I said the level builder would have to create a light that moved (in order to create changing shadows and lighting) and not just place a light that would react when shot, the lighting itself would not need to be tinkered with.

I'm not sure if id have implemented lights that can react directly to user input yet.
 
Apos said:
Lol, no. Doom3 uses per-pixel lighting: fully dynamic (as in every single light in the game is rendered dierctly in the engine during run time). Hl2 uses a mix of static pre-rendered lighting, high fidelity soft stencil shadows on moving objects, and, possibly, we're hearing, dynamic lights, though we've yet to see it.

Was just about to say the samething about doom3 as well there.

The way I see it having dynamic lights as well as static shouldnt be a problem as long as they're kept seperated, which the designers will undoubtably do because they're not idiots.

Its also possible that the dynamic shadows will react to the information given from the light entitys used when compiling the map? That way if a static shadow from a wall is facing north, then so will the dynamic shadow of a 'moving' barrel
 
Doom 3 is not fully dynamic as far as I have heard.. a) it's a waste and it would be stupid if it did, and b) I hear the beta allows you to turn off the dynamic parts of the lighting, and the static parts remain. This apparently gives a large performance boost, with only a few shadows disappearing.
 
Crusader, basing stuff on illegal betas/leaks/thefts/etc is a dumb thing to do. However, IIRC, turning off r_shadows in the D3 alpha made ALL the shadows disappear, and it looked quite crap without them
 
Don't forget: we're seeing GI (Global illumination) lighting for the very first time in HL2 in the history of gaming. Correct me if I'm wrong.
 
Global Illumination is essential the calculation of photons coming from a light source. Most hollywood animated movies don't do this as it takes incredible processing power. If HL2 is doing actually GI, then I'd be impressed. I know it does some radiosity lightings, but GI? That'd be intense.
 
I didn't notice any effect on performance, but it didn't look that different: plenty of things still had what looked like pre-rendered shadows (for instance, the shadow cast by the spinning fan didn't go away). It was mostly just the moving shadows and some grace notes here and there. Hmmm....
 
I don't think HL2 has GI, at least not the full featured sort (where light bounces off all surfaces to light an area in a very soft and complex way). I don't even think Unreal 3 tries to do it. The effect is not that noticeable, though it adds a feel of realism that you can't quite put your finger on...
 
Shuzer said:
Crusader, basing stuff on illegal betas/leaks/thefts/etc is a dumb thing to do. However, IIRC, turning off r_shadows in the D3 alpha made ALL the shadows disappear, and it looked quite crap without them
Perhaps D3 uses shadows for different reasons than we are aware of? Perhaps the game is so damn ugly without shadows, they HAVE to use to them to hide the ugly graphics ;)
 
At least we have radiosity? or that's how it looks from the e3 video :upstare:
 
Just to go back to the beginning of this thread... even though rick replied that the lamp would swing and move, i have dificulty believing him... that shadow cast on the wall is a lightmap shadow. lightmap shadows are defined when the map is compiled, and are completely static. the light can be on, off, or any brightness, but it cannot move or change dynamically. I hope that's what you've e-mailed about, Shuzer.
 
I can't wait to play with the flashlight when HL2 comes out!
 
Apos said:
I didn't notice any effect on performance, but it didn't look that different: plenty of things still had what looked like pre-rendered shadows (for instance, the shadow cast by the spinning fan didn't go away). It was mostly just the moving shadows and some grace notes here and there. Hmmm....
Are you sure that was some sort of projected texture from the fan? You can do that sort of stuff in the Unreal2k3/4 engine.

ANYWAY... here's just to put this to an end:
http://www.ferrago.com/story/1879
Do a FIND for "Doom 3, however, does away with such lightmaps" ;)
 
GI would be insane, and im sure its not in HL2. GI is what REAL LIGHT does. It bounces off of objects several times, slowly degrading for each reflection.

Even perpixel lighting is stupid compared to it. When a lightsource is behind a pole, straight, sharp lines are produced defining the edge of a pitch black area. We all know that this sharpness doesnt exist in real life, and that the area in fact is illuminated by less strong, reflected light.

Its funny that we know that the current technology will be scoffed at in 10 years.
 
Apos said:
I don't think HL2 has GI, at least not the full featured sort (where light bounces off all surfaces to light an area in a very soft and complex way). I don't even think Unreal 3 tries to do it. The effect is not that noticeable, though it adds a feel of realism that you can't quite put your finger on...

HL2 does radiosity, but of course, only in the lightmaps so not realtime. But it does add a lot of realism to a scene.
 
Triggerhappy41 said:
GI would be insane, and im sure its not in HL2. GI is what REAL LIGHT does. It bounces off of objects several times, slowly degrading for each reflection.

Even perpixel lighting is stupid compared to it. When a lightsource is behind a pole, straight, sharp lines are produced defining the edge of a pitch black area. We all know that this sharpness doesnt exist in real life, and that the area in fact is illuminated by less strong, reflected light.

Its funny that we know that the current technology will be scoffed at in 10 years.
I'm pretty sure the edges of the lighting can be softened.
 
i have a question about that lighting too. When this "LAMP" starts spinning and moving, will the specular lighting on the tiles and floor (the shinyness and glitteryness from light) also move about? I hope so.
 
Back
Top