Were stencil shadows a fad?

Miscellaneous Forums/General Discussion/Were stencil shadows a fad?

I don't really see stencil shadows being used in the new engines coming up lately. Were the jagged shadows of Doom 3 and FEAR a temporary fad? Discuss.

Personally, I thought they looked awful. Sharp shadows and soft lightmaps don't mix...

Depends, have said new engines found a better/faster means of doing what they could before with stencil shadows?

I can still see stencils being used as of these days, I mean, it dates back to DX7 cards no? Not a bad means of graphical fallback for older video cards if your company has the time to support said older cards.

I always prefer soft shadows over stencil because I think infinitely sharp shadows look just plain fake. Also, stencil shadows can really slow a game down (even on high-end machines), but smoothed texture shadows are usually fairly fast.

I think many new engines are abandoning traditional stencil shadows simply because there are so many better (faster, more realistic) shadow techniques now.

In most environments a lightmap and a simple soft shadow actually looks 10 times more realistic than stencil shadows. And its 10 times faster. Not that 10 is accurate.

I normally don't mind which type of shadow it is. For RTS and similar even simple projected bitmap shadows work quite good.

But I would prefer if they replaced "use less stencil" with "use less bloom" ... as annoying some things might be, the worst thing is bloom ...

NVidia even opted the 7 GT series to perform MADD, blooms main operation, even faster ...

just depends, stencil shadows are slow in blitz3D but they can be fast. Any kind of dynamic shadow is cool, even if it doesn't always look entirely realistic. And realism isn't as important as look and feel, and setting the right atmos and mood.

You think Doom 3's shadows were bad? They've got nothing on Company of Heroes'!

Those things are blocky at any setting except the highest setting, and they slaughter the frame rate anyway.
The game almost always looks better without shadows.

Didn't someone patent the technique Carmack invented or something? Anyway, I don't personally care. If someone balances the aethetics of a game properly something as cool and dynamic as stencil shadows isn't a must.

do we have a fast smoothed texture shadows code for blitz3d? i am currently thinking of integrating a shadowroutine into my game - thought of stencils first... but now with this thread, i am thinking to include another..or not. dammed i don't know. are stencils SO bad??

I thought Doom 3 WAS a shadow technique!!?

Stencils = bad. CSM etc = good (not perfect, but better).

Didn't someone patent the technique Carmack invented or something?
Creative patented "Carmack's Reverse". He didn't really invent it, but figured out that if you where generating your shadow volumes backwards, you got a more realistic result. Read more.

But to answer the original question, I don't think it's fair to call stencil buffer shadows a "fad". Certainly not by my definition of the word.

Cascaded Shadow Maps on the3 other hand, now there's a fad... :o>

How the hell can creative patent it when everyone knows carmack worked it out?

Because Creative patented it before Carmack did his work.

I'm saying it's a fad because they were very cool at first, but quickly became a dead end, because the computing needs are too much in anything bigger than a hallway or a couple of rooms.

Quake Wars might change that, but regardless, I don't really see any other companies pursuing the technique for new engines.

The only time I don't mind stencil shadows is when the game style is generally sharp lines (ie. toon rendered etc), and even then not really necessary and a subjective aesthetic decision.

And, yes, I think they were an experimental fad. After all, shadows aren't sharp. Stencils really are the poor ugly cousin.

thats simply not true, we have had 60,000 poly scene casting shadows from a single animated light source including vehicles and projectiles on pretty old hardware when we first started dabbling with Ogre3D. Amazingly it didn't run too badly on my athlon 1200 Geforce 3.

There's quite an interesting thread about shadow techniques on the forums over there.

http://www.ogre3d.org/phpBB2/viewtopic.php?t=25873&highlight=lispsm

They're slow and not particularly pretty, but they're a margin easier to implement than shadowmapping. You can get a bit more speed out of them if you don't optimize them properly, and just live with those nasty little glitches you see on a lot of stencil shadow implementations, but not everyone wants that, do they?

> and just live with those nasty little glitches you see on a lot of stencil shadow implementations, but not everyone wants that, do they

I'd rather have no shadows then some of those glitches.

Thats simply not true, we have had 60,000 poly scene casting shadows from a single animated light source including vehicles and projectiles on pretty old hardware when we first started dabbling with Ogre3D. Amazingly it didn't run too badly on my athlon 1200 Geforce 3.

Yes, but nearly 100% of your computational power is being spent on shadows. In a lightmapped engine, almost 0% of the computational time is spent on lighting.

No, they were not fads - I think we will see them in major upcoming game engines. Expect to see multiple shadow solutions with stencil tucked away in there.

This post may be used in the future to prove I was wrong. However, it will stand as a monument of my dominant knowledge.

Didn't the Max3D demo use stencil shadows?

*can of worms* *pop*

No "next-gen" games use stencil shadowing anymore. It's all dynamic soft-shadowing nowadays ;)

I think not - my dominance is dripping from this thread.

I further state - MULTIPLE (more than one) upcoming AAA 3D game engines will incorporate stencil shadows.

I own.

Didn't the Max3D demo use stencil shadows?
Some kind of stencil volume effect, yep. That was before Mark's "major rethink" though, so who knows?

Well, mmm, I'm changing my stance - it could technically be a fad - as this was the original question. However, some of the upcoming engines will still support them. The licensing of any of those engines will basically show whether they are used or not - we are talking a solution here, a method - those engines will incorporate more than one.

you just have to use the technology that suits your situation. All effects are costly and when you start using modern tech you have to balance between the CPU and GPU.

I don't think that stencils are a fad at all, prioritize and use whatever makes the best use of spare resources.

I think both techniques have their advantages and disadvantages, so it's likely both will be used for a while yet depending on the situation.

Stencil shadows:

+ Mathematically robust - you don't have to worry too much about where things are relative to each other (ie: light/caster/receiver) - they'll just work.

+ Relatively efficient. Oddly, my experiments indicated CPU generated shadow volumes were faster than GPU generated ones, probably because GPU ones require models to include a 'dummy' poly-per-edge, which may or may not be extruded by the shader.

- Sharp edges. This is mathematically correct for point light sources, but doesn't look too good generally. Doom3's engine made this problem somewhat worse that in had to be, in that it 'masked out' shadow areas instead of accumulating light in non-shadow areas - ie: there was only one possible shadow color (black!). Using a system that accumulates light instead looks quite a bit better.

- Some preprocessing may be required. Well, this depends. Doom3 style masked shadows really require shadow volumes to extend to infinite, so for a busy scene it may be necessary to cull static 'shadows within shadows'. However, additive shadows only require volumes to extend as far as the light bounds, so it may not be worth such culling.

Shadow maps:

+ Can be easy to implement, although there are a lot of ways of doing them, some harder than others with (arguably) better results.

+ Can be used to produce soft shadows, although this is harder to do right than people make out. Often, shadowmaps will produce a 'blurred result' regardless of what you do due to mismatch in screen/texture/projection resolutions which can look OK.

+ Pretty efficient, although a point light requires 6 separate render-to-cube-texture passes. This can cause serious rendering stalls, although probably not so much on modern cards.

- Shadow quality is very sensitive to relative position of light/caster/receiver. Although there are a plethora of methods to minimize this problem, it can still be pretty easy to get the camera into a position where they look terrible regardless of what method is used.

- Large shadow maps can consume lots of vidmem.

Basically, shadows is still a 'very hard problem'. Most next-gen games I've seen use a combination of techniques and I don't expect this to change for a while.

What mark said but I got an addition to his point

- Large shadow maps can consume lots of vidmem.

This might be a bit misunderstandable: The sharper (i.e. less blocky) you want the shadows to be the higher the resolution of your shadow map must be. So you can either use dynamically sized shadow maps but the problem here is that in very large scenes they might get too big in size and your game will slow down due to the shadow map must be shift in the RAM or even on the hard disk. The other way is to use a fixed sized shadow map (Guild Wars for example does this). But if you got a large scene to render the shadows will get very blocky (this effect can be seen in Guild Wars, too; you're in one area and the shadows look fine, you then change to the next area and the shadows will become blocky because the area is much bigger than the area before.