Half-life 2 lighting...

Spiffae said:
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 actually e-mailed back and juste asked if such a lightsource would cast dynamic shadows on objects nearby (ala FC, D3, etc).. no reply yet, probably won't get one.
How can you say for sure that that's a lightmap?
 
Well, actually GI is a general term to describe a way of modelling light interactions between the objects in the scene. There are lots of various techniques that try to simulate the Global Illumination model. They differ in speed, simplicity and quality of the solution (a classical tradeoff). Basically when trying to do GI simulation, you are really solving the so-called Rendering Equation (introduced by Jim Kajiya in '84 or '86, much improved since then). That equation is pretty complicated as it contains lots of ugly integrals :)

For instance, ray tracing is a well known global illumination algorithm. The basic recursive implementation (Whitted style) is able to simulate LS*E light paths (i.e. specular reflections and refractions) plus it gives you hard-edged shadows "for free". The hardware is not still there though. Even UE3 tries to fake RT by some smart tricks (Sweeney talks about this in the NV40 launch vid)

Another example is radiosity - it's based on heat transfer theory. Again, classic version (credited to the Cornell univ.) simulates LD*E light paths (i.e. perfectly diffuse reflections - like those on walls or other matte surfaces, where light reflects uniformly in all directions). It's pretty complicated to implement properly, and still a bit too demanding for current hardware.
The good news is, the radiosity is view-independent - so, if you have static lighting in your scene, you can compute the radiosity factors "off line" and then apply it to surfaces during the rendering stage. The camera position has basically no effect on the radiosity values. This is pretty much, what everyone was doing since, when, Quake II?
Realtime radiosity (with dynamic lights) is really, really tricky, as you have to deal with many limitation inherent to this method (geometry meshing, shadow leakage and so on). It is also terribly slow :( And the more complicated your scene is, the more time is required to compute the radiosity values (O(n^2) complexity). Plus it is best suited for indoor scenes (often used in architectural design).

Both described techniques are pretty old (20-25 years!) and have been subject of constant improvements. But I guess it will take some time, before we will see true realtime raytracing and radiosity in games (there are demos though! I believe, there is even a 64k intro that does realtime ray tracing!:)

There are of course other approaches - such as photon mapping (Henrik Wann Jensen), that tries to solve the rendering equation using probabilistics, but it's computationally expensive. Not to mention the Metropolis Light Transport (Eric Veach), which is slow and difficult to implement. It'll take some time, before we'll see those methods in games for consumer hardware :)

Btw. check this Tim Purcell's PhD thesis
It has some nice examples of ray tracing and photon mapping done on hardware.

AFAIK, Doom3 implements local illumination model, with dynamic lighting (although, I've heard rumours, that some light effects are static for efficiency reasons). But instead of lightmaps, Carmack used stencil shadow volumes, which is a quite demanding technique in terms of geometry processing speed (every light that casts such shadows increases the amount of polygons in the scene - and those polygons, although invisible, have to be processed). That is one of the reasons, why there is a limited number of shadow-casting lights per scene, and objects (like characters) are so simple (in terms of number of polygons). To overcome this limitation on geometry detail, Carmack uses normal mapping (which is pretty simple technique btw.) to add details to the scene.

Valve's approach, I think, is more versatile atm. They can have both more polys AND normal maps (I wonder what can they do with ATI's new 3Dc technique for normal map compression :)), at the price of more limited shadows.
This seems to be true especially for the outdoors. Sure, Doom3 is supposed to have outdoor areas... on Mars...
Anyway, I'm waiting for both games :) Hope they'll be delayed, so I can buy myself a better rig :E
 
ScopeD said:
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.

/me corrects ScopeD

GI was in HL1, when compiling watch the output window, comes up with radiosity calculations, GI.
 
StardogChampion said:
I'm pretty sure the edges of the lighting can be softened.

Of course, edges can be blurred (the CGI is pretty much about faking real world optics :)), and we can live without GI for sure. Take a look at Bug's Life, Shrek, Monsters Inc. and such. Most shots didn't use GI at all - both Pixar and PDI used their own renderers, which are basically scanline renderers, and yet, the effects achieved are amazing.
 
Isn't CGI -> Common Gateway Interface?....
 
It's also Computer-Generated Imagery
I prefer to call it CG, though.
 
I can't wait to play with the flashlight when HL2 comes out!

It's likely not going to be anywhere near as cool as the doom3 fl, which will cast and stretch shadows all over the place.

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" ;)

So they say. And yet, turn off the dynamic shadows in the Doom3 alpha, and you've still got lots of static or repeating shadow effects.
 
mortiz said:
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.

I heard it was the other way round; Doom3 uses only dynamic lights. Apart from the good aspects of this, it increases the amount of work needed. It's better to uses static ones wherever possible to reduce unnecessary overhead on lighting things that will never change.
 
Shuzer said:
I actually e-mailed back and juste asked if such a lightsource would cast dynamic shadows on objects nearby (ala FC, D3, etc).. no reply yet, probably won't get one.
How can you say for sure that that's a lightmap?

I can't be 100% sure, but i've done a fair bit of mapping, and in general, the major light source (in this case, it seems to be coming from a window or something) is usually lightmapped. to have an entire room lit by dynamic light is a heavy drain on system resources.

also, it just looks like a lightmap shadow. not enough definition to be dynamic.

i, of course, don't know though. :thumbs:
 
Lightmap shadows currently generally look much deeper and better than dynamic shadows because of the radiosity calculations and high fidelity. I think the room in question is "lit" by a lightmap, not a fully dynamic light. If you shoot the lamp, it will swing (as they say) and the lightbulbs and glare will swing around, but I doubt the shadows on the wall will react. However, the shadows on models might well react, because they are simply stencil shadows which can move around in response to a simple change of value and angle.
 
If just the object shadows moved in response to a single light, that would pretty much give HL2 most of the coolness it needs, without all the overhead of having to render tons of extra polygons per scene for just one moving light.
 
I guess they use both static lightmaps and dynamic lighting. They can be combined. You can have basic scene lighting compiled as a lightmap plus radiosity and the HDR IBL stuff, while other light sources can be dynamic (no doomish shadows however).

EDIT: shadows, damn, I meant shadows!

Btw. Check Valve's GDC presentation at ATI. It has some info on lighting!
 
To be honest, sitting in a room shooting a lamp and watching the pretty shaddows isnt what i buy games for, I dun claim to understand all the tech, but from what ive seen HL2 is gonna be rendering some pretty wide open areas at a consistant level of detail. In the past such large areas come at the price of detail (BF1942 being a good example) Things feel chunky and cardboard like, and the movements are always sticky.

In Half-life 2's case it looks like there generating a good weighted feel to the large levels, To maintain this with all the shaders, animation, facial work, object and vehicle physics (esspeacialy on breakable objects), they have to use lightmaps, the dynamic lights will be used when a dynamic light is needed for the scene, (to create a dramatic swinging light etc).

Personaly I think the light maps there using are very high quality, Just check out the bugbait video in the laundry room, that whole image has alot of depth to it, a good use of particle halos and other stuff make for a really decent looking and feeling engine with alot of room for large open urban and natural maps.

Its simply a different approach for a different goal.
 
other light sources can be dynamic (no doomish shadows however).

Not full scene, no: but on all the moving objects that cast stencil shadows, maybe (that might be why they said something about dynamic lights being one per area: that one light per area light determines the angle and length of the stencil shadows).

I think, however, we can easily live without moving shadows on world geometry, especially given that the pre-rendered shadows and also lights appear to be able to get cast realistically on game objects and characters (I refer people again to the e3 "lab" video, in which light shines realistically) on Kliener as he turns and moves through it). With all this stuff in place, that leaves Doom's shadowing as just an occasional effect that HL2 won't have (world shadows moving with moving lights) as opposed to something that totally blows HL2's lighting out of the water)
 
Well, I really don't care that much, whether they use shadow volumes for all geometry or not, what I've seen so far, was impressive enough.
Just take a look at their GDC presentation - the final screenshot with an ant lion in a cave. It looks amazing. And, as you can see, it seems that the ant lion casts soft shadow on the ground/water. Enough for me :)
Or the reflection mapping screenshot - it looks damn pretty.

I guess we'll see more after the SDK is released. :thumbs: Can't wait though! :bounce:
 
zoidberg said:
Well, I really don't care that much, whether they use shadow volumes for all geometry or not, what I've seen so far, was impressive enough.
Just take a look at their GDC presentation - the final screenshot with an ant lion in a cave. It looks amazing. And, as you can see, it seems that the ant lion casts soft shadow on the ground/water. Enough for me :)
Or the reflection mapping screenshot - it looks damn pretty.

I guess we'll see more after the SDK is released. :thumbs: Can't wait though! :bounce:


link to this gdc vid???
 
Question for you geniuses about graphics. Since HL2 uses a combination of dynamic and static lighting/shadows, will shadows appear awkwards to the player?

For example, one object will have a soft shadow because of the lightmaps while another object in the same scene will have dynamic lighting/shadows and will have a hard shadow. In my mind that would produce an image that is jarring, please comfort me with some more complex words. :)
 
It's not a vid, it's a pdf:

ATI GDC Paper

And the screenshots are in v. good quality imho.

As for the shadows: they don't have to be hard-edged. If you take a look at that pdf (and the ant-lion screenshot), you'll notice the shadow is softened.
 
PDF's need to be banned off the face of the earth.

Why doesn't a game like Doom3 soften their shadows then? Just wondering. :)
 
I guess Doom III uses more dynamic lightning than HL2, because it needs more of that if you think of the purpose of the game.
 
A dynamic light in HL2 will cast shadows on the walls around it, and the objects around it will react accordingly with shadows and such. :cheers:
 
CrazyHarij said:
I guess Doom III uses more dynamic lightning than HL2, because it needs more of that if you think of the purpose of the game.

It doesn't just use more it uses ALL dyanamic lights. The entire engine is based off real time per-pixel lighting. I believe a big reason for this is to get closer to being more realistic than has ever been done before.

I'm sure that per-pixel lighting, like Doom III's, will become the norm for games in a few years.
 
It doesn't just use more it uses ALL dyanamic lights. The entire engine is based off real time per-pixel lighting.

So they say, but then, in the alpha, you turn off the dynamic shadows.... and there are still static shadows everywhere, making it look like the dynamic shadows are just folded in on top.

I'm sure that per-pixel lighting, like Doom III's, will become the norm for games in a few years.

Well, sure, but they won't use Doom3's method of perpixel lighting: there are much more complex methods that integrate better with other lighting effects and give you a more realistic picture, as you can see in the Unreal3 vid.
 
Apos said:
So they say, but then, in the alpha, you turn off the dynamic shadows.... and there are still static shadows everywhere, making it look like the dynamic shadows are just folded in on top.



Well, sure, but they won't use Doom3's method of perpixel lighting: there are much more complex methods that integrate better with other lighting effects and give you a more realistic picture, as you can see in the Unreal3 vid.


Well, that's probably one of the reasons it was alpha.
 
You don't build anything, let alone an alpha, that has a mix of static shadows and dynamic shadows if the whole point is to build an engine that's all 100% dynamic.
 
Apos said:
You don't build anything, let alone an alpha, that has a mix of static shadows and dynamic shadows if the whole point is to build an engine that's all 100% dynamic.

Well, I'll wait to see the final game. But you do realize just how old that alpha thing is don't you?
 
Sure, but I doubt much about the basic rendering tech has changed. Carmack said it was basically done only a few months after the alpha came out: it's the game that they are working to finish, not the renderer. That they are just tweaking for performance and compatibility.
 
static shadows aren't hard to implement. i wouldn't be surprised if these static shadows you see Apos weren't placeholders that won't be in the final build. who's to say exactly what the function of the r_shadows variable even does in the alpha? we don't know all the details, can't really make conclusions like that.

also, although it's a cool effect, i'd like to know what kind of light bulb doesn't blow when you shoot the frickin' lamp with a gun. if anyone knows a hardware store where you can get these i'd really like a couple... they'd come in handy in the garage.

considering the context of both games, i think DoomIII is well suited for having all dynamic shadows. the kind of environment of doom is well suited for a lot of mechanical, moving, light sources. HL2 not so much. having an engine like that for HL2 would be a waste of resources. i think both engines are going to be fantastic for the game they are debuting with.
 
i wouldn't be surprised if these static shadows you see Apos weren't placeholders that won't be in the final build.

Maybe, but what sense would that make? The method Carmack is using is a simple brute force method: once you get it working (and it's clearly working), you don't have any need for placeholders. Why would they need placeholders anyway? Without shadows, the map would still look normal: it's not like you need to pre-render shadows to playtest.
And this alpha was supposedly meant for hardware vendors to help write drivers: how could they do so if the engine wasn't running as it was supposed to?

who's to say exactly what the function of the r_shadows variable even does in the alpha? we don't know all the details, can't really make conclusions like that.

Again, true, but it really does seem to turn off dynamic shadows and leave static shadows intact, looking pretty much like pre-rendered lightmaps. But there are no rendered map files in the alpha. So maybe it is quick rendered at the start of each level, since it wont need to change.
 
I find it a bit pointless myself, When the average gamer is playing they dont sit there and count shaddows, I dont see how it effects the gameplay for the ammount of perfomance drain it currently brings.. I can understand it in a game like splinter cell, shaddows play an important role, but then i suppose all ID's flagship titles have been tech demo.
 
Lobster said:
I find it a bit pointless myself, When the average gamer is playing they dont sit there and count shaddows, I dont see how it effects the gameplay for the ammount of perfomance drain it currently brings.. I can understand it in a game like splinter cell, shaddows play an important role, but then i suppose all ID's flagship titles have been tech demo.

I imagine you really need to be a mapper to truly appreciate what dynamic lighting is all about.

Personally I can hardly wait. The immersion levels made possible by dynamic lighting are going to be fantastic in my opinion.
 
I imagine you really need to be a mapper to truly appreciate what dynamic lighting is all about.

Well, in later generations, I can sure see. But at least in this generation, it seems to mean: lower quality lighting, less complex lighting, and less artistic control over the lighting in return for ease of use, no compile times, and being much closer to realistic shadowing.
 
Lobster said:
I find it a bit pointless myself, When the average gamer is playing they dont sit there and count shaddows, I dont see how it effects the gameplay for the ammount of perfomance drain it currently brings.. I can understand it in a game like splinter cell, shaddows play an important role, but then i suppose all ID's flagship titles have been tech demo.

Quake 3 was really the only title that was flat out "in my opinion" a tech demo. Previous Id games did have great/revolutionary graphics, but computers back then limited gameplay options. To accuse Id software of just producing tech demos may technically be correct, but games (and gameplay) were largely limited on what computers could do back then. I will seriously say that Doom 3 will determine if Id Software is an engine developer or game developer.
 
Apos said:
Maybe, but what sense would that make? The method Carmack is using is a simple brute force method: once you get it working (and it's clearly working), you don't have any need for placeholders. Why would they need placeholders anyway? Without shadows, the map would still look normal: it's not like you need to pre-render shadows to playtest.
And this alpha was supposedly meant for hardware vendors to help write drivers: how could they do so if the engine wasn't running as it was supposed to?

Speed reasons. With stencil shadow volumes you want to keep occluders as simple as possible. Increasing the number of shadow casters and their complexity has significant impact on the performance. Of course, as the hardware gets faster, you'll be able to use more occluders with more detail.
However, this is pure speculation, as we know very little about the current state of the Doom3 engine.

Still, it's best to wait for the SDK. Then we'll know more. Hell, VALVe, if you are not going to release the SDK anytime soon, give us at least the SDK docs, so we can be ready when the time comes :devil:
 
For the record, I think Doom3 will be a real game, the best SP experience coming out of id since the original Doom days. The alpha proves it: they are going for a real moving story, going for events that fit into a plot. In a lot of ways, they are copying Half-life: scripted sequences to give the game world life and diversity, smaller levels with shorter load times to keep the experience seamless, etcc But it's a good thing to copy, and I think gamers will be rewarded for it with a fantastic game.
 
Any one notice that the reflection and refraction of the water look way better in the e3 tech demo than in the pdf? If you look at the pic of the water on page 95 of the pdf and compare it to the water in the e3 tech demo there is a huge difference. It Seems like DIRECTX8 is being used in the pdf. If the pdf is to show of source then why would they not use the highest detail settings. Again valve continues recent trend of not showing HL2 screens at the highest detail levels. Doesn't make sense to me.
 
Anyone know of screenies with characters casting multiple shadows (ie from 2 light sources) I cant remember any and this thread has made me curious, I suppose they must have them implemented tho, it would be way to crappy to not have multiple shadows in some places.

The normal place you see this is when walking down an office or hospital corridoor for instance, where you can see shadows fade and stretch as you walk past overhead lights, what I am talking about is when you stand in between 2 light sources you get 2 feint stretched shadows going away in both directions down the corridor.
 
I don't think there will be multiple shadows. That only happens if you calc the shadows from every single visible lightsource. That isn't what Source is doing most of the time: the character shadows, while very high quality and awesome for being cast on any surface at any angle (I love the way they strech across buildings) aren't doing that.
 
Carbon said:
Anyone know of screenies with characters casting multiple shadows (ie from 2 light sources) I cant remember any and this thread has made me curious, I suppose they must have them implemented tho, it would be way to crappy to not have multiple shadows in some places.

The normal place you see this is when walking down an office or hospital corridoor for instance, where you can see shadows fade and stretch as you walk past overhead lights, what I am talking about is when you stand in between 2 light sources you get 2 feint stretched shadows going away in both directions down the corridor.

I don't think HL2 will have multiple shadows.

But Doom 3 will. Here is proof. Looks pretty cool, if I may say.

http://planetdoom.com/images/image.asp?screenshots/official/8l.jpg
 
so how will it work in a situation like I described in the corridor? its going to look really crappy if the shadow is facing one way at one point then snaps to the opposite direction when in range of the next light. and a corridor with overhead lights is a pretty common situation... =/
 
Back
Top