Lighting things is pretty well covered in Crystal Space* right now; multiple lights can be rendered in one pass, and materials can have the usual assortment of properties such as normal maps, specularity maps etc. giving shiny visuals. However, for a truly convincing environment you also need shadows.
Crystal Space actually supported stencil shadows for a while, but they’re not with out issues: the algorithm inherently can’t support any transparent textures, and extra care must be taken by the artists to produce “closed” models, otherwise the shadows will mess up. Also, the Crystal Space implementation has some issues: they need some effort to set up and animated meshes are not supported.
Thus I implemented shadow map support. Without going into too much technical details, they can support binary transparency (aka alpha test), don’t need special care for the models (just throw anything at them and it’ll look as it should), and due simpler implementation, they work on animated meshes in Crystal Space. Within the render manager framework they can easily be utilized by either using a stock render manager with shadow support or some lines of code in custom render managers.
Now some screenshots on how they look in that well-known small test level:
Shadows test, from a distance
Β Β
Some close-ups
Shadows also work on somewhat larger levels:
(Ignore the missing textures etc. Focus on the shadows π
Some implementation details: Parallel-Split Shadow Maps on top of a plain normal shadow mapping. (You can see the shadow maps displayed for debugging purposes in the lower left corner of the shots.) The”soft” shadows you see are actually provided by the NVidia hardware – so real soft shadows is still something left to be done.
* Well, render manager branch.