Soft Particles, Dynamic Lighting and DX9 wonderfulness in FW:ToW
-
Freelancer’s capabilities of rendering dynamic lights has always been massively lacking. Not only was there a 4-light per object limit, once there were more lights affecting an object, lighting would get bugged quickly, not drawing the closest lights. To counter this major disadvantage in rendering lighting I’ve been converting Freelancer’s forward rendering pipeline to deferred rendering.
In deferred rendering, the geometry is first written to geometry buffers in a single pass. Then, in further passes, the geometry buffers are used to calculate the correct lighting. This allows us to render many lights per object without critically affecting the frame rate. However, there is still a noticeable performance decrease due to the nature of deferred rendering. I wont go into more detail at this point since its very technical. For further info, simply search the internet for deferred rendering.
Besides much improved dynamic lighting, deferred rendering also enables us to implement more next generation effects into the 7 years old Freelancer engine, such as Soft Particles. Soft Particles basically get rid of hard edges where particle effects collide with the environment. On intersection, the depth buffer is queried to make the particle fade out seamlessly, resulting in effects that feel a lot more natural. This is especially useful for smoke and fire effects as well as explosions.
Now to the eye candy. We are still exploring ways to add light sources to the game, however, FriendlyFire has added light sources to many beam/impact effects (and to stations) in order to show off the power of deferred rendering:
<object width=“560” height=“340” classid=“clsid:d27cdb6e-ae6d-11cf-96b8-444553540000” codebase=“http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0”><param name=“allowFullScreen” value=“true”><param name=“allowscriptaccess” value=“always”><param name=“src” value=“http://www.youtube.com/v/Mp6VIu4JRRQ?fs=1&hl=de_DE&hd=1”><embed src=“http://www.youtube.com/v/Mp6VIu4JRRQ?fs=1&hl=de_DE&hd=1” type=“application/x-shockwave-flash” width=“560” height=“340” allowfullscreen=“true” allowscriptaccess=“always”></object><object width=“560” height=“315” classid=“clsid:d27cdb6e-ae6d-11cf-96b8-444553540000” codebase=“http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0”><param name=“wmode” value=“transparent”><param name=“allowfullscreen” value=“true”><param name=“allowscriptaccess” value=“always”><param name=“src” value=“http://www.moddb.com/media/embed/356883”><embed src=“http://www.moddb.com/media/embed/356883” type=“application/x-shockwave-flash” wmode=“transparent” width=“560” height=“315” allowfullscreen=“true” allowscriptaccess=“always”></object>
Deferred Rendering: Dynamic Lighting video - Freeworlds: Tides of War Mod for Freelancer - Mod DBAlso, here is an effect, made as well by FriendlyFire, to show off Soft Particles:
Please note, this is all still a work-in-progress. However, stay tuned for further updates on our quest to update Freelancer’s graphics engine! Also, please vote for us in the MotY Upcoming category!
As always any comments, suggestions or questions are always welcomed!
–-----------------------Please follow us also on: -
If ENB is a Toyota Camry, then this is more like a Porsche 911.
-
Looks awesome
So… when do we get to play with it though? Seriously… i fell very teased right now, lolz
nice to have a team 'eh
-
Excellent work indeed!
On a side note, could you post some of the articles you used to get the deferred rendering to work?
BTW, voted for this mod…
-
Thanks for the kind words, fellas (and votes :)). It’s all W0dk4’s coding genius and FFs beautiful effects! They’ve made the graphics in this game really pop from the screen.
-
TheDvDMan wrote:
Awsome! I saw it also in Crossfire.
BTW how is it done? With some C editing?This has nothing to do with Crossfire. Crossfire does have lights on some weapon effects IIRC, however they are also bound to the old way of FL’s bugged lighting rendering system.
-
LancerSolurus wrote:
Excellent work indeed!On a side note, could you post some of the articles you used to get the deferred rendering to work?
BTW, voted for this mod…
Hey LS,
actually I couldnt really find a “tutorial” like article about deferred rendering… I basically browsed through the internet and learned by doing.
http://www.gamedev.net/community/forums/topic.asp?topic_id=424979
http://www.gamedev.net/community/forums/mod/journal/journal.asp?jn=263350&reply_id=3432126
http://www.guerrilla-games.com/publications/dr_kz2_rsx_dev07.pdf
-
The plugin will be released some time after FWToW is itself released. Then just about everyone will be free to include it in their own mod
And just so you understand the difference, this can run 1000 lights simultaneously (there’s no limit, but we’ve only tested up to about a thousand so far). FL, by default, can run 4.
-
FriendlyFire wrote:
The plugin will be released some time after FWToW is itself released. Then just about everyone will be free to include it in their own modAnd just so you understand the difference, this can run 1000 lights simultaneously (there’s no limit, but we’ve only tested up to about a thousand so far). FL, by default, can run 4.
plugin? Ahahaha, my guess is right!