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

Global illumination techniques

61 posts in this topic

Hello,

Recently I was wondering how modern game engines simulate global illumination these days. I'm watching for example this walkthrough "The Last Of Us" and I had to say that inddor environment is rendered very nicely. Sun light comming from the window is illuminating the rooms naturally and  bouncing off surfaces.

Here is a video of what I'm talking about :

http://www.youtube.com/watch?v=fkjpxBS-wHk#t=12m28s

 

Is it good old lightmaps ?

0

Share this post


Link to post
Share on other sites

Interesting topic, I would love to hear about different approaches as well.
Not sure what they are doing in tlou, but some possible approaches are:
voxel cone tracing (what all the cool kids are trying these days), not in any released products that I know of at least.
light propagation volumes - crytek use this. Never seen it look very good myself.

PRT probes, modulated at runtime by lighting information from the scene (far cry 3 used this)

mass virtual point lights through RSM, merged per tile / pixel. The latest ghost recon for PC did this.

then lightmaps and precomputed AO factors are a safe option for static scenes I guess.
Another one I have seen used is manually placed hundreds of fill lights. 

 

I'm sure there are plenty more of course.

0

Share this post


Link to post
Share on other sites

Last of Us appears to be using reflective shadow maps for the flashlight. Everything else is likely baked.

0

Share this post


Link to post
Share on other sites

I believe that voxel cone tracing is state of the art if you want to do real time GI. I think Crytek and Unreal 4 have it, though I'm not sure if anybody's shipped an actual game with it yet.

http://on-demand.gputechconf.com/gtc/2012/presentations/SB134-Voxel-Cone-Tracing-Octree-Real-Time-Illumination.pdf

In terms of slightly more feasible technology, a lot of people are using prebaked SH environment probe based approaches. Essentially, set up environment probes as usual, compute SH to however many terms you feel like having, and save them off. Interpolate at runtime between nearby probes with whatever clever hacks you feel like applying and create a lighting environment like that.

Edited by Promit
1

Share this post


Link to post
Share on other sites

I believe that voxel cone tracing is state of the art if you want to do real time GI. I think Crytek and Unreal 4 have it, though I'm not sure if anybody's shipped an actual game with it yet.

http://on-demand.gputechconf.com/gtc/2012/presentations/SB134-Voxel-Cone-Tracing-Octree-Real-Time-Illumination.pdf

In terms of slightly more feasible technology, a lot of people are using prebaked SH environment probe based approaches. Essentially, set up environment probes as usual, compute SH to however many terms you feel like having, and save them off. Interpolate at runtime between nearby probes with whatever clever hacks you feel like applying and create a lighting environment like that.

Look at those numbers though.  That technique looks next-next gen.  At least, out of the box it isn't viable.

0

Share this post


Link to post
Share on other sites

Thanks for the replies. 

Well, in my case, I can't use pure lightmaps, since my scenes could be pretty dynamic and the gameplay will be mostly physics based. I can't even bake the lights on static geometry only, because when dynamic objects from other area is placed somewhere else, they won't contribute to lighting in that new area, etc. I'm thinking to combine lightmaps with lights. For example, to have a room with baked lightmaps and in my editor to place a deferred light by the window with the same color to illuminate my dynamic objects eventually placed by the window, that can't be affected by the lightmap. If that light cast shadows too, it could probably solve some other issues, but it seems too much of duplicating the lighting with different techniques..

Edited by solenoidz
0

Share this post


Link to post
Share on other sites


Epic has since moved away from it, they're using pre-baked lightmaps and specular probes now

 

Do you know why they gave up on it ? Voxel cone tracing seemed very promising to me, even for the  incoming "next gen".

0

Share this post


Link to post
Share on other sites

 


Epic has since moved away from it, they're using pre-baked lightmaps and specular probes now

 

Do you know why they gave up on it ? Voxel cone tracing seemed very promising to me, even for the  incoming "next gen".

 

 

I'm sure it was the performance. Per-pixel octree traversals + 3D texture lookups are not fast, even on high-end GPU's.

However I'm quite sure someone will end up shipping a game with something similar, perhaps tuned specifically to the needs of that title. In fact at E3 I noticed that Knack has dynamic reflections and soft shadows, which looked like they might be generated using voxelization.

0

Share this post


Link to post
Share on other sites


In fact at E3 I noticed that Knack has dynamic reflections and soft shadows, which looked like they might be generated using voxelization.

 

If you look at the video you can see that it's screen space reflections because the reflection disappears when the reflected object goes out of screen, pay attention to the glowing lights on the wall on the right: http://www.youtube.com/watch?feature=player_detailpage&v=iG98LuaYj_g#t=267s.

 

IMO, soft shadows are probably done with a common shadow mapping technique.

2

Share this post


Link to post
Share on other sites

@jcabeleira, nice to see a guy with an actual working realtme GI implementation around here. Your papers are also very nice.

0

Share this post


Link to post
Share on other sites

 


In fact at E3 I noticed that Knack has dynamic reflections and soft shadows, which looked like they might be generated using voxelization.

 

If you look at the video you can see that it's screen space reflections because the reflection disappears when the reflected object goes out of screen, pay attention to the glowing lights on the wall on the right: http://www.youtube.com/watch?feature=player_detailpage&v=iG98LuaYj_g#t=267s.

 

IMO, soft shadows are probably done with a common shadow mapping technique.

 

Indeed, you can actually see where the reflections stop once the view angle is too oblique. I guess I wasn't paying close enough attention at the demo. :P

0

Share this post


Link to post
Share on other sites

I like the way the shadows in Naughty Dog's "The Last of Us" are unified.

That is, the actors' and environment's shadows merge together like they're supposed to.

Most games just place lightmaps on the environment and then dynamic shadows from actors blend over them - that is, they further darken the lightmaps.

This is unrealistic, since both these shadow representations come from the same light source and should merge together instead of darkening one another.

 

Based on the "low-resolution" appearance of the environment shadows in this game, I can assert that they're not lightmaps but actual static shadow maps that are rendered in most likely the same pass as the actors' shadows so that they merge together.

There are most likely other lighting contributions involved in the sophisticated visuals for this game, but static shadow maps for the environment are participating.

Edited by Kryzon
0

Share this post


Link to post
Share on other sites

I like the way the shadows in Naughty Dog's "The Last of Us" are unified.

That is, the actors' and environment's shadows merge together like they're supposed to.

Most games just place lightmaps on the environment and then dynamic shadows from actors blend over them - that is, they further darken the lightmaps.

This is unrealistic, since both these shadow representations come from the same light source and should merge together instead of darkening one another.

 

Based on the "low-resolution" appearance of the environment shadows in this game, I can assert that they're not lightmaps but actual static shadow maps that are rendered in most likely the same pass as the actors' shadows so that they merge together.

There are most likely other lighting contributions involved in the sophisticated visuals for this game, but static shadow maps for the environment are participating.

 

I agree that this is the right effect to aim for, but I disagree that most games do it the "wrong" way -- the Unreal Engine 3, for instance, separates the "direct" component of dominant lights from the indirect component for exactly this reason (among others, such as doing different filtering on the sharp edges of direct lights* versus the smoother gradients of the indirect component); this makes it relatively efficient to combine lightmaps with dynamic shadow maps, as shadow maps only block out the direct component and leave the indirect light unchanged (which is of course an approximation itself, but one that generally is acceptable).

 

*in fact, this may be an alternative explanation for the "low-resolution" appearance of the shadows you're seeing, meaning that it might still be lightmaps rather than shadow maps - it seems weird to recalculate even just the direct light shadows for static lights/geometry every frame for no reason

1

Share this post


Link to post
Share on other sites

Hmm, you're right. It looks like they're using cascaded shadow maps for both the static and dynamic geometry, which is interesting. I assume they bake only the indirect lighting and then just add in the direct lighting on the fly. If nothing else, it's probably easier to implement than storing the contribution of direct light onto static geometry.

2

Share this post


Link to post
Share on other sites
The time is nigh for some really hardcore pixel shader work, scene voxelization.
0

Share this post


Link to post
Share on other sites

Hmm, you're right. It looks like they're using cascaded shadow maps for both the static and dynamic geometry, which is interesting. I assume they bake only the indirect lighting and then just add in the direct lighting on the fly. If nothing else, it's probably easier to implement than storing the contribution of direct light onto static geometry.

 

Guys, I understand the part with shadows. It's not interesting if they are using static shadow maps for static level geometry. I don't think they just bake the indirect lighting and that's it. The actors and other objects moving through the level receive indirect lighting as well. I have a feeling they have some sort of lightmap on static levels and also have some "fill lights" placed here and there simulate bounced light and to illuminate dynamic objects, that move around.

Edited by solenoidz
0

Share this post


Link to post
Share on other sites

My guess would be that they are using baked irradiance volumes for the indirect part. I haven't seen the game in action yet, though.

Edited by Bummel
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