Why didn't valve design half-life 2 to have stencil shadows?

Wester547

Newbie
Joined
Aug 11, 2003
Messages
144
Reaction score
0
I mean the direct-x9/direct-x 8 cards can handle it great and the direct-x7/direct-x6 cards don't handle it great so why did they just import soft render-to-texture shadowmapped shadows for dx9 mode and straight render-to-texture shadowmapped shadows for dx8 mode and blob shadows for dx7 mode and no shadows for dx6 mode? It doesn't make sense, they could have also imported per-pixel lighting instead of just shadowmaps and dynamic/static lightmaps! Any ideas?
 
My paragraph is quite explanatory. I ask why valve kept shadows and lighting so simple in half-life 2 instead of taking advantage of the latest hardware using per-pixel lighting and stencil shadow volumes. For those of you who don't know what Stencil Shadows are, stencil shadows are a rendering technique used to produce realistic looking shadows.

A light source will cause a shadow to be projected away from an object; the process of making a stencil shadow requires the object to be rendered several times, with at least once into a stencil buffer. The projected shape in the buffer acts like a mask - successive renderings of the scene around the object is checked against the buffer and any pixels that fall into the area marked out by the mask are given a very dark or plain black value.

Although the process is relatively straight forward, the large number of passes (and read/writes of the stencil buffer) means that a scene with lots of shadows or light sources will be very demanding to render.

Fortunately, direct-x6-direct-x 9 hardware support stencil buffering in hardware. However, you would recieve much greater performance with dx8/dx9 level of hardware while using stencil buffers, rather than the unplayable performance gained with dx6/dx7 level of hardware.

I personally don't see why half-life 2 doesn't have stencil shadows.

For those of you who don't know what per-pixel lighting is, per-pixel lighting is next generation lighting allowing bump mapping, specular lighting and stencil shadowing. Characters and the environments are now rendered and cast shadows the in the same pipeline, so characters, map objects and level geometry are all treated the same and are rendered in the most realistic methods possible using the latest hardware.

Only DX8 hardware and up supports per-pixel lighting.

I personally don't see why half-life 2 doesn't have per-pixel lighting, either.

These are very useful/effective techniques, because instead of using hacked and cheated shadowmaps/dynamic lightmaps/static lightmaps, you get real-world lighting, which also means you don't have to rebuild in an editor either while working on an map! w00t! Instead of getting hacked cheated solid projected render-to-texture shadows and blob shadows, you get real-time shadows, adding a much greater immersion factor!

Hope this helps.
 
My time limit of editing the previous post has expired so do you guys think stencil shadows + per pixel lighting would be a great addition to hl2?
 
Sure, but I'm pretty sure it has stencil shading. Look at the screenshot with the two guys on the roof of the building. The shadow is projecting away from him. Looks like stencil shading to me. :dozey:
 
Originally posted by Wester547
My paragraph is quite explanatory. I ask why valve kept shadows and lighting so simple in half-life 2 instead of taking advantage of the latest hardware using per-pixel lighting and stencil shadow volumes. For those of you who don't know what Stencil Shadows are, stencil shadows are a rendering technique used to produce realistic looking shadows.


i don't see why valve would want use stencil shadows. They are very fillrate intensive and it needs alot of work to get a robust implementation . Also they are hard edged and look not very realistic at all IMO.

HL2 uses per-pixel-lighting.

Although the process is relatively straight forward, the large number of passes (and read/writes of the stencil buffer) means that a scene with lots of shadows or light sources will be very demanding to render.

stencil shadows are not the way to go anymore.It might be good for a game like doom3 which is only based on direct lighting but it wouldn't fit very well for HL2

I personally don't see why half-life 2 doesn't have stencil shadows.

i don't see why hl2 should use stencil shadows

For those of you who don't know what per-pixel lighting is, per-pixel lighting is next generation lighting allowing bump mapping, specular lighting and stencil shadowing. Characters and the environments are now rendered and cast shadows the in the same pipeline, so characters, map objects and level geometry are all treated the same and are rendered in the most realistic methods possible using the latest hardware.

hl2 uses per-pixel-lighting

Only DX8 hardware and up supports per-pixel lighting.

not quite true. original geforce,radeons also support per-pixel-lighting because they support dot3 bump-mapping which is one way of doing per-pixel-lighting
I personally don't see why half-life 2 doesn't have per-pixel lighting, either.

hl2 uses per-pixel-lighting

These are very useful/effective techniques, because instead of using hacked and cheated shadowmaps/dynamic lightmaps/static lightmaps, you get real-world lighting, which also means you don't have to rebuild in an editor either while working on an map! w00t! Instead of getting hacked cheated solid projected render-to-texture shadows and blob shadows, you get real-time shadows, adding a much greater immersion factor!

???
I don't see anything wrong with doing pre-computed lighting and shadows in enviroments which are static. It actually makes sense because it's fast and looks good. It just makes no sense to use realtime lighting and shadows for everything because , you are limiting yourself quite a bit with it.

Hope this helps.
[/QUOTE]
 
Using static light maps for an object that will never ever move is smart, and lets off some load on the cpu. What point is there in making a indestructable, unmoveable, unalterable wall take advantage of real time shadow calculations as if it was going anywhere?
Come on think for once...
 
Sorry I've been mysteriously moving a couple of threads lately. I'm not sure if the other Mods have made it known which ones have been doing it, either. But, I decided to let you guys know this time.:thumbs:

Thread Moved.
 
Hehe, gracias Ghost. I hate it when threads just straight up all of a sudden move >__<. It's rather annoying.
 
Wrong. There is no such stencil shading in hl2, just high-resolution shadowmaps, dynamic lightmaps, static lightmaps, and render-to-texture soft shadows. And no, half-life 2 does NOT have per-pixel lighting, I am pretty sure, nor stencil shadows. I don't think you realize the crucial difference between render-to-texture shadows, shadowmaps/dynamic lightmaps/static lightmaps to stencil shadows and per-pixel lighting. A lot of next-generation games use stencil shadows and per-pixel lighting, the scary suspensful immersion factor is perfect for hl, and stencil shadows and per-pixel lighting would suite it well, although stencil shadows are rather limited, and they can reduce fill rate performance. If hl2 would have used stencil shadows, the edges would likely have to be straight. Why is this? Because soft stencil shadows would require 2.5 times the computational power. No computer on earth, overclocked or not, could render soft stencil shadows at more than 10fps. And imagine playing with per-pixel lighting/soft-stencil shadows in hl2, in the hl2 levels. No, i wouldn't think of even using soft stencil shadows of hl2, altho it's quite easy to implement the feature. All you have to do is extrude two volumes: one for the inside where the shadow is solid black, and one for the outside where the shadow fades to white. Between the two you interpolate from black at the edge of the inner volume to white at the edge of the outer volume. That simple, it's just too computational intensive. And you are right about the support of per-pixel lighting for dx7 hardware, the only difference between per-pixel lighting in dx8 hardware and up and dx7 hardware, is that you can customize your per-pixel lighting in dx8 hardware. Ok I'm done writing. ;)
 
Originally posted by Wester547
If hl2 would have used stencil shadows, the edges would likely have to be straight. Why is this? Because soft stencil shadows would require 2.5 times the computational power. No computer on earth, overclocked or not, could render soft stencil shadows at more than 10fps.


So you admit that stencil shadows are hard edged shadows.. yet in an earlier post your quite adamant that stencil shadows are, and I quote "stencil shadows are a rendering technique used to produce realistic looking shadows."

I would suggest you read up on lighting and shadowing in the environment. Hard edged shadows are very rare and not in any way realistic, they are not a common occurance in natural lighting and require specific lighting to get the shadow edges sharp, even in bright direct sunlight a shadow is never as sharp as those are. The only times you will find almost sharp shadows is at the closest point between the object casting the shadow and the shadow itself. Say for example a lamp post in the street in direct sunlight on a bright sunny day. The base of the shadow is much sharper than the rest of the shadow which blurs out eventually to nothing, the further the shadow is from the casting object (as mentioned below, Stalker does appear to attempt this, but its not quite successful)

I don't care how HL2 does its realtime shadows, their soft shadows and while still not realistic completely (being as their just a constant blurred shadow and doesn't spread depending on distance of object <-> cast shadow, they look a damn sight nicer than hard edged shadows

The static lighting in a regular HL map has plausable semi-realistic lighting and radiosity. And done well it can and as seen in the HL2 vids pass for almost realistic lighting. Now imagine if you stuck a load of hard edged clearly CG shadows all over the place, totally blowing away the otherwise great looking lighting and shadows by having these ugly shadows knocking about the place. Wouldn't look very nice now would it?

So really, whats the point of this thread, why should HL2 have ugly far from realistic shadows when its current method works just fine and looks great, it doesn't matter how their done, the fact is they look good and do their job and isn't that whats really important?

These hard edged realtime shadows are fine for Doom3 - only people with raisens in their brain case still expect Doom3 to look even remotely realistic. But HL2 is a different kettle of fish and is striving for realism as best it can be done currently in realtime, and if that means taking some shortcuts and cheats then so be it, it works and thats all that matters.

Another example of bad realtime shadows is Stalker, sure, it looks all purdy n stuff, but the character shadows look little more than serious sam ones, with a few changes attempting to mimic how real shadows are created, but they still appear to be hard edged and it just spoils things in general. They may be technically more realistic than HL2's. But visually they don't look as good as HL2's do.

If you still want your ugly hard edged shadows, go installed HL1 without any patches and switch on the realtime shadows and ask yourself honestly, do you really want those shadows back?, yeah pretty ugly weren't they, wonder why they removed it with later patches eh :)
 
Using static light maps for an object that will never ever move is smart, and lets off some load on the cpu. What point is there in making a indestructable, unmoveable, unalterable wall take advantage of real time shadow calculations as if it was going anywhere?

Using a mixture or dynamic projected shadow maps and pre-compiled static light maps makes for an extremly inconsistant environment. It is a lighter load on the cpu, but its by no means smarter. Weather or not the object will ever move is irrelevant, the point is that the surface should be lit in a consistant way. In the world, light affects ALL surfaces, not just the ones that move.

And while an object may be stationary, the light sources playing off that object may not be. Or new light sources may be introduced into the scene. When you have a normal mapped surface in a game like Doom3, everything from screw heads sticking out of the surface, to buttons, switches, dents, edges, all the detail in the surface itself will be affected by the light source and cast their own individual shadows. Thats whats so amazing about the new lighting systems in games like Doom3, because EVERYTHING is lit consistantly. In hl2 you will have major structures in a map like large pipes(which seem to be very common in hl2) or support beams that will not be affected by a dynamic light source. not matter what happens to the light source, the static shadows will remain the same. This is a thing of the past, fortunately.

Light determines how we see everything in this world, and having a more consistant lighting system(unified lighting system) is the single most important step we could possibly take in the progression of gaming graphics.
 
There IS a way to achieve shadows like soft stencil shadows without a huge performance hit. Self-shadowing and shadowmapping, but self-shadowing is not true shadowing that casts onto any surface, and is filled with many bugs(E.G, fuzzy animated edges), and is truly a hack, although is used in games such as splinter cell. Yet again, soft render-to-texture shadows look better because they use textures, stencil shadows dont, but if stencil shadows were to use soft edges, they would look just as good or better than render-to-texture soft shadows, combine that with real-world per-pixel lighting, and stencil shadows that properly diffuse, with per-pixel accurate dynamic light refraction, and improved ambient lighting, and more maybe, then you've got a PERFECT fully dynamic lighting and shadowing system. :)

PS. The shadows in the early versions of hl1 are not even in real time, they are projected solid transparent very buggy graphicially not looking right shadows that don't even cast onto walls, I'm happy they were removed in future patches, indeed very smart of Sierra. :)
 
it doesn't use per-pixel lighting? WTF ARE YOU SMOKING MAN?!?!?? thats whats called "bumpmaps" in the minds of normal peoples, if its the most adavanced, fully operational DX9 game to date, then why wouldn't it have per-pixel lighting?

Also, stencil shadows are very ugly, alot of the old games use them, the soft shadows, i would imagine, both save more resources and look better, so why not use them?
 
No, I'm not smoking. I mean per-pixel lighting in terms of using it with the lighting system. I think valve could implement self-shadowing into hl2 and repair as many bugs as possible to create more realistic shadows without such a huge performance it. And, oh yes, half-life 2 makes great use of specular highlights, per-pixel bump mapping, and more. What also concerns me i the hl2 marine AI. All they do is stand and shoot, they are soooo dumb, dumber than in hl1! What's the deal with that? But, the alien AI in hl2 is very smart and really impressive, no doubt! :)
 
Originally posted by Wester547
No, I'm not smoking. I mean per-pixel lighting in terms of using it with the lighting system. I think valve could implement self-shadowing into hl2 and repair as many bugs as possible to create more realistic shadows without such a huge performance it. And, oh yes, half-life 2 makes great use of specular highlights, per-pixel bump mapping, and more. What also concerns me i the hl2 marine AI. All they do is stand and shoot, they are soooo dumb, dumber than in hl1! What's the deal with that? But, the alien AI in hl2 is very smart and really impressive, no doubt! :)



per-pixel-lighting describes that the lighting is computed per pixel. nothing more nothing less. You seem not to understand the term at all.

..and yes hl2 does per-pixel-lighting whether you understand that or not.
 
Argh, do research on a topic before you post about it. It's obvious I think that you're gettin' yourself and everybody else confused.

*Walks away slowly*
 
Half-Life 2 DOES have per-pixel lighting, but only in a certain way, and not like games like doom 3 does. Yeah, I know what Per-Pixel Lighting is. Per-Pixel Lighting is a method allows you to create point lights, spot lights, and special effects lights that have full support for distance attenuation, bump mapping, specular lighting, gloss mapping, and shadowing. Half-Life 2 has a lot of that, so it does have per-pixel lighting, but not like Doom 3 does. :flame:
 
"Because I want to be like D3"...
Well, not really. :)
 
I'm sure that even if it's not in source now, VALVe or another company will add it later as an engine upgrade. If it matches what they want.

And Wester? The combine AI looks so crap in the demos because VALVe toned it down so that we could get a good look at the model graphics.
 
The combine AI looks so crap in the demos because VALVe toned it down so that we could get a good look at the model graphics.

Yea, they said something of the sort. but then, they also said that the combine kicking in the door wasnt scripted. believe whatever you want, but they didnt say it was toned down until people started complaining.
 
Originally posted by FictiousWill
I think max's shadow in MP2 is an example of one.
A little cut in:
MP2 uses render-to-texture shadows that are then blurred by a pixel shader and faded with distance from caster.
 
Originally posted by EvilEwok2.0
Yea, they said something of the sort. but then, they also said that the combine kicking in the door wasnt scripted. believe whatever you want, but they didnt say it was toned down until people started complaining.

that you take any infor taken from the alpha is foolish. and i remember hearing some pro commenting about this in a interview saying that they had to script it in order to have everything go exactly as they wanted it. and dont believe any hacker that says that that version was all they had. this is such a dam early version. it doesnt even has the tunnel map.
 
Originally posted by Fenric1138
The static lighting in a regular HL map has plausable semi-realistic lighting and radiosity. And done well it can and as seen in the HL2 vids pass for almost realistic lighting. Now imagine if you stuck a load of hard edged clearly CG shadows all over the place, totally blowing away the otherwise great looking lighting and shadows by having these ugly shadows knocking about the place. Wouldn't look very nice now would it?
IMO, the shadows in the Doom3 screenshots look better then the shadows in the HL2 screenshots. Sure, the Doom3 shadows are hard edged. But the HL2 shadows are just a blurred lightmap, often resulting in a really ugly staircasing effect.

The advantage of using dynamic shadows instead of static shadows for the environment becomes apparent when waving a flashlight around the scene.
 
Originally posted by Arno
The advantage of using dynamic shadows instead of static shadows for the environment becomes apparent when waving a flashlight around the scene.

That depends on who's waving the flashlight around, if its just the player and its pretty much static facing forward, the majority of objects that will cast the interesting shadows will also obscure them from your view. In a team game though I can see it being interesting as you'll get to experience it from other angles. Even so the shadows might be there dancing about but you might not always notice (too busy killing or something) and minus the shadows HL1 was ok with the flashlight thing, though I admit it was pretty basic in HL1. HL2 is likely going to have a more advanced version that wont have models lighting up like christmas trees. And nobody I guess really knows if the flashlight will or will not cast some kind of shadow itself, unless Valve/Gabe have said it wont then it may do, they've had a good while longer to include the feature if it didn't
 
Originally posted by Fenric1138
That depends on who's waving the flashlight around, if its just the player and its pretty much static facing forward, the majority of objects that will cast the interesting shadows will also obscure them from your view.
Apparently Id has thought about this as well. In Doom3 single player, an NPC will carry the flashlight for you.

I would like to add that the HL1 flashlight was pretty good for its time. It did the job quite well.
 
Originally posted by Arno
Apparently Id has thought about this as well. In Doom3 single player, an NPC will carry the flashlight for you.

I would like to add that the HL1 flashlight was pretty good for its time. It did the job quite well.

oh yeah I heard something about someone carrying the flashlight, I had thought it was just something in multiplayer, my bad. I guess it would be pretty cool then, especially if the NPC can become scared and panic, those people should never hold flashlights for obvious reasons.. but visually and for gameplay it could be great fun to have your flashlight buddy crap himself and run just as a big bad crawls out of the wall and comes towards you then whoosh Mr Flashlight runs away and your left in the dark haha ok so yeah I'll admit then that that could be great fun when played late at night in the dark

The one thing I didn't like about the HL flashlight is its issues with texture sizes, they'd effect how the flashlight appeared. It can be seen happening in that mod "the gate" on the side of a sarcophagus(sp?) the texture is scaled down and stretched, shining the flashlight on that it too is stretched and small. I hope thats been fixed in HL2.
 
In single player D3, at one point you will have to provide cover for a scientist who has a torch, but you will also have your own torch. Problem is, when you hold the torch, the only attack you have is to bash baddies over the head with it.
 
Originally posted by Brian Damage
In single player D3, at one point you will have to provide cover for a scientist who has a torch, but you will also have your own torch. Problem is, when you hold the torch, the only attack you have is to bash baddies over the head with it.

what next, Doom III having weapon carrying limits and other more plausable things, that just can't be true! :)


.. I never liked that about some games, the pull a weapon from your pocket syndrome. Carrying tons of weapons at once and it making no difference in any way. I could understand it in the old days with Wolfenstien and the original Doom, as things were new then. But now there's no excuse really for silly stuff like that

and please no jokes about carrying a rocket in your pocket lol ;)
 
Originally posted by dawdler
A little cut in:
MP2 uses render-to-texture shadows that are then blurred by a pixel shader and faded with distance from caster.

Very true. render-to-texture soft dx9 shadows blurred in pixel shader and faded with distance from caster, using shadowmaps and I think MP2 may use self-shadowing but I haven't played itmyself so.
 
Originally posted by Fenric1138
what next, Doom III having weapon carrying limits and other more plausable things, that just can't be true! :)


.. I never liked that about some games, the pull a weapon from your pocket syndrome. Carrying tons of weapons at once and it making no difference in any way. I could understand it in the old days with Wolfenstien and the original Doom, as things were new then. But now there's no excuse really for silly stuff like that

and please no jokes about carrying a rocket in your pocket lol ;)

Yeah, every time I play the original HL I keep getting this weird feeling that, towards the end, Gordon looks like a walking weapons junkheap.

:E
 
Why didn't valve design half-life 2 to have stencil shadows?

probably because they wanted HL2 to be playable in very low end cards.. something similar to Counterstrike ,that one part of its sucess is thanks to its low hardware requirements ,which means more people will be able to play the game.. means greater community. more support.. :cool:

but stencil shadows alone doesnt do the graphics in Doom3 ,its more..
1)its Unified lights/shadows/bumpmaps/specular real time system and -at all times- and in -REALTIME.- :cool:

many games used mostly (static an-dynamic) pre-computed
shadows/Lightmaps with workaround known as -hacks- for dynamics lights /specular and Bumpmaps..

look at what valve said..to an interviewer..

Hoaxer: What kind of shadows are used in Source engine - are they fully dynamic, or are they partially static lightmaps - do you use a combination of lightmaps and dynamic shadows?

Gabe Newell: We use a combination of dynamic and static lighting. Objects that move cast dynamic shadows whereas static objects cast, well, static shadows that are cheaper. On DX9 you get soft dynamic shadows as well. We also have a full radiosity solution for static bumped lighting (bump maps work with static lights). IF you were to put a static light next to a bump-mapped object, the light direction would be correct (traditionally light maps and bump maps have been mutually exclusive).


i have bolded or underlined the most interesting parts there..
Bumpmaps/speculars/normalsmpas heavily depends on realistic lights system (or at least one that is closer to real (eg.. Doom3/Stalker indoors) to look REalistic (nothing static),that why most screenhots released to date in Hl2 doesnt use any Bumpmaps at all.

pictures speak better than words.. here is an link with an article about Hl2..

http://www.city-17.net/art_sourceengine.php

WHile i dont agree with that site title ,in saying that Hl2 is not an advaced engine. (which is it ,at least with the use of some directx9 features ..like Ps2.0/vs2.0/HDR/physics and facial muscles system) it have excelent screenshots to show you in Graphics some of the diferences between an engine using lighting system similar to doom3 and other engines.


switch back and forth between these two screenshots...

Pic#1
quake1 - map without realtime lights/shadows/bumpmaps...no specularity but with "soft shadows".

http://www.city-17.net/images/before2.jpg

pic#2
same map but WITH realtime lights/shadows/bumpmaps/accurate speculars.. hard shadows

http://www.city-17.net/images/after2.jpg

now the question is.. DID YOU NOTICE A DIFERENCE? between both :cheese: how can that be ? is the same map ,SAME color textures /same Polygons .. the only diference is the realtime Lighting engine. :cheese:

if a realtime light engine can do that, with a so old game ,just imagine how much it can do with a High Polygon/texture quality engine..

now look if you look at the Hl2 pictures.. in that site like this

http://www.city-17.net/images/model.jpg

look the weapon here.. no real reflective lights/Bumps/speculars

http://www.city-17.net/images/hl2wgun.jpg

and now here.. look the relfections and the bumps
http://vann77.freewebpage.org/pictures/D3grenade_a.jpg

you will see the lack of reflective surfaces /specularity / and bumpmaps in the walls/surfaces and weapons.. similar to the first quake1 screenshot (flat surfaces/weapons/objects look).. the diference is that HL2 use VERY high quality textures and high polygons counts in all their scenes.. :cheers: but believeme that it will look more realistic with a realtime lighting engine similar to doom3 and Stalker indoors scenes.
if you still have doubts about the diferences with a realtime unified lighting system look again at the quake1 screenshots :)

i know Hl2 will be an amazing game ,with very High graphics and that what we see today is just the beguining of what if possible in the Hl2 SOurce engine,(same with other titles) but i think that with the help of faster hardware in 3-4 more years ,all developers and games will move to a more aggressive fully dynamic realtime lighting/shadowing system ,i think that in great part thanks to Doom3 (which was the first to demostrate this tech 2 years ago in the geforce3)and the success of many of the games that will be developed in that engine.
 
Yeah I have tenebrae for quake 1, it's very cool. It's a non-pro program tho and performs and is optimized quite poorly, although looks great thanks to the imported per-pixel lighting and stencil shadowing technology. :afro:
 
Back
Top