• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
riuthamus

Screenspace Shadow Mapping Help!?

18 posts in this topic

Done a few searches but found no relevant tutorials ( according to telanor ) about how to setup screenspace shadow mapping. Our current setup cascaded shadow mapping has some issues with point lights and models. I would like to create a less expensive method that provides us with decent results. Any and all help would be appreciated.

0

Share this post


Link to post
Share on other sites

Found this siggraph crytek paper from last year. http://www.crytek.com/download/Playing%20with%20Real-Time%20Shadows.pdf

 

They are talking about shadows in general and there is a tiny little section about screen space self shadowing that seems to use this technique.

As a screen space technique it's not a drop-in replacement for regular shadow maps, really just an addon to increase fidelity.

 

I can imagine it working pretty well for range restricted point lights though.

 

Are you using deferred lighting? Then it should be a pretty straight forward to incorporate the tracing into the rendering of the point light polygons.

1

Share this post


Link to post
Share on other sites

We are using deferred rendering. Right now Telanor has chosen to use cube map shadow mapping for the point lights ( creating a big issue with peformance ). I can have him post here to explain his choice and maybe that will give way to what we should be doing and how. Thanks in advance.

0

Share this post


Link to post
Share on other sites

Actually it's not a shadow mapping algorithm but rather a ray tracer.

 

Trace the ray from the pixel towards the light source, if the sampled depth is lower than the interpolated depth of the ray than that original pixel must be occluded.

Edited by Madhed
0

Share this post


Link to post
Share on other sites

We are using deferred rendering. Right now Telanor has chosen to use cube map shadow mapping for the point lights ( creating a big issue with peformance ). I can have him post here to explain his choice and maybe that will give way to what we should be doing and how. Thanks in advance.

their's also hemispherical shadow mapping that reduces a cube shadow map down to 1 texture(or 2 for both sides).  [url]http://www.thomasannen.com/pub/cgi2002.pdf[/url] this is a paper i [b]tried[/b] to follow to get it to work when i was experimenting with it, but i never got it working.

1

Share this post


Link to post
Share on other sites

I think that is where telanor got stuck as well, not sure... he said he did it some time ago. I noticed our shadows were not working for point ligths and brought it up. He seems to be content but I am not. Hence we are here

0

Share this post


Link to post
Share on other sites

Right now Telanor has chosen to use cube map shadow mapping for the point lights ( creating a big issue with peformance ).

That is the way to go:

add cube map shadow mapping for point lights

-> be happy about how cool it looks 

-> add more lights

-> see how bad the performance go

-> remove pointlights smile.png

 

To be honest, point light shadows are really extremely expensive, all shadow mapping variances are just too expensive to handle more than a handful of lights. One major issue is, that you need to render the scene multiple times which kills your performance by too many batches (this might change with new API approaches AZDO [Approach Zero Driver Overhead], Mantle,DirectX12), but for now shadow mapping is really,really expensive and real screen-space shadow mapping does not exist in any general, acceptable way.

 

The most common workaround:

1. use only point light shadows , if it is really necessary (even paraboloid shadow mapping), e.g. one major gameplay feature use one pointlight shadow

2. use shadow mapping for the most important light sources only (sun/moon plus some major light sources).

Edited by Ashaman73
1

Share this post


Link to post
Share on other sites

 


Right now Telanor has chosen to use cube map shadow mapping for the point lights ( creating a big issue with peformance ).

That is the way to go:

add cube map shadow mapping for point lights

-> be happy about how cool it looks 

-> add more lights

-> see how bad the performance go

-> remove pointlights smile.png

 

To be honest, point light shadows are really extremely expensive, all shadow mapping variances are just too expensive to handle more than a handful of lights. One major issue is, that you need to render the scene multiple times which kills your performance by too many batches (this might change with new API approaches AZOD, Mantle,DirectX12), but for now shadow mapping is really,really expensive and real screen-space shadow mapping does not exist in any general, acceptable way.

 

The most common workaround:

1. use only point light shadows , if it is really necessary (even paraboloid shadow mapping), e.g. one major gameplay feature use one pointlight shadow

2. use shadow mapping for the most important light sources only (sun/moon plus some major light sources).

 

 

Nah, do enough work and you can get hundreds of point light shadows in the same scene. Culling is really a key, and not doing work when not necessary. Shadow map caching can do wonders for reducing everything from bandwidth to draw calls.

 

It's all a lot of work though, well documented work, but a lot of it. CSM scrolling has a basic overview for both point lights and a directional light: http://advances.realtimerendering.com/s2012/insomniac/Acton-CSM_Scrolling(Siggraph2012).pdf the basic idea is to check whether each light has a moving object inside its influence and then only the changes necessary, which should be a handful of objects if the point light is stationary and so is most of its environment.

Edited by Frenetic Pony
0

Share this post


Link to post
Share on other sites


you can get hundreds of point light shadows in the same scene.

Ahh cool, can you point me to some demo, game or presentation which managed this, especially the hundreds part sound really interesting, I'm not interest in caching single shadow maps, but multiple, point light shadow maps, because my game would profit from such a feature too.

2

Share this post


Link to post
Share on other sites


"Efficient virtual shadow maps for many point lights" It's

I know this paper, it is still more theocrafting than practically useful (~15-20ms frametimes on NVIDIA GTX Titan GPU + Intel Core i7-3930K CPU isn't awesome for games yet). I've hoped for a more pratically useful solution, we will see what useful changes happens once the new API approaches/consoles kicks in.

1

Share this post


Link to post
Share on other sites

Screen Space shadowing is like screen space reflections , but here you trace a vector pointing to light. if the z of your ray is less than the depth buffer you have a hit and means shadow. This algorithm produce artifacts when shadow casting objects are not present at screen space.

For shadow maps I believe you can create a priority system . Let's say your engine decides to have 20 shadow casting lights . So choose 20 of your lights that has the greatest effect .(Near the camera , Bigger Radius , ...). And also with the help of geometry shaders you can produce a cube map with one render pass.

1

Share this post


Link to post
Share on other sites

Thank you all for the posts. All of these are great suggestions and I certainly will ensure telanor takes a look at them. I think one of the hardest parts about shadows and our system is that we have a fully dynamic world. Most of the tricks of the trade are not able to be produced in our setup without creating some serious issues. I will keep this post in mind though. Any other suggestions or ideas would be greatly appreciated.

0

Share this post


Link to post
Share on other sites

For point lights, stencil shadows are very effective, but they are very hard to implement though. You will even need the casting geometry be extrudable and an enclosed mesh. But they are suitable for deffered illumination.

0

Share this post


Link to post
Share on other sites

Would you be willing to share how you did it? Or even work with Telanor directly? PM Him on the forum if you would please and maybe we can hook something up. Thank you very much

Edited by riuthamus
0

Share this post


Link to post
Share on other sites

 


"Efficient virtual shadow maps for many point lights" It's

I know this paper, it is still more theocrafting than practically useful (~15-20ms frametimes on NVIDIA GTX Titan GPU + Intel Core i7-3930K CPU isn't awesome for games yet). I've hoped for a more pratically useful solution, we will see what useful changes happens once the new API approaches/consoles kicks in.

 

 

Found that with shadow map caching it can work well for many dozens of lights. But indeed while hundreds may "possible" it's not practical on most systems. And you need all the overhead of the culling scheme, which is great if you're targeting hundreds of point lights to begin with. But we're still a long way off from having a city scene with hundreds of proper point lights, and I suspect that will just have to be brute forced one way or another.

1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0