Jump to content

  • Log In with Google      Sign In   
  • Create Account

Point Light Shadow Mapping


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
6 replies to this topic

#1 riuthamus   Moderators   -  Reputation: 5493

Like
0Likes
Like

Posted 18 January 2013 - 06:22 PM

So, with the help of this community we have been able to get point lights working. The issue is they are dull and boring and lack shadows....

 

http://www.youtube.com/watch?v=_grmwtnYI-U

 

Is an example of the brightness we desire and kinda the shadows. We dont need 100% realistic shadowing that blows the mind but we certainly dont want to see the point lights on the other side of the wall. So if i put a torch on a wall outside of the house I wont see the torch point light inside of the house and on the floor ( since it is blocked by the outside wall ).

 

How would we go about doing this? Keep in mind we are using defered rendering system as well as C# in SharpDX platform. We are using the most recent DX11.1 so we have the capabilities to use some of the cooler aspects of dx.

 

Any and all help would be appreciated! Thank you.



Sponsor:

#2 riuthamus   Moderators   -  Reputation: 5493

Like
0Likes
Like

Posted 18 January 2013 - 07:10 PM

Just a bit more information, we have already implimented the following:

 

http://www.rastertek.com/dx11tut41.html

 

and recently we tried to add the

 

http://www.rastertek.com/dx11tut42.html

 

but it uses up to 400mb of ram. Seems... pretty expensive. Telanor was saying we need to figure a way to use cascaded shadow maps.



#3 quiSHADgho   Members   -  Reputation: 325

Like
2Likes
Like

Posted 22 January 2013 - 05:12 PM

Ok so here are my thoughts:

Point lights shining through walls is just normal and I dont think that most or even any of todays graphics engines care about this. Normally it's the light artists job to place spot lights and point lights in a appropriate way. The easiest way to get rid of it is to use shadowmaps but in complex scenes and in games where the player is capable of placing nearly an infinite amount of light entities this will kill every system. What you could try is to change the light volumes of each light individually. Instead of drawing a sphere use a box and cut out everything that is behind a wall.

If you want to implement point light shadows you could look into Dual Paraboloid Shadow Mapping:

http://gamedevelop.eu/en/tutorials/dual-paraboloid-shadow-mapping.htm

Maybe there are better and newer techniques but I cannot think about any at the moment. Of course you can go with any shadowmapping technique you like, then you just need to draw a bunch of shadowmaps per light.

I didnt read the whole soft shadow tutorial but it seems that they are just using a simple blur which should not use 400 MB but I dont know your engine setup.

I think you just need to read through some different techniques and choose the one you like the most there tons of tutorials and examples out there. My personal favorit is Variance Shadow Mapping:

http://www.punkuser.net/vsm/

It is easy to implement and easy to combine with CSM or Parallel Splits or whatever you choose and gives the possibility to use linear filtering methods, gauss and even MSAA.

Now some words about the issues you wrote about in the old thread:

I think the bright center is basically a different material for light entities boosting the light power so that the bloom can give it a halo. And The Witcher is using a strong bloom there a bit too strong for my taste. The background where the light is shining through the wood and getting a blue halo is a slight overkill. If your lights are to dull overall you could also try adjusting your tonemapper. Lowering the white value will make the colors burn out earlier and produces brighter images but you will also loose more details.



#4 kalle_h   Members   -  Reputation: 1386

Like
1Likes
Like

Posted 22 January 2013 - 05:55 PM

You could try this http://kayru.org/articles/dssdo/
It does not give that high quality shadows but it gives nice soft contact shadows for every point light with minimal cost,
only one dot product. Dssdo can also be done easily with normal ssao pass so cost should not be that big. With smaller point lights this can be good enough method and you save performance for more expensive shadow mapping just for main lights.

#5 riuthamus   Moderators   -  Reputation: 5493

Like
0Likes
Like

Posted 22 January 2013 - 06:31 PM

Point lights shining through walls is just normal and I dont think that most or even any of todays graphics engines care about this. Normally it's the light artists job to place spot lights and point lights in a appropriate way. T

 

100% agree with this, until we add in the aspect of having players being able to place point lights via torches and other things. On top of this... what if a player had a staff that had a point light and was walking outside of your house, you would know because you would see that point light shining from under your structure. Or maybe your bed is near a wall and a creature that has a point light glow is outside of your wall and now your head begins to glow some odd color because its radiating through the wall... ( actually that sounds cool .... lmao )

 

Now some words about the issues you wrote about in the old thread:

I think the bright center is basically a different material for light entities boosting the light power so that the bloom can give it a halo. And The Witcher is using a strong bloom there a bit too strong for my taste. The background where the light is shining through the wood and getting a blue halo is a slight overkill. If your lights are to dull overall you could also try adjusting your tonemapper. Lowering the white value will make the colors burn out earlier and produces brighter images but you will also loose more details.

 

Thanks, we have been testing with some of our HDR settings and realized that the dullness was very much related to our algorithm as well as the outside lighting. We have since replaced that and I think we have a very strong quality of point lighting. We have some other things to tackle before they are complete but we are certainly on the right path thanks to you and the help of the others in that thread.



#6 Telanor   Members   -  Reputation: 1332

Like
1Likes
Like

Posted 22 January 2013 - 07:59 PM


I think you just need to read through some different techniques and choose the one you like the most there tons of tutorials and examples out there. My personal favorit is Variance Shadow Mapping:
http://www.punkuser.net/vsm/
It is easy to implement and easy to combine with CSM or Parallel Splits or whatever you choose and gives the possibility to use linear filtering methods, gauss and even MSAA.

I worked on point light shadow maps a while ago and I was using VSM. It works fine for directional lights, which is what every single tutorial in the world implements, but then when I tried to make it work for point lights, I couldn't figure out how to apply the Gaussian blur to the cubemap. I tried Dual Paraboloid Shadow Mapping but never got it working for some reason, I don't remember what it was now. But dual paraboloid has very noticeable seams (skyrim seems to have used that technique and the seams stood out very clearly), so I'd rather avoid that technique.

#7 CC Ricers   Members   -  Reputation: 623

Like
1Likes
Like

Posted 23 January 2013 - 12:26 PM


I think you just need to read through some different techniques and choose the one you like the most there tons of tutorials and examples out there. My personal favorit is Variance Shadow Mapping:
http://www.punkuser.net/vsm/
It is easy to implement and easy to combine with CSM or Parallel Splits or whatever you choose and gives the possibility to use linear filtering methods, gauss and even MSAA.

I worked on point light shadow maps a while ago and I was using VSM. It works fine for directional lights, which is what every single tutorial in the world implements, but then when I tried to make it work for point lights, I couldn't figure out how to apply the Gaussian blur to the cubemap. I tried Dual Paraboloid Shadow Mapping but never got it working for some reason, I don't remember what it was now. But dual paraboloid has very noticeable seams (skyrim seems to have used that technique and the seams stood out very clearly), so I'd rather avoid that technique.

 

Indeed, seams are one of the problems with the dual paraboloid maps, this applies to environment mapping as well (and it's more noticeable there). Appears as if the seams occur due to floating point errors that keep the edges of the warped textures from meeting at exactly the right point where they meet, so what you see is a black line (if the maps don't ever touch) or a lot of texture wrapping in a very small area (if there is overlap). The pixel is usually chosen with the max() function so in areas of overlap this illusion occurs.

 

I would want to test again with rendering only one part of the dual map instead of using max() to choose which one, to see how it behaves and look for a way to blend the edges well enough to reduce this problem.


My development blog: Electronic Meteor




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS