After implementing deferred rendering, shadowing has always been a secret priority for me. I think shadows are a fundamental feature of next generation graphics as they add a crucial visual clue about the environment and where things actually are. Next to obviously making a game look better in general, shadows can also play an important role in gameplay. In the case of Star Wars and space games, I think the most prominent example for that would be star fighters hiding on the shadowed side of an asteroid or moon. This would tie in with another feature planned for later where you would be able to turn off your ship engines and electronics to hide somewhere, without popping up on the enemy’s radar. Think the Millenium Falcon on the back of the star destroyer in The Empire Strikes Back.
Now, let me give you a technical insight into what has been accomplished. Since we do not have access to the source code of Freelancer, implementing shadow mapping was not a trivial task. As shadow mapping requires rendering the scene from the light’s perspective, the key was to have control over the camera including frustum culling. After this had been figured out, the implementation was rather straight forward as shadow mapping is not really complicated. I won’t talk about shadow mapping in this article as I think a Google search will point you to a lot of articles that will explain it a lot better than I could do here, including comparisons with other shadowing techniques such as stencil volumes.
As of now, only a basic shadow mapping technique is implemented, with only the player’s ship casting shadows. The actual shadow is smoothed using percentage closer filtering on the shadow map lookup, and then blurred using a standard Gaussian blur. So, it is a pretty standard, basic shadow implementation. You will be able to see this type of shadowing in our upcoming open beta.
Here is a little video, also showing how shadows fade out with increasing distance:
For our release version later this year, I want to implement more advanced shadowing techniques such as cascaded shadow mapping with variance shadow maps to get nicely smoothed shadows over vast distances. This will allow us to let every object cast shadows, from small fighters over star destroyers to big planets!
Now, some words about the overall mod progress. As real life is taking its toll on many of the developers, we are currently in a feature lock-down to ship this mod sooner rather than later. You can expect more graphics features for our final release, however for our upcoming open beta release there will be no more improvements other than optimizing and bug fixing.
Since we want to release the mod with a minimum set of features so that beta testing actually makes sense, we are not sure we can make our March deadline. Even though the basic framework is pretty much complete, there is still a lot to do on the gameplay side. We are confident to reach open beta status within the coming months, however do not expect it to be March.
Thanks for all your support so far and see you in space, in a galaxy far far away, soon!