Doom3 & CryEngine 2 question...

slapnutz

Regular
Can someone explain to me in kinda simple terms why the Shadows in Doom3 engine games (and FEAR..etc..) are sharp/harsh whereas footage from Crysis shows more realistic soft shadows?

Is it the way the engines project them, per pixel lighting, dmap or shadow map resolution or filter size, better lighting system.....or is it simply that Crysis is a newer game and thus they can crank up the detail since "base pc/lowest common denominator specs" are higher these days?

(but i guess if the latter was the case then Prey's shadow details should be at least similar to Crysis?)

Lastly.. please for the love of everything thats holy in the universe...DO NOT.. turn this into a "my engine can kick your engines butt" thread.

Cheers fellas.
 
Simply put, given that's what you did ask, Doom 3 uses Volumetric Shadows while the new Crytek's Engine uses Shadow Maps.

The difference resides in the fact that Volumetric Shadow are actual geometry (Polygons), while Shadow Maps are textures and as such the developers can do different texture operations on the SM to obtain a more realistic 'Soft' look.
On the other hand there's very little to do with Volumetric Shadows, other than some silhouette jittering and the like, to give them a somewhat soft look in Real Time (Of course if you give it enough samples, you can obtain a great result, but it's too much of a Vertex "brute force" approach).
 
Vysez said:
Simply put, given that's what you did ask, Doom 3 uses Volumetric Shadows while the new Crytek's Engine uses Shadow Maps.

The difference resides in the fact that Volumetric Shadow are actual geometry (Polygons), while Shadow Maps are textures and as such the developers can do different texture operations on the SM to obtain a more realistic 'Soft' look.
On the other hand there's very little to do with Volumetric Shadows, other than some silhouette jittering and the like, to give them a somewhat soft look in Real Time (Of course if you give it enough samples, you can obtain a great result, but it's too much of a Vertex "brute force" approach).

So since Vloumetric Shadow uses geometry, does it mean its method is closer to how shadows OUTLINES are generated in real-life? ..and its accuracy is limited by the geometry is given to start with?
 
Stencil shadowing, as implemented by the Doom 3 renderer, doesn't accurately simulate real-world shadow 'outlines' at all. And not least with respect to umbra/penumbra boundaries, and it's not all down to geometry complexity either.

Just take a look at the world around you. Actually, do the Doom 3 thing and stand in a dark room with a torch, and move it around, and see with your own eyes how bad it is.
 
As Rys pointed out already, Volumetric Shadow aren't anywhere realistic, for the reason that they're created (extruded would be the correct term in this case) from a "light source" (a point actually, point that can share the same coordinates with the light source) that is nothing but a point.

Obviously, in real life, there's no such thing as a light source that is a "point" (in the mathematical, intangible, sense of the term), light sources in real life are comprised of a multitude of "light points", that creates the effect known as penumbra.

The easiest way to recreate this in Real Time rendering is by using texturing tricks.

And since a picture worth a thousand words:
penumbra.gif


Rys said:
Just take a look at the world around you. Actually, do the Doom 3 thing and stand in a dark room with a torch, and move it around, and see with your own eyes how bad it is.
Yeah, the real world is really bad looking.
 
Geometry-based shadows have quite a lot of problems... they were a neat toy, but it would seem that shadow maps have surpassed them now.

Two things I've not seen mentioned yet:

1. Shadow volume extrusion is either very difficult or impossible to get correct for non-closed geometric shapes. Thus you have restrictions on what models/objects you can actually cast shadows from (luckily for games, this isn't too big a problem). Shadow maps are image-space and don't have this problem.

2. Stencil shadows define a typical binary "in"/"out" result for shadows (another reason for the sharp edges). Go out into the "real world" and observe the shadow cast by a window (especially a stained-glass window). Stencil shadows typically can't handle this whereas shadow maps can (they can store a shadow colour when projecting on the scene) - I'm not 100% sure, but there are still some limitations here (e.g. casting through/from multiple semi-transparent objects).


Having said all that, whilst stencil shadows might not be so good on the quality front they are easier to get a robust solution from. There are primarily two types of stencils shadows - "Z Pass" and "Z Fail" whereas I've lost count of how many millions of shadow mapping algorithms exist. As I see it, one of the primary reasons for that is due to pretty much every SM algorithm having at least some general-purpose/robustness problem - fringe conditions where it all goes wrong (etc..)

hth
Jack
 
I have a question. With DX10 having a geometry "pipe" per se will it become possible to now do geometric shadows with textures applied to give a more realistic shadow with a soft look to boot?
 
it's fairly easy to spot SM in today's games : look for the ugly pixellated shadows :)

a good read is Carmack's quakecon speech transcript (2004 or 2005, I don't know. they're both here on B3D forum). hard to understand what he says but he explained all the hacks he does on the engine he's developing, to correct the generality problems and stuff, also multiple samples are taken (4 or 16, the latter being very hungry.)
 
Yes, two different techniques with different plus and minus points.

Stencil shadows work well for point lights but poorly for lights that have a real area (fluorescent tubes, for example) and the both the geometry complexity and stencil volume fillrate requirements can be expensive (overdraws of 50+ are frequent). However, they are a fairly simple and robust technique that's hard to break.

Shadow maps require a full extra rendering pass for each light at quite high resolution, tend to handle self-shadowing poorly, tend to pixellate and don't work well for point lights or sunlight. They are also more complex and hard to make completely robust - often you'll see bits of shadows where they shouldn't be. There's also a lot more variety - dozens of ways of doing them.
 
Headstone said:
I have a question. With DX10 having a geometry "pipe" per se will it become possible to now do geometric shadows with textures applied to give a more realistic shadow with a soft look to boot?
I doubt you'll get much overall improvement on geometric shadows via the GS unit. You can, however, optimize existing stencil-shadow algorithms (see the DXSDK - theres a GS/GPU based sample showing exactly this!).

I think that shadow-rendering has been very susceptible to fasion trends (for lack of a better term). Stencil shadows pretty much killed off ATI's TruForm and other HOS techniques as far as I could tell. Now its shadow mapping thats cool - look at the last few major conferences, theres easily 10x as many SM papers than stencil...

With SM4 I can only see more work being done on shadow maps - I forget the details now, but theres a built in comparison sampler feature... hmm, API dictated PCF rather than the obscure mess of ATI/Nvidia forms...

Jack
 
Vysez said:
Obviously, in real life, there's no such thing as a light source that is a "point" (in the mathematical, intangible, sense of the term), light sources in real life are comprised of a multitude of "light points", that creates the effect known as penumbra.
The Sun gets pretty darned close to it, though. Shadows cast by the sun on flat surfaces on a clear day have very small penumbras.

Unfortunately, I think we're still a little ways away from a truly good rendering of penumbras. It seems like a lot of games just use a rough, general scheme for smoothing shadow maps, without any regard to the light source or the lighting conditions.
 
Chalnoth said:
It seems like a lot of games just use a rough, general scheme for smoothing shadow maps, without any regard to the light source or the lighting conditions.
Are you about to get your high-school geometry set out mid fire-fight and measure the (pen)umbra of the shadows a game generates? :oops:

With games its fairly accepted (at least within the industry, maybe the players are more picky) that you can quite happily get it looking "okay" without worrying about making it mathematically/scientifically correct. Call it "artistic licence" ;)

Jack
 
Why can't hardware be built to do ray tracing and we can solve the problem of shadows forever?

Chalnoth said:
The Sun gets pretty darned close to it, though. Shadows cast by the sun on flat surfaces on a clear day have very small penumbras.

Unfortunately, I think we're still a little ways away from a truly good rendering of penumbras. It seems like a lot of games just use a rough, general scheme for smoothing shadow maps, without any regard to the light source or the lighting conditions.
 
Using RayTracing to generate the shadows with correct penumbras for volume and area light sources is horredously expensive.

Good approximations using shadow maps are likely going to be the best solution for a long time to come yet.
 
JHoxley said:
Are you about to get your high-school geometry set out mid fire-fight and measure the (pen)umbra of the shadows a game generates? :oops:
Obviously not. I'm just talking about very simple things, like a player casting a relatively long shadow: there should be no penumbra at the feet, and a relatively large penumbra at the shadow's head.
 
Colourless said:
Using RayTracing to generate the shadows with correct penumbras for volume and area light sources is horredously expensive.

Good approximations using shadow maps are likely going to be the best solution for a long time to come yet.
I would definitely tend to agree. I mean, there have been rumblings about ray tracing possibly being one of the ways that realtime graphics may move in the future, and once you take that step, things like area lights and whatnot are tremendously easy (the difficult things are things like secondary reflections off of bumpy surfaces). But at least for now, the computational power isn't even close to get a real-time raytracer to approach the quality of rasterization.

Edit: Oh, bonehead thought in the above post. Of course area lights are going to require more computational power than point lights when raytracing. Nevermind on that part.
 
Chalnoth said:
But at least for now, the computational power isn't even close to get a real-time raytracer to approach the quality of rasterization.
Theoretically, how much power would be needed for say an exclusively indoors first-person-shooter game?
 
Parousia said:
Theoretically, how much power would be needed for say an exclusively indoors first-person-shooter game?
You're close to invoking B3D's "Reyes Law" with that question :)lol:) Ask not about true raytracing, but accelerating RenderMan on the GPU instead!
 
Parousia said:
Theoretically, how much power would be needed for say an exclusively indoors first-person-shooter game?
The problem is that raytracing is always more computationally expensive than "faking it" with other techniques. This is where the skill of the animator/programmer comes in, by making things look realistic using faster techniques than mathematically calculating every ray of light in a frame (and all of it's reflections).

Sure, as GPU's and CPUs get more powerful there is an opportunity to consider raytracing, but games also get more complicated, and that extra CPU/GPU power is used for more AI, polygons, physics, textures, shaders, etc. We are once again left with using clever tricks to get things drawn quickly and save most of that new power for other, newer graphical aspects of the game, rather than eating it all up (and more at the moment) on raytracing.
 
Last edited by a moderator:
Back
Top