Friday, June 8, 2007

Starting to look like an engine

I didn't know a good way to let the user adjust the scene's main directional light so I decided to implement a simple day/night system to control the lighting with a simple Time value. This goes along with my original plans to have a completely procedural sky so I named the day/night object "cAtmosphere". Can't wait to spend some time on it.

Right now it controls the scenes main directional light. At night it point up through the ground, this needs to be fixed and I believe the solution is using 2 directional lights. One to supplement the other while it moves so that shading dosn't pop. I also introduced a shadowAlpha parameter to the light which fades the shadows out as they cast increasingly horizontal. Not physicaly accurate but it prevents some artifacts.

The main menu reads:
Time: ##.##
Save
Save As
Open

Model edit menu reads:
Cast Shadows: T/F
Receive Shadows: T/F
Bounding Sphere Radius: ##.##

Video Post: http://video.google.com/videoplay?docid=-3448415448243535228

No comments: