It's free to join Gamasutra!|Have a question? Want to know who runs this site? Here you go.|Targeting the game development market with your product or service? Get info on advertising here.||For altering your contact information or changing email subscription preferences.
Registered members can log in here.Back to the home page.

Search articles, jobs, buyers guide, and more.

By Shawn Hargreaves
[Author's Bio]

Gamasutra
August 13, 2003

Introduction

Additional Considerations

Printer Friendly Version
   

Excerpted From:

 

Change Login/Pwd
Post A Job
Post A Project
Post Resume
Post An Event
Post A Contractor
Post A Product
Write An Article
Get In Art Gallery
Submit News

 


 


Latest Letters to the Editor:
Perpetual Layoffs by Alexander Brandon [09.21.2007]

Casual friendliness in MMO's by Colby Poulson [09.20.2007]

Scrum deals and 'What is Scrum?' by Tom Plunket [08.29.2007]


[Submit Letter]

[View All...]
  



Upcoming Events:
Architecture & Design World 2008
Chicago, United States
07.21.08

Casual Connect Seattle
Seattle, United States
07.23.08

Christian Game Developers Conference - 7th Annual
Portland, United States
07.24.08

12th International Conference on Computer Games: AI, Animation, Mobile, Educational & Serious Games
Louisville, United States
07.30.08

GO3 Electronic & Entertainment Expo 2008
Perth, Australia
08.01.08

[Submit Event]
[View All...]

 


[Enter Forums...]

Note: Discussion forums for Gamasutra are hosted by the IGDA, which is free to join.
 

 

 


Features

Hemisphere Lighting With Radiosity Maps

Additional Considerations

This form of lighting can easily be simplified, using cheaper versions to implement shader LOD on distant objects. Most significantly, the per-pixel radiosity lookups and sky color calculations can be replaced by a single CPU texture lookup at the center of the object, with the resulting sky and ground colors set as vertex shader constants, the hemisphere tween evaluated per vertex, and no work at all required in the pixel shader.

Doing single-texel CPU lookups into the radiosity map is extremely fast, and this data can be useful in many places. For instance, a particle system might do a ground color lookup when spawning a new dust particle, to see if it should be in shadow and also so it can be tinted to match the hue of its surroundings.

The radiosity maps can easily become very large, but they are also highly compressible. Large areas of the map will typically contain either flat color or smooth gradients, so good results can be obtained by splitting it into a grid of tiles and adjusting the resolution of each tile according to how much detail it contains. At runtime, a quick render to texture can expand the area around the camera back out into a continuous full resolution map.

Because the radiosity map is only a two dimensional image, there will obviously be problems with environments that include multiple vertical levels. Such cases can be handled by splitting the world into layers, with a different radiosity map for each, but this lighting model is not well suited to landscapes with a great deal of vertical complexity.

View Animation

I have provided a sequence of videos that show the technique in action. These five videos (each approximately 7.5MB) show the same sequence of events with various parts of the lighting model highlighted in each clip. (Requires DivX player to view.)

  1. Radiosity.
  2. Radiosity plus dot3 sunlight.
  3. Specular plus fresnel cubemap.
  4. Full lighting model.
  5. Lighting plus textures.

Color Plates


The images below were created along the zoomed in section of this 2048x512 radiosity map

 


Diffuse (dot3) sunlight plus radiosity hemisphere lookup

With the addition of specular and Fresnel contributions, using a static cubemap holding an image of typical surroundings

 


These images show the hemisphere lighting on its own, using a single DXT1 format radiosity map that encodes both shadow and ground color information

 


The complete lighting model, combining a base texture, radiosity hemisphere, Fresnel cubemap, and dot3 sunlight

References

Philip Taylor (Microsoft Corporation) discusses hemisphere lighting: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndrive/html/directx11192001.asp

The non-approximate version: Image Based Lighting, Cunjie Zhu, University of Delaware: http://www.eecis.udel.edu/~czhu/IBL.pdf

This lighting model is used in the game MotoGP 2, on PC and Xbox, developed by Climax and published by THQ. MotoGP 1 used a similar radiosity technique, but without the Fresnel term on the environment cubemap.

______________________________________________________

[back to] Introduction


join | contact us | advertise | write | my profile
news | features | companies | jobs | resumes | education | product guide | projects | store



Copyright © 2003 CMP Media LLC

privacy policy
| terms of service