spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / experts / 3d / lesson91

Lesson 91 - Lightmaps in Pulse 3D - Part 2

Developer News
News Flash: Adobe Has iPhone Workaround
Adobe's Flash 10.1 Goes Mobile (Minus iPhone)
A Salute to Visionary CEOs

One of the most important methods for speeding up realtime rendering is "pre-lighting" objects and scenes. There are a number of methods, some of them quite sophisticated, for creating texture maps that make a surface look like it’s been lit. Lightscape, for example, has excellent tools for computing the effects of complex lighting, and then effectively "painting" the illumination on the surfaces. That way the lights can be removed from the scene, the surfaces still look like they’ve been lit.

Vertex color is a very important method for creating persuasive lighting patterns that "stick" to the surface of objects, without the need for lights. Colors are assigned to the individual vertices of objects, and the surfaces render their assigned colors, even in absence of light sources. The following image shows a box with colors assigned to the vertices. Note how the colors blend between the vertices.

But a completely different way of simulating quality lighting has been emerging in realtime graphics. The idea is so simple that it takes some convincing to see that it really works. The concept is of "environmental light maps."

An environment map is an image that is intended to completely enclose a scene. It can serve two purposes. It may be used to render a convincing background. For example, it’s common to wrap an image of a starry sky to an infinite sphere surrounding a scene set in outer space. This kind of spherical environment map gives the impression that the scene extends in every direction.

A second purpose for an environment map is to create a basis for reflections on the surface of an object. For example, a reflective chrome surface on a bumper will not look convincing unless the viewer sees reflected imagery. A spherical map-perhaps of the sky-can provide the necessary source of reflections. Often you’ll see both uses at once. The environmental map will be rendered to provide an all-enclosing background, and will also be used for reflections on shiny surfaces.

But environmental maps can be used to simulate lighting as well, and Pulse has done an excellent job of implementing this exciting technique. Take a look at the simple grayscale image below. Imagine it wrapped around a gigantic sphere. A model of a baby’s head is placed in the middle of this sphere and is rendered lighter or darker depending of the shade of the surrounding pixels on the map. The result is remarkably subtle, and requires no lighting computations. The mapping computations are extremely fast.


This whole thing is quite amazing in its simplicity, so take some time to think it through. The sphere amounts to a lighting environment from the point of view of the object. In this case, the light is coming from above front-left. If light is should be coming from below, you can use an image that is lighter on the bottom.


To Continue to Part 3, or Return to Part 1, Use Arrow Buttons


internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs

webref The latest from WebReference.com Browse >
Building a Banking Application Home Page with OOP · Mixing Scripting Languages · Review: phpFox, a Social Networking CMS with all the Bells and Whistles
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Enterprise 2.0: Social Networking in the Cloud · BroadSoft Marketplace Hastens Pace of Telephony Innovation · Review: HTC Hero for Sprint

Created: Apr. 24, 2000
Revised: Apr. 24, 2000

URL: http://webreference.com/3d/lesson91/2.html