Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,449 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
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 Offline
Expert
frazzle  Offline
Expert

Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
Great work indeed, the fps improvement is a nice plus point smile smile

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 wink wink
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: frazzle] #216070
07/14/08 23:15
07/14/08 23:15
Joined: Jul 2003
Posts: 893
Melbourne, Australia
Matt_Coles Offline

User
Matt_Coles  Offline

User

Joined: Jul 2003
Posts: 893
Melbourne, Australia
this looks very promising, hope the plugin is going steady.

Will it be possible to implement a soft shadow shader on your shadows on release?

I'm guessing soft shadows will be a lot more practical with the frame rate improvement with shadows

Matt

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 Offline
Junior Member
Storm_Mortis  Offline
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 laugh


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 Offline
User
Poison  Offline
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: Poison] #216160
07/15/08 13:39
07/15/08 13:39
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
doom3 doesn't blur anything. in doom3 the borders are much less noticeable because it does additive multipass light rendering * and not simply multiply all shadows over the already completely rendered scene.

(* so the borders are exactly where the model starts to get dark because of the lighting equation. only with a method like this lights and shadows really work together correctly.)

stencil shadows are outdated anyway though. nowadays almost everyone goes with shadow mapping.

Re: fasterStencil plugin [Re: ventilator] #216162
07/15/08 14:01
07/15/08 14:01
Joined: Apr 2005
Posts: 3,815
Finland
Inestical Offline
Rabbit Developer
Inestical  Offline
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 Offline OP
Serious User
ChrisB  Offline 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.


www.Swollen-Eyeballs.org
ICQ:169213431
#3dgs@quakenet
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 Offline
Expert
frazzle  Offline
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 wink wink 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 smile smile

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
Page 2 of 2 1 2

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1