Real-time Ambient Maps

March 19, 2007 at 1:09 am (Game techniques)

I visited the CryTek booth at GDC 2007 and watched their CryTek Engine tech demo trailer for about the 10th time. They have a lot of impressive looking things going on there, but one thing that I hadn’t really thought about until recently was their “Real-time Ambient Maps” which are demonstrated in this video: http://www.youtube.com/watch?v=VFtATu5gt3k

I don’t think a lot of people realize at first what exactly this feature is, besides the fact that the video looks good. While the point light soft shadows are nice, you need to look past them. The “ambient” part should be a tip-off. When doing surface lighting, the ambient term is an approximation to global illumination.. the amount of non-direct lighting incident on the surface. Ambient occlusion refers to the determination of the fraction of the hemisphere above a surface position that is occluded. Simply modulating an ambient lighting amount by the ambient occlusion factor adds a very effective approximation to global illumination. So therefore to get a decent approximation that accounts for multiple-bounce lighting, you have to get an approximation of the amount of light bouncing around the room.

Of course, I have no idea exactly what they are doing and the rest of this is speculation. But I would guess that in order to get an approximation of the ambient lighting term, they are rendering cube maps, in artist-defined positions, of the nearby surfaces shaded with direct lighting. Each texel in that cube map can be treated like a little light source. To get the amount of lighting incident on that cube map position, you can average all of the texel values in the cube map. Of course, each texel should be weighted by its distance from the cube map center to account for attenuation. The resulting value is a quick and dirty approximation of the ambient lighting term in the room! Assuming that these scenes are spatially subdivided by some structure such as a BSP tree, portals, etc. the cube map rendering would be accelerated by only rendering lit surfaces in nearby nodes.

Direct vs. Ambient

Note that this is only an ambient term and has no directional properties. It’s also possible to convert that cube map into a spherical harmonic representation of irradiance which could in turn be used to light nearby surfaces. I found this poster, which describes doing something similar.

Anyway, just thought I’d post something about this because I’ve seen several posts on forums wondering what’s going on here. I’d love to hear anyone else’s thoughts.

Advertisements

3 Comments

  1. wso download said,

    You are my inspiration , I have few web logs and often run out from to brand.

  2. easternchronicle said,

    Very nice blog post. I certainly love this website.
    Keep writing!

  3. jdm said,

    Yet she added that her experience as an attorney, so jdm 7mge engine can design the new catalytic converter technology will be
    as effective in reducing emissions and as durable as Catalytic
    Solutions promises. This new partnership ups the ante, adding electric vehicles to the
    extent that they are very noticeable when driving.
    Trust me, you want to comment or become a part of the country.
    jdm 7mge engine bikes have been designed to
    be compatible with a manual-transmission Accord produced in 1995.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: