Search Results

Wednesday, August 10, 2011

Experimental Build: Orthographic Shadows in the BGE

Hey. So, after milling around with the Blender Source for a bit, I implemented very rough orthographic shadows into the BGE. It's not finished yet - there are still bugs, but I would like to put it out there for testing.


Basically, when one wanted to do sun-like shadows in the BGE, one had to use a large spotlight that spread across the scene. The problem with this was two-fold - first, the perspective of the light caused the shadows on the edges to bend away from the light, and second, moving the light moved the shadows. Since we are working in a game engine, though, it's impractical to have a huge scene-wide sun lamp (for now, at least). So, this implementation of orthographic shadows should give the effect of a sun lamp and shadows with the boundaries to make it more manageable.

The Orthographic Shadows button can be found in the Spot Shape section of the Light panel. There is an issue with shadow bias, but it seems to only appear when the lamp is covering a large area.

This build is definitely experimental (buggy). However, it most likely won't hurt any of your blend files. Just play around with it - if there are problems, tell me about it and I'll see if I can narrow down the issues.

One last thing - this scene is also included in the zip file for you to test it out, though I would appreciate both using the build with this scene, as well as other, blank scenes.

Orthographic Shadows.
Perspective Shadows.











Huge thanks to Moguri and Kupoman for their help. Well, you can download the Windows, 32-bit Shadows build here. I'm not responsible for what happens to your computer, though, again, I virus-scanned it. :D

No comments:

Post a Comment