Global illumination techniques

Started by
60 comments, last by FreneticPonE 9 years, 11 months ago

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 :

#t=12m28s

Is it good old lightmaps ?

Advertisement

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.

Just about all games with GI bake it to lightmaps, and this includes The Last of Us (although The Last of Us does have dynamic GI from your flashlight that's only enabled in a few indoor locations). Very few games have a runtime GI component, since existing techniques are typically expensive and don't end up looking as good as a static-baked result. Some games with deferred renderers try to get away with no GI at all, and just use some runtime or baked AO combined with lots of artist-placed "bounce lights" or "ambient lights" that try to fake GI.

For the current generation lightmaps are most definitely in, even if most have moved to spherical harmonic terms in order to get normal maps some nice directional light. Even Cryengine 3's image based lighting is very similar in result and application, though it was first used in driving games (hey, you've got a realtime updated environment map anyway.)

The one exception I can think of is Far Cry 3. They take a volume, apply a spherical harmonic lighting term to it, but update that term. Basically they've pre-calculated a function for light bounce for each area, encode that into a spherical harmonic probe, and use that to light. Each probe covers something like 4 meters squared of the terrain, and they load and X by X grid of probes around the player, not enough memory to extend the probes all the way to the horizon, and they update something like one probe a frame. Because the sun isn't moving too fast, it's not to noticeable to just update slowly. "Deferred radiance transfer volumes" if that's what you want to call it. http://fileadmin.cs.lth.se/cs/Education/EDAN35/lectures/L10b-Nikolay_DRTV.pdf

Then for the next generation. Well there's something like what Far Cry 3 does, just using more compute/memory (higher density grid? higher order spherical harmonics? etc.) Or a bunch of hack that are extremely limited and more of a neat special effect rather than actually working for lighting an entire level, a lot of attempts that produce results that aren't good enough/have too many artifacts/take up too many milliseconds/etc. And voxel cone tracing if you can actually get it working. EG

One of the biggest problems I can think of is, the everything is shiny problem. Specular contribution of materials is just as prevalent as diffuse, and yet so many attempts at more realtime GI out there are diffuse only. Simply because diffuse is easier because its lower frequency, EG less memory and less samples.

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

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.

SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.

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.

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..

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.

Epic has since moved away from it, they're using pre-baked lightmaps and specular probes now. Crytek was using an entirely different technique (Cascaded Light Propogation Volumes) which has a different set of tradeoffs. They shipped it for the PC version of Crysis 2 but not the console version, and I'm not sure if they used it in Crysis 3.


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".

--
GFalcon
0x5f3759df

This topic is closed to new replies.

Advertisement