1 registered members (TipmyPip),
18,449
guests, and 6
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: fasterStencil plugin
[Re: MarcoGS]
#215988
07/14/08 13:45
07/14/08 13:45
|
Joined: Mar 2006
Posts: 2,758 Antwerp,Belgium
frazzle
Expert
|
Expert
Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
|
Great work indeed, the fps improvement is a nice plus point Stencil shadow volumes most have a preformance lack due to heavy silhouette computation and a costly invisible fillrate due to the technique of z-pass/z-fail. Most of the time, this can be solved by using a a low-polygon model of the occluder to compute the shadow volume. An even better methode is to use welded meshes. Since the structure of a vertex within D3D is not just the position but also color and normal information. E.g. you would assume that a cube exist out of 8 vertices but due to the algorithm of D3D, the 8 is turned into 24 For low poly models, this is still acceptable but for high end models, you can say: "Houston, we have a problem" ^^ I guess you made advantage of this technique which is a smart thing to do when comparing the framerates. About the artifacts, my idea to this is that you use conditional branching to perform the entire operation. Thanks in progress Frazzle
Antec® Case Intel® X58 Chipset Intel® i7 975 Quad Core 8 GB RAM DDR3 SSD OCZ®-VERTEX2 3.5 x4 ; HD 600 GB NVIDIA® GeForce GTX 295 Memory 1795GB
|
|
|
Re: fasterStencil plugin
[Re: MarcoGS]
#216144
07/15/08 12:23
07/15/08 12:23
|
Joined: Sep 2006
Posts: 99 BS, Germany
Storm_Mortis
Junior Member
|
Junior Member
Joined: Sep 2006
Posts: 99
BS, Germany
|
Wooha, very well done so far! Good shadows are really importent to improve a Games atmostpere^^ I was wondering ... why are the "inner shadow borders" this blocky? is it a big deal to get them soft like in Doom3?  Anyway, looking forward to use our work 
it found a voice ... now it needs a body
|
|
|
Re: fasterStencil plugin
[Re: Storm_Mortis]
#216157
07/15/08 13:24
07/15/08 13:24
|
Joined: Apr 2007
Posts: 582 Germany
Poison
User
|
User
Joined: Apr 2007
Posts: 582
Germany
|
you have to use a shader which blurs the stencil shadows and this is how they made it in doom 3^^.
Everything is possible, just Do it!
|
|
|
Re: fasterStencil plugin
[Re: ventilator]
#216162
07/15/08 14:01
07/15/08 14:01
|
Joined: Apr 2005
Posts: 3,815 Finland
Inestical
Rabbit Developer
|
Rabbit Developer
Joined: Apr 2005
Posts: 3,815
Finland
|
Shadow mapping is actually the way to go yes. Also it's easy to implement, if you know anything about depthmaps and projective texturing.
Also shadowmaps allow you to do screenspace blur, that makes the shadow looks smooth and with some additional parameters, add penumbra to the already existing umbra.
"Yesterday was once today's tomorrow."
|
|
|
Re: fasterStencil plugin
[Re: Inestical]
#216167
07/15/08 14:33
07/15/08 14:33
|
Joined: Sep 2002
Posts: 1,604 Deutschland
ChrisB
OP
Serious User
|
OP
Serious User
Joined: Sep 2002
Posts: 1,604
Deutschland
|
Yes ventilator is right, you have to multiply the shadow with the diffuse and specular lighting, and not to the final image as 3dgs does (though this is the fastet method, for better shadows you need the render the scene again (if you render the scene already twice, for example for a depth map, there will be no slowdown)). You can also screenspace blur the stencil shadows, and there are algorithmen for correct penumbra softshadows. For larges scenes only lit by the sun, i would definitly prefer shadowmapping. But for indoor scenes with more than 1 pointlights stencil shadows are still better, especially if only your actor and enemys need dynamic shadows. Also point lights, area lights, tube lights etc are easier to do with volume shadows then with shadowmapping. So i think stencil shadows are still suitable for some applications.
Btw, i would'nt say that shadowmapping is easier then stencil shadows, especially if you need to implement algorithm to enhance the quality of the shadowmaps like psm, lispm,tsm, pssm etc, you need strong mathematical skills to understand these thinks.
|
|
|
Re: fasterStencil plugin
[Re: ChrisB]
#216273
07/16/08 09:09
07/16/08 09:09
|
Joined: Mar 2006
Posts: 2,758 Antwerp,Belgium
frazzle
Expert
|
Expert
Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
|
Shadow maps are indeed hard to figure out at the start. The biggest disadvantage of the methode behind shadow maps (SM) is that it's not easy to implant on pre-DX9 graphics hardware. Thus this would cause performance/quality problems on old hardware which means that other shadowing technique must be used there. A great plus point of SM is that it can be used in combo with very high tessellated models. In comparison towards stencil shadows (volume dependent), using high tessellated models would lead into performance problems. Though, it is known that shadow volumes run better on older DX version which might sound strange at first  Not to mention the perfectly sharp shadows (without any flickering, Moiré-like effects and aliasing) which is a pain in the as* when doing SM ^^. Off course, PCF in combo with with ABF should cover up most of the artifacts for SM. It's just a matter of choosing the right methode for the right situation like ChrisB mentioned  Cheers Frazzle
Antec® Case Intel® X58 Chipset Intel® i7 975 Quad Core 8 GB RAM DDR3 SSD OCZ®-VERTEX2 3.5 x4 ; HD 600 GB NVIDIA® GeForce GTX 295 Memory 1795GB
|
|
|
|