*renamed* Lighting and shadows in games

What I'm really waiting for from 360 devs is the use of dynamic branching to jack up the sample count at shadow edges. The most robust way to do this is to use variance shadow mapping to identify the areas that may not be entirely shadowed or unshadowed.

I saw a paper on that, looked quite nice, but their shadowing cost doubled. Not sure it's really worth it if it's that expensive.
 
I've pruned out the post with an excess of attitude. For those having trouble following the topic in this Technical Forum thread, the question arose as to whether RFoM2 would have self-shadowing, following which was presented the opinion that many games do and it can be expected to feature in RFoM2 as it's not a super-duper secret technology.

Those wanting to present a case that self-shadowing is common would do well to list titles that showcase it, as references points, instead of relying on the poignant but overused argument of 'look, you dumb schmuck, I know what I see and I say it's true so there!' Likewise those who think self-shadowing is a rarity can call up a choice selection of games and screnshots as reference points.

This is the internet. We have the entire culmination of human knowledge at our fingers. We have a bevy of audio-visual just a Google away. Anyone presenting an argument in the technology forum should have the smarts to be able to find and link in pictures or movies that support their viewpoint. If not, you don't belong here.
 
1) those are stencil shadows (which is a technique no one almost uses anymore), not shadow maps
2) they should have worried more about indirect lighting IMHO..those black shadows are fugly.

Is it possible to use a stencil shadow with a transparency such that the fugly black shadows can be avoided? This would make really clean looking shadows.
 
Okay to finish this argument in a mature way.

Self shadowing is any rendering technique that allows for non-static objects to cast shadows on themselves, each other and on the environment. In simple terms: It means that objects that are moving (characters, cars, whatever) (not necessarily all objects) casts shadows onto themselves and on to the environment (ground\walls whatever).

It does not mean that absolutely all objects in the game has to cast shadows, it can be used to some extent or another (like all npcs, but grass or the closest 10 npcs, or whatever). The "self-shadowing" effect can be achieved in several ways, the most common way being dept shadow mapping and stencil shadows.

Console owners have enjoyed games with selfshadowing even on the Ps2, with NBA 2005 and God of War 2, and on the xbox 1 as early as in 2002 with X-Games Snowboarding 2002. PC gamers have enjoyed this for probably even longer, but i cannot be arsed to google it, any big new PC shooter has self shadowing by now (Stalker, Crysis, FEAR, Rise and Fall Civilization at war (RTS) , +++). On the X360 the list of games with self shadowing is long, some of them being CoD3,CoD4,GTA4,Halo 3, Splinter Cell:Double Agent, Mass Effect, (even the original splinter cell had self shadowing for the main guy), Fifa 08, Quake 4, GRID, DIRT, Gears of War, all UE3 titles that i have played ) i could go on but i think ive made my point.

If you still disagree, then what about this:

Console developers has made games with self shadowing, on the original Xbox back in 2002, and on the Playstation 2 in 2005. I think its pretty self explainatory that today, with the x360 and the PS3 being ATLEAST 5x more powerful in any aspect, that producing selfshadowing is not exactly a hard feat.


Self-shadowing, no matter how badly or cheaply or easly its done, no matter if its stencil shadows or shadow maps (just achieving something you could call self-shadowing) is not particularly hard to do (it may be expensive for performance, but if one of your goals is self-shadowing on all NPCs for example, its a feat thats easy to achieve with todays consoles (ofc, it may mean you have to cut back on something else, thats besides the point)and is pretty common in games today.

I dont have to time to gooling up all kinds of gameplay clips to prove this point any further, im sure if your still interested you can google up the titles i mentioned and check for yourself.
 
Last edited by a moderator:
Is it possible to use a stencil shadow with a transparency such that the fugly black shadows can be avoided? This would make really clean looking shadows.
Sure, but stencil shadows have drawbacks. They have unpredictable cost, don't work with alpha textures, are extremely costly to soften, and need low-poly geometry to be doable.

A jungle scene, for example, would be ridiculously slow with stencil shadows.
 
Console developers have made games with self shadowing, on the original Xbox back in 2002, and on the Playstation 2 in 2005. I think its pretty self explanatory that today, with the x360 and the PS3 being AT LEAST 5x more powerful in any aspect, that producing selfshadowing is not exactly a hard feat.
You'd think so, but a lot of games don't do it. Luckily, the big-name AAA titles do it, and it helps wonderfully with the immersion, especially coupled with HDR lighting (Bioshock).

I agree with you that it should be done... I find myself disappointed in games that don't feature it, and give a sigh of satisfaction when they do.

I've been doing CGI work for years, and it's turned me into a bit of a graphics whore. These days, though, I'm getting more and more impressed with game graphics that start to approach the level of lighting that I put into my CG stuff. Hence my infatuation with Crysis, I suppose. Dynamic HDR lighting, real-time ambient occlusion, etc.
 
I agree with you that it should be done... I find myself disappointed in games that don't feature it, and give a sigh of satisfaction when they do.
I find it more disapointing to have badly done self shadowing than artifact free drop down shadows.
In many cases self shadows have ruined otherwise nice presentation.
 
Doubled compared to what? It would be much cheaper than doing the same number of samples on the whole screen.

Hmmm, had a look back and I think I was mixing ASM and VSM. It's ASM which takes about double the time per frame to compute because of generating/navigating the hierarchy, compared to a standard shadow map using the same amount of memory, but obviously the results are much improved due to the effective shadow map resolution being so much larger.

VSM is the one which suffers from bleeding in some cases, IIRC.
 
Hmmm, had a look back and I think I was mixing ASM and VSM
Yeah, that's not really a technique you can do on a GPU. The 2x cost is only for offline CPU rendering. GPUs draw regular shadow maps much faster.

VSM is the one which suffers from bleeding in some cases, IIRC.
Yup, but I'm not suggesting using VSM for the actual shadowing. It simply lets you know when you need multiple samples.

Take a standard shadow map and make a reduced size VSM. When rendering the scene, first sample from the latter, and if the variance is high enough to give uncertainty of whether a pixel is shadowed or not, take multiple samples from the original shadow map and do PCF.

This uses dynamic branching to vastly reduce the workload of robust, alias-free shadows. NVidia had a NV40 PS 3.0 demo way back that did something similar, but it didn't use VSM, so you could get flickering because the condition for switching to higher sample count was very simple. Also, the DB was so slow that for real scenes it probably didn't give much perf benefit, especially in terms of min. framerate.

Another option is dual-exponential VSM, but that gets costly in terms of memory and shader cost (four FP32 values per shadow map texel, no hardware filtering on consoles).

EDIT: Hmm, this line of discussion should really be in the lighting thread. What do you think, mods?
 
Yup, but I'm not suggesting using VSM for the actual shadowing. It simply lets you know when you need multiple samples.

Take a standard shadow map and make a reduced size VSM. When rendering the scene, first sample from the latter, and if the variance is high enough to give uncertainty of whether a pixel is shadowed or not, take multiple samples from the original shadow map and do PCF.

You pull the same trick, but faster and with less memory -> use ESM! :)

Just use PCF if occlusion term > 1 ;-)
 
You pull the same trick, but faster and with less memory -> use ESM! :)

Just use PCF if occlusion term > 1 ;-)
Hmm, I'm not convinced. ESM often gives incorrect results even when occlusion term < 1.

No matter what values you get from the ESM and receiver depth, there's no guarantee about the percent of the filter kernel that is shadowed/unshadowed. VSM, however, has Chebyshev's inequality to put bounds on that and guarantee identical results to regular PCF while saving a lot of work.

Anyway, I think a reduced resolution VSM - maybe even 1/16th res of the original shadow map - will keep speed and memory cost to almost negligible levels.
 
Mintmaster said:
Sure, but stencil shadows have drawbacks. They have unpredictable cost, don't work with alpha textures, are extremely costly to soften, and need low-poly geometry to be doable.
I agree, and the drawbacks just make it a very poor generalized solution.
But the low-poly requirement is a fault of current gen hardware, not volume algorithm itself :p Last gen it was perfectly viable to use it in highpoly situations (relative to last gen of course), but then this is kinda like how local-lighting was more viable(and more common) in highpoly situations in PS1 gen then the PS2 one.
 
Any thoughts about lighting in Mirror's Edge ?

The lighting atmosphere in game is splendid.

I wonder about how DICE work for their latest project.:) Really impressive.
 
Any thoughts about lighting in Mirror's Edge ?

The lighting atmosphere in game is splendid.

I wonder about how DICE work for their latest project.:) Really impressive.

Pre computed GI solution, baked with Illuminate lab' Turtle.Basicaly ,it could be completely static lighting.
 
Only during cut-scenes with relatively limited numbers of characters on-screen (e.g. close-ups of a talking person)

I think you're wrong on that one I just started ninja gaiden II to be sure before I post, self shadowing in-game is not easy to see but if you look for it carefuly enough it's there I can't post my own pic to show it but I'll look for something.
 
Back
Top