Saturday, December 12, 2009

Initial Light Probe Test

Here's my very first attempt at setting up light probes and using them to light a model. I did this as fast as I possibly could, which means that I didn't do a very good job. I just wanted to get the images into my code and see what happened.

The light probes were built with about $5 worth of Christmas ornaments from Hobby Lobby, a dowel rod and duct tape. The camera is a fairly cheap, consumer grade, 10 megapixel, ultracompact digital camera mounted on a tripod. Notice the tape on the floor so that I can replicate the positioning of the camera:



Here's a picture of the Christmas tree. This will be used as the background:


The reflection map:


The diffuse map. I messed up and got some branches in the way. This shows up later in the render and looks bad.


The scene using the reflection map and the background:


The scene using the diffuse map and the background.


The reflection and diffuse map mixed together 50/50.


The reflection and diffuse maps and background image were taken in a room lit only by the Christmas tree with a 15 second exposure. The sphere mapping code is all done in a Cg vertex shader. I chose not to use the fixed function OpenGL sphere mapping texture coordinate generation because I'm going to want both sphere and model texture coordinates when I add a grunge map later. It isn't clear how to get that with the fixed function pipeline but it's fairly easy with shaders.

The most noticeable issue is that the background image doesn't match up to the sphere map and the diffuse map. The background is from a different part of the tree.

In the next test, I'll be a lot more careful about how I take the pictures and make sure that I crop the exact same areas and match them up.

No comments:

Post a Comment