Latest News
spacer View All spacer
 
May 8, 2010
 
GDC Canada: How Dead Rising 2 Analyzes The Zombie Menace
 
Miyamoto: It's 'Unfair' To Say Nintendo Isn't Proactive About Online [17]
 
Facebook Games See User Dip As Notification Rules Change [10]
spacer
Latest Features
spacer View All spacer
 
May 8, 2010
 
arrow Action Adventure Level Design: Kung Fu Zombie Killer
 
arrow Persuasive Games: The Picnic Spoils the Rain [19]
 
arrow Exclusive: Yuji Naka's New Bird
spacer
Latest Jobs
spacer View All     Post a Job     RSS spacer
 
May 8, 2010
 
Piranha Games Inc
Senior Technical Director
 
Piranha Games Inc
Lead Environment Artist Xbox360/PS3
 
Piranha Games Inc
Lead Multiplayer Designer
 
Piranha Games Inc
Lead Multiplayer Engineer
 
Warner Bros Games
Sr. Artist/Animator - SURREAL SOFTWARE - #117270
 
Warner Bros Games
Sr. Game Writer - WB Games - #117015
spacer
Blogs

  Image-Based Ambient Lighting
by David Rosen on 04/20/10 05:29:00 am   Expert Blogs
1 comments Share RSS
 
 
  Posted 04/20/10 05:29:00 am
 

Ambient light (or indirect light) is light that is not coming directly from a bright light source. For example, in an outdoor scene, the sun is a direct light, and the ambient light comes from the sky and the ground.

Here's a picture of the shadowed side of an Overgrowth character, showing how it's lit by scattered light from the sky and the ground:


Historically, ambient lighting has been represented by a uniform grey light that fills the entire scene, eliminating any pure black shadows.

This works to make the lighting less stark, but it doesn't fulfill any of the other functions of real ambient lighting: reacting to surface shapes and environmental coloring in order to add definition and bring the scene together.

Here's a comparison of uniform ambient lighting and Overgrowth ambient lighting.


I found that image-based lighting is the most intuitive and efficient way to achieve this effect. The method used in Overgrowth is based on cubemaps, which are groups of six images that combine to form the faces of a cube.

We start out with the cubemap containing the sky and distant terrain, and blur it to create a diffuse lighting cubemap. To blur the cubemap we just perform a cylindrical blur around each axis, as shown here:


This is very fast because the lighting cubemap can be quite small -- ours has faces of size 128*128. To prevent banding artifacts, we have to use a floating-point texture for the blurring, but afterwards it's stored in a DXT1 RGB texture for efficiency.

Now, to find the ambient light color for an object, we can just look up the cubemap in the direction of the surface normal. That's all there is to it! I really like this technique because it's fast, simple, and effective.

It's limited in that it only works well for uniform outdoor scenes, but since that is the most common setting in Overgrowth, it works well for us!

Follow us on the Wolfire Blog!


Facebook iconModDB iconSteam iconTwitter iconYouTube icon

 
 
Comments

Kevin Swiecicki
profile image
Oh, hey, I remember seeing you guys present at the indie games summit at GDC. I've been reading these blogs for a while now, and I only now just connected the dots.

Anyways, I always enjoy reading your stuff here. It's very informative. Keep up the good work.


none
 
Comment:
 


Submit Comment