Yeah - I grabbed a cube map of some sky + clouds off the web; since the lighting is already in shader, doing a cube map lookup is sort a cheap gag. :-) The math for the reflection calcs (they're slightly different from regular normal mapping can be found here:
http://http.developer.nvidia.com/GPUGems..._ch19.html
In the long term I'm thinking: diffuse and specular lighting can be built entirely off of cube maps, by doing a pre-processing stage on an environment map. If you look at this:
![[Image: 10_irradiance_02a.jpg]](http://http.developer.nvidia.com/GPUGems2/elementLinks/10_irradiance_02a.jpg)
The right two images can be used to replace lighting equations, and they are entirely derived from the left image. The advantages of this technique are:
- The lighting looks 'the same' between metal parts and non-metal parts, because the diffuse/specular lighting came from the reflection of the room.
- The lighting model is complex, soft, and diffuse. I think most of our experience viewing lego bricks is indoors, so a fair amount of the light has bounced off of the ceiling, white walls, come from a window (an 'area light for our purposes, etc.). So a cube map may get us to an accurate 'room' environment faster than creating a gajillion point GL lights.
Cheers
Ben
http://http.developer.nvidia.com/GPUGems..._ch19.html
In the long term I'm thinking: diffuse and specular lighting can be built entirely off of cube maps, by doing a pre-processing stage on an environment map. If you look at this:
![[Image: 10_irradiance_02a.jpg]](http://http.developer.nvidia.com/GPUGems2/elementLinks/10_irradiance_02a.jpg)
The right two images can be used to replace lighting equations, and they are entirely derived from the left image. The advantages of this technique are:
- The lighting looks 'the same' between metal parts and non-metal parts, because the diffuse/specular lighting came from the reflection of the room.
- The lighting model is complex, soft, and diffuse. I think most of our experience viewing lego bricks is indoors, so a fair amount of the light has bounced off of the ceiling, white walls, come from a window (an 'area light for our purposes, etc.). So a cube map may get us to an accurate 'room' environment faster than creating a gajillion point GL lights.
Cheers
Ben