PDA

View Full Version : How does F.E.A.R. combine stencil shadows and lightmaps?



halo
05-11-2006, 10:06 AM
In the game F.E.A.R. static and dynamic lights cause models to cast stencil shadows. Lightmaps are used on the solid brush objects like walls, floors, etc.

The shadows do not pass through the walls, and cause none of the visual glitches you normally would see with single-pass stencil shadows. How does the F.E.A.R. engine manage to clip the stencil shadows like this?

ZbuffeR
05-11-2006, 10:23 AM
Please please, listen to what people said in your previous topic, especially last Korval post.
http://www.opengl.org/discussion_boards/ubb/ultimatebb.php?ubb=get_topic;f=3;t=014470;p=1#0000 07

And delete you huge, ugly, picture. Or a least crop it and draw a red circle around your pretended stencil shadows.

halo
05-11-2006, 10:33 AM
I understand how Doom 3 works. I have already set up a system like it, and current hardware can't run what I want it to. You don't need to keep reciting the same answer back to me that you learned in your computer graphics class.

FEAR has a method to limit its stencil shadows. I don't think they are doing multiple passes the way Doom does.

I could do CSG clipping, and use "carve" operations to split the shadow volume up into renderable pieces, cut out around the walls it intersects, to make completely accurate volumes. That would work well for static shadows, but it would not be a trivial undertaking.

Humus
05-11-2006, 01:53 PM
To combine lightmapping and stencil shadows you don't need to do anything in particular. The lightmap goes into your regular lighting shader, and that's about it. You'll still need multiple passes though for the stencil shadow. There's no way around that. And forget about CSG and carving, that's not neccesary if you do it right to begin with.

Korval
05-11-2006, 09:04 PM
You don't need to keep reciting the same answer back to me that you learned in your computer graphics class.Wait, who's asking who for the favor here?

At least 3 people have told you how to solve the problem you're having. If you don't want to listen, that's your perogative, but insulting us is certainly not going to be helpful for getting your problem solved.


FEAR has a method to limit its stencil shadows. I don't think they are doing multiple passes the way Doom does.Stencil shadowing is stencil shadowing. Multipassing is required or else it doesn't work. It's that simple.

Limitting the shadow volume is as simple as not projecting it infinately. Just don't stretch it out that far.

But first, fix your stencil algorithm so that it actually works and computes the light value correctly via multipass. Then you can work on tricks like not projecting infinitely.

tfpsly
05-12-2006, 09:53 AM
Originally posted by halo:
I understand how Doom 3 works. I have already set up a system like it, and current hardware can't run what I want it to. You don't need to keep reciting the same answer back to me that you learned in your computer graphics class.

FEAR has a method to limit its stencil shadows. I don't think they are doing multiple passes the way Doom does.You do not even know the basis about stencil shadows nor shadow mapping, and you insult people and you keep being arrogant ? You are the one who should read some shadow documentations.

And Doom 3 and Fear basically work in the exact same way (with a different number of shadows).

halo
05-14-2006, 12:12 AM
I make money every day by proving people wrong.

jide
05-14-2006, 02:05 AM
Maybe but I guess you went on the wrong way here.

I know I sometimes put my war machine out of my museeum but it is not to make war on people who helped or tried to help me. I will NEVER do that man.