• 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
user88

Looking for soft shadows algorithm

18 posts in this topic

Hi,

I'm looking for fast perfect quality Soft Shadows algorithm for room interior visualization. The 3D scene has a lot of polygons and about 1-5 light sources.

I have already implemented PCSS but result is not good enough. If i use so much texture lookups that satisfies the quality then i get only 1-2 FPS.

[i]Maybe for such specific 3d scenes there is more acceptable approach than PCSS?[/i]

I have found some interesting [url="http://vimeo.com/2745768"]video[/url] where is backing shadows algorithm. I'm not familiar with this algorithm.[i] Is this algorithms good for my goals? Is it very complicated to implement?

[/i]Note, i'm using DirectX 9 API.

Thanks for advice.
0

Share this post


Link to post
Share on other sites
[quote name='user88' timestamp='1296831205' post='4769545']
Hi,

I'm looking for fast perfect quality Soft Shadows algorithm for room interior visualization. The 3D scene has a lot of polygons and about 1-5 light sources.

I have already implemented PCSS but result is not good enough. If i use so much texture lookups that satisfies the quality then i get only 1-2 FPS.

[i]Maybe for such specific 3d scenes there is more acceptable approach than PCSS?[/i]

I have found some interesting [url="http://vimeo.com/2745768"]video[/url] where is backing shadows algorithm. I'm not familiar with this algorithm.[i] Is this algorithms good for my goals? Is it very complicated to implement?

[/i]Note, i'm using DirectX 9 API.

Thanks for advice.
[/quote]

"Baking", from the video, is burning the shadows into the texture maps. If the lights don't move, it's a cheap and fast solution.
0

Share this post


Link to post
Share on other sites
Exponential Shadow maps are probably the best out there right now and are not that difficult to implement.
1

Share this post


Link to post
Share on other sites
I think I'd suggest Cascaded Shadow Mapping over [color=#1C2837][size=4]Exponential Shadow Maps but it was a long time since I looked into it.[/size][/color]
0

Share this post


Link to post
Share on other sites
To be honest, I dont get why you consider Cascaded Shadow Mapping. As far I as I see user88 wants to render an interior with a few lights. CSM is very expensive and it is used to cover a large terrain with shadows, usually used for the sun lighting. The idea of CSM in itself is not to smooth shadows but to help alleviate the perspective aliasing problem.
0

Share this post


Link to post
Share on other sites
[quote name='Shanee' timestamp='1296901302' post='4769941']
I think I'd suggest Cascaded Shadow Mapping over [color="#1c2837"][size="4"]Exponential Shadow Maps but it was a long time since I looked into it.[/size][/color][/quote]Exponential shadow maps are orthogonal to cascaded shadow mapping (i.e. it's not one or the other, you can use both at the same time). For interior rendering, however, cascaded shadow maps do not make so terribly much sense, since they give the biggest benefits when the possible ranges are large, such as a low standing sun casting shadows outside.

The idea about cascaded shadow maps is to partition depth, so different ranges get different resolutions, and the total available shadow map resolution is best used where it is most visible. That is, more texels closer to the eye, and fewer of them where you can't see it anyway.
Exponential shadow maps turn "closest distance from light" into "probability that point is in shadow depending on distance to light", which is a totally different thing.
0

Share this post


Link to post
Share on other sites
Be aware that ESMs do have problem though - in particular when a caster is very near to a receiver. If you have a character standing on the ground then his feet can have a much fainter shadow than his body. On the plus side this immediatly solves the shadow acne problem for self shadowing objects.

All shadow mapping approaches have problems - if there was one perfect solution everyone would be using it. The best you can do is understand the limitations of the different approaches and pick the one which has the least drawbacks for your particular scenario.

Also, you still haven't said whether your lights/geometry are dynamic. If they are static then baked lighting is your best option.
1

Share this post


Link to post
Share on other sites
You are looking for something like this:

[url="http://www.facebook.com/album.php?aid=159265&id=159613387880"]http://www.facebook.com/album.php?aid=159265&id=159613387880[/url]

You can find a description of this here:

www.wolfgang-engel.info

Give me a sign how this goes.
0

Share this post


Link to post
Share on other sites
I did have some good results with standard shadow mapping and some clever bilinear filtering, with shadow maps rendered from multiple points on the light (or even single, based upon how does it look in the scene) ... results:
[url="http://img545.imageshack.us/i/diffuselight.png/"][img]http://img545.imageshack.us/img545/4655/diffuselight.th.png[/img][/url] [URL="http://img141.imageshack.us/img141/4315/fullscene.png"][img]http://img141.imageshack.us/img141/4315/fullscene.th.png[/img][/URL]

On the left side - direct lighting + shadows, on the right side whole image. This solution will most likely suit if you don't need high quality penumbra shadows, for penumbra shadows, there is no really good rasterizer solution - I did have some luck with heavily modified percentage closer soft-shadows, this is example:
[url="http://img25.imageshack.us/i/softshadowss.png/"][img]http://img25.imageshack.us/img25/320/softshadowss.th.png[/img][/url] [url="http://img837.imageshack.us/i/softshadows2.png/"][img]http://img837.imageshack.us/img837/7462/softshadows2.th.png[/img][/url]

On the left side penumbra shadows, no radiosity ... on the right side, whole solution (smaller light on the right, larger on the left). This solution is quite time-consuming. And the last of my rasterized shadow solutions is radiosity based one (don't run away, it isn't that slow), based upon lots (and I mean lots) of small shadow maps, giving very nice fuzzy shadow ... I tested just cornell box, and here is example:
[url="http://img829.imageshack.us/i/34450643.png/"][img]http://img829.imageshack.us/img829/8181/34450643.th.png[/img][/url] [url="http://img31.imageshack.us/i/cornellref.png/"][img]http://img31.imageshack.us/img31/853/cornellref.th.png[/img][/url]


On the left there is really huge light in the cornell box, and on the right result with pretty small light (and also instant radiosity).
0

Share this post


Link to post
Share on other sites
Vilem, did you publish the description of your perceptually correct soft shadow algorithm? I would be interested in reading how you did it.
0

Share this post


Link to post
Share on other sites
Actually I haven't published (nor created) paper for last two mentioned soft shadow technique (first is just slight modification of PCSS - it would probably be just 1 page, or 2 pages with code, second is math/physics-derived solution, that has close relation to statistics, probability, and such), I just presented some applications on local game developers meeting (called Game Access) last fall - just mentioning this shadowing technique on one or two slides.

I thought of writing some kind of paper + some specific demo application on the algorithm, but never convinced myself that it could actually be interesting.
0

Share this post


Link to post
Share on other sites
Thanks for all for your answers.

[quote name='PolyVox' timestamp='1296935049' post='4770113']
Also, you still haven't said whether your lights/geometry are dynamic. If they are static then baked lighting is your best option.
[/quote]

Yes, the scene is static. So, is baked lighning better for my case than ESM? Where i can find any information how to implement this technique (i mean baked lightning technique)? After short googling i found nothing about it.
0

Share this post


Link to post
Share on other sites
Notation to my last post:
[i]our project has build-in Mental ray render system. So, maybe this can be useful for lightmaps generation. Also note, that application should able to generate lightmaps itself. [/i]
0

Share this post


Link to post
Share on other sites
If your scene and lights are static then you won't find a better solution than baked lighting. If you need moving characters or something then it's more complicated (but you can still bake some of the lighting). Try searching for 'lightmapping' for more information. The lightmap is simply a precomputed texture which contains the lighting information and which you apply to your scene.

Beast is a professional tool which has been used for doing the lighting in a lot of games. You can read about it here: [url="http://usa.autodesk.com/adsk/servlet/pc/index?siteID=123112&id=15779574"]http://usa.autodesk.com/adsk/servlet/pc/index?siteID=123112&id=15779574[/url]. You can also use 3D modelling packages such as [url="http://vi-wer.de.tl/Lightmap-Tutorial.htm"]Blender for generating the lightmaps[/url].
1

Share this post


Link to post
Share on other sites
[quote name='PolyVox' timestamp='1297108714' post='4771018']
Beast is a professional tool which has been used for doing the lighting in a lot of games. You can read about it here: [url="http://usa.autodesk.com/adsk/servlet/pc/index?siteID=123112&id=15779574"]http://usa.autodesk....112&id=15779574[/url]. You can also use 3D modelling packages such as [url="http://vi-wer.de.tl/Lightmap-Tutorial.htm"]Blender for generating the lightmaps[/url].
[/quote]

Thanks for answer PolyVox.

I have made some research in web and now I understand that [b]backed lightmaps[/b] is the best technique for us.

Is there anybody know any free third-party API for backing lightmaps? :rolleyes:
0

Share this post


Link to post
Share on other sites
The word is [i]baked [/i]not [i]backed[/i], I don't mean to be picky but you'll get more search results that way ;-)

More generally, baked lighting refers to any kind of lighting which is static and precalculated. Lightmaps are a popular way of storing lighting information for world geometry, but you also have the option of storing it in the vertices. For charachters you would typically store your baked lighting in irradience volumes, but you won't need to worry about that for now.

There are essentially two things you need to do. First you need a way of caculating the lighting and generating the lightmaps. A tool like Beast or Blender (as mentioned previously) will be useful here. Secondly you need a way to render the data. The lightmap is just a texture which you will want to combine with your base texture so you'll need to read about 'multitexturing'.

Here's a few links I came across:

http://www.flipcode.com/archives/Light_Mapping_Theory_and_Implementation.shtml
http://www.flipcode.com/archives/Advanced_Lightmapping.shtml
http://www.alsprogrammingresource.com/lightmapping.html
http://www.alsprogrammingresource.com/lightmapping_tutorial.html
0

Share this post


Link to post
Share on other sites
[quote name='PolyVox' timestamp='1297198691' post='4771519']
Here's a few links I came across:

[url="http://www.flipcode.com/archives/Light_Mapping_Theory_and_Implementation.shtml"]http://www.flipcode....mentation.shtml[/url]
[url="http://www.flipcode.com/archives/Advanced_Lightmapping.shtml"]http://www.flipcode....htmapping.shtml[/url]
[url="http://www.alsprogrammingresource.com/lightmapping.html"]http://www.alsprogra...ghtmapping.html[/url]
[url="http://www.alsprogrammingresource.com/lightmapping_tutorial.html"]http://www.alsprogra...g_tutorial.html[/url]
[/quote]

Thank you PolyVox, links which you have shared are all what i need at the moment. Currently i'm digging deeper this information.
0

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