Saturday, November 3, 2007

DIY Light Probes and Cheetah 3D

Well, I recently came across a terrific 3D app for Mac OS X called Cheetah 3D. I'm still playing with the demo mode, but I've long been intrigued with a rendering technique called image-based lighting, where a "light probe" image is used to render ultra-realistic lighting of a 3D model. Cheetah 3D supports image-based lighting with light probes so I thought I'd check it out.

A light probe is really nothing more than a mirrored sphere, since such a sphere is capable of capturing (nearly) 360 degrees of a scene both vertically and horizontally. But in order to be maximally useful, the probe image must capture the full dynamic range of the light in the scene (i.e., it must be a high dynamic range image or HDRI). Photoshop CS3 and CS2 have no problem merging multiple exposures of a photograph into a 32-bit HDRI, so this is the software I chose to use.

The source of the light probe couldn't be simpler or cheaper: a 7.5 inch diameter plastic giant Christmas ornament from Target for $2.50. And even though the geometry of the probe is somewhat iffy, it works absolutely beautifully. Here's a very quick How I Do It on making your own HDRI light probe images for use in 3D software such as Cheetah 3D and many others:

1) Mount the light probe on a stick and place it in the scene. Here I've simply duct taped it to a bamboo stake we had handy Being a giant Christmas ornament, it had a little nub on it for the tree hanging part. [My wife is standing in as my trusty model in our backyard earlier this evening.]:




2) Take a series of bracketed photos of the sphere to cover the whole dynamic range of lighting present. Tips: mount the camera on a tripod far from the ball and use a long telephoto lens to keep yourself as small in the reflection as possible so as to be almost invisible.




3) Merge the photos to an HDR image in your favorite HDR software (e.g., Photoshop CS2/3, Photomatix, etc.):




4) Keep the image as a 32-bit HDR file, but if you're gonna use it in Cheetah 3D, be sure to flip the photo horizontally to get accurate reflections.

5) Trim it down to a sphere with cropping tools and save it as a Radiance image (.hdr file extension):




6) Cheetah 3D can import native .hdr files like this in its HDRI render settings. Just be sure to set the image type to "probe" in the Cheetah 3D menu:



I won't go into all the details of using Cheetah 3D, but here's a quick demo movie of what can be done with these HDRI light probe images. Note the reflection of the probe droid in the rightmost sphere. The rightmost sphere is also rendered in Cheetah 3D and is strikingly similar to the actual photographed sphere in the scene:



Labels: , , ,