Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (degenerate_762, AbrahamR, AndrewAMD, ozgur), 667 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Information about Shadowmapping #185713
02/25/08 21:49
02/25/08 21:49
Joined: May 2005
Posts: 2,713
Lübeck
Slin Offline OP
Expert
Slin  Offline OP
Expert

Joined: May 2005
Posts: 2,713
Lübeck
I think that we should try to collect all usefull papers/information/codes on shadowmapping there is on the internet.
We should make a difference between approaches on softshadows and ways to get rid of aliasing.

I start with techniques for less aliasing -> higher Shadowresolution near to the player, less "flickering", ...:




And these are about softshadows:


I am sure that there are quite some good ressources missing, so please add all you know of
And then when it seems that we have most of them together I´d like to discuss them a little bit to exchange some experiences and hopefully end with some nice implementations (or at least one great )

Re: Information about Shadowmapping [Re: Slin] #185714
02/26/08 19:35
02/26/08 19:35
Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
frazzle Offline
Expert
frazzle  Offline
Expert

Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
Great idea to collect useful write-ups about SM
Here's an article I found about aliasing caused by conditionals in HLSL:

http://ati.amd.com/developer/SIGGRAPH04/ShadingCourse2004_HLSL_Slides.pdf

Not the entire article is based on this, the interesting part starts from page 26
I'll try to input some SM code I've got asap

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
Re: Information about Shadowmapping [Re: frazzle] #185715
02/27/08 13:03
02/27/08 13:03
Joined: Dec 2007
Posts: 17
Mare Offline
Newbie
Mare  Offline
Newbie

Joined: Dec 2007
Posts: 17
Great posts guys!!! Im sorry but I dont have anything clever to post, but I have a simple question, that is maybe going to trouble us when we finaly deside to write a shadowmapping shader: How can we make model to cast shadow on some other model using shadowmapping, maybe I am stupid but I know how shadow mapping works(It stores the depth buffer, and compares to depth of a procesed pixel in the light space coordinates......), now how can we store the whole depth buffer for the entire scene, not just for the procesed model? If we cant that would give us only selfshadowing, not casting shadows on other entityes because every model will compare the depth of its processed pixel to the depth stored only by its self geometry, and wont know if some other model is blocking the light in front of it...



And now I have a solution for making ultra-real sof shadows, maybe it isnt so fast as the variace shadowmapping but its how it works in the nature.Basicly it has four steps(I dont know realy how to implemnt them in the shader, but I know that there's someone of you who knows):

1) generate basic aliased shadowmap;
2) blur the shadowmap(I know that will produce strange artifacts, like black_glowing);
3) do a bloom filter on a blured shadowmap(corrects the black_glowing...)
4) apply the shadow map!!!


ps. This is a great post, we should keep it going until we find a solution!

Re: Information about Shadowmapping [Re: Mare] #185716
02/27/08 15:06
02/27/08 15:06
Joined: May 2005
Posts: 2,713
Lübeck
Slin Offline OP
Expert
Slin  Offline OP
Expert

Joined: May 2005
Posts: 2,713
Lübeck
http://www.coniserver.net/ubbthreads/showflat.php/Cat/0/Number/811731/an/0/page/0#Post811731
As you see, it is very easy to do shadowmapping with Gamestudio the only problem is how to optimize it
What you explain is like this ("Screenspace Blurring": http://www.gamedev.net/reference/articles/article2193.asp) but with bloom which won´t change anything because you would blur the shadows, remove parts of the blur and blur it again...
Show me an example or such if you know that I am wrong

I found two more interesting techniques:


Re: Information about Shadowmapping [Re: Slin] #185717
02/28/08 13:43
02/28/08 13:43
Joined: Jun 2004
Posts: 655
to your left
BoH_Havoc Offline
User
BoH_Havoc  Offline
User

Joined: Jun 2004
Posts: 655
to your left
Cascaded shadow maps:
http://developer.download.nvidia.com/SDK...shadow_maps.pdf

Real-Time Soft Shadows with Shadow Accumulation (no code):
http://www.iit.bme.hu/~szirmay/softshadow.pdf


Shade-C EVO Lite-C Shader Framework
Re: Information about Shadowmapping [Re: BoH_Havoc] #185718
02/28/08 16:20
02/28/08 16:20
Joined: May 2005
Posts: 2,713
Lübeck
Slin Offline OP
Expert
Slin  Offline OP
Expert

Joined: May 2005
Posts: 2,713
Lübeck
Nice, I wasn´t able to find much information about CSM

Here is a screenshot showing my results with this technique http://www.softgames.de/developia/viewarticle.php?cid=27884:


Last edited by Slin; 02/28/08 16:26.
Re: Information about Shadowmapping [Re: Slin] #185719
02/28/08 16:25
02/28/08 16:25
Joined: Nov 2007
Posts: 1,032
Croatia
croman Offline
Serious User
croman  Offline
Serious User

Joined: Nov 2007
Posts: 1,032
Croatia
@Slin, check vsmsun project topic, i asked an important question...

sorry for a offtopic post



Ubi bene, ibi Patria.
Re: Information about Shadowmapping [Re: BoH_Havoc] #185720
02/28/08 16:41
02/28/08 16:41
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
I'd like to try my luck with cascaded shadow maps, but first I need to find the time...

Is there anyone here thats a math expert? lol


xXxGuitar511
- Programmer
Re: Information about Shadowmapping [Re: xXxGuitar511] #185721
02/29/08 22:38
02/29/08 22:38
Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
frazzle Offline
Expert
frazzle  Offline
Expert

Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
I guess you don't really need to be math expert to solve the aliasing effect IMHO
The most commen reason why you get aliasing for the shadow mapping algorithm are the following:

- The resolution of the shadow map.
- A limited numerical precision used when performing the comparaison between depth value from shadow map and the depth value for the fragment's distance to the light.

The first element can be easily solved when using a 1024X1024 shadow map which can store depth values in a 32-bit floating point.
This was already known and is also already used to partly overcome the aliasing effect.
The second element is more complex off course but I've done some look-ups and it seems that the following aspects are the most salutary:

1) Distribution of depth values in the light's viewing frustum.
2) Adjusting the viewing frustrum of the light source so that only the visible areas of the scene are covered by the viewing frustrum of the light.
3) PCF, adjacent bilinear filtering and maybe even a jitter value.

Number 3 is easy to enhance and already used but numbers 1 and 2 are far more complex in theory but can be achieved with a rather small amount of code at the practical side AFAIK

Btw, another interesting article about AA when using shadow maps :

http://files.filefront.com/Serverlisting+01rar/;9729203;/fileinfo.html

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
Re: Information about Shadowmapping [Re: frazzle] #185722
03/01/08 15:14
03/01/08 15:14
Joined: Jan 2003
Posts: 4,615
Cambridge
Joey Offline
Expert
Joey  Offline
Expert

Joined: Jan 2003
Posts: 4,615
Cambridge
pcf gives you best results. screen space blur is not as well-suited since it suffers from edge bleeding. multiplicate the pcf texel offset with the distance shadow-caster - shadow-receiver and you'll even get penumbra wedges...

Page 1 of 2 1 2

Moderated by  Blink, Hummel, Superku 

Gamestudio download | chip programmers | 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