Game Development Community

Advanced and Basic Lighting Options

by Bryan Morgan · in Torque 3D Professional · 08/11/2009 (8:50 am) · 5 replies

I was just thinking whether or not the option to switch between Advanced and Basic Lighting belongs in the Mission Editor. The reason for this is that the option you choose in the Mission Editor will be what the game is stuck with on release, and there are still many graphics cards (Mostly ATI) which struggle with deferred shading if it works at all, regardless of how much GarageGames attempts to hack workarounds for all the various hardware extensions that don't work right on ATI cards. This is why I think the option to change the lighting path should be in the game options by default and not the mission editor options. I just don't get why it was ever in the mission editor to begin with as with most major render path changes would require a restart of the engine and reload of all assets to function correctly. Of course, not everyone may think the same as I do, but I think it's much easier to be able to load up the game into the main menu, go into options, and then change the lighting path and restart rather then having to load up the entire mission just to change lighting path, restart, and then load the mission again when testing materials in the two lighting paths.

I tried looking for the light path options in the scripts but couldn't find it and so I'm assuming it's hard-coded into the engine as part of the mission editor. Is this correct?

#1
08/11/2009 (9:41 am)
You didn't look in the right scripts. It should be in both prefs.cs ($pref::lightManager) and the mission editor scripts. Or just check lightManager.cpp for all the console commands.
#2
08/11/2009 (1:37 pm)
I used torsion to do a search of all the scripts looking for anything mentioning advanced lighting (which should work since it's the title of the button at the very least) in hopes of finding where the GUI for the mission editor handles the switching between light paths so that I could remove it and move it to the options dialog. I was unable to find anything within the GUI for doing the switch. I figured I could just change the pref::lightManager variable via buttons in the option dialog, but I wanted to be sure nothing else was going to conflict with it.
#3
08/11/2009 (1:47 pm)
@Bryan - Its all up to the developer to define what lighting they want to support. Some games may not want AL or BL... so you remove that from the project.conf and rebuid. If you want both for maximum compatiblity you have to carefully design your levels to work that way.

I would suggest to not remove the option in the mission editor.... that's just there for the developer to quickly switch managers to test their level.

I would focus on designing a new options dialog which makes sense for your end users which allows for switching.
#4
08/11/2009 (1:49 pm)
ATI cards have no problems with "deferred lighting" as a whole. Games like Stalker, Trine, Defense Grid, which all use deferred rendering ran fine on them. NVidia is the one who loves adding proprietary stuff that breaks everywhere else. And there's the uncharted areas of the DX9 API, where certain behaviors aren't well defined and results may vary from vendor to vendor.
#5
08/11/2009 (3:21 pm)
ATI cards typically only handle deferred shading under DirectX. In OpenGL, their support for the render-to-texture and framebuffer object extensions are so sketchy that there is very little point in bothering with ATI cards unless you really want to spend months working on workarounds for all the incorrectly implemented driver extensions that ATI puts in there. ATI cards have gotten better in the last year or two, but even under DirectX there are many things that don't work right and either people just don't notice it unless they are programming in strange effects, or people think it's their own mistakes causing it and end up doing a workaround regardless.

Having done my dissertation on deferred shading and transparency techniques I have first hand experience in how much trouble both the ATI and NVidia drivers can be when trying to implement deferred shading.