Author Topic: The future of lighting flags in FSO  (Read 1364 times)

0 Members and 1 Guest are viewing this topic.

Online EatThePath

  • 28
  • Laser Lich
    • Twitter
The future of lighting flags in FSO
Since becoming more involved in the graphics side of FSO I have been increasingly dissatisfied with -spec_point, -spec_tube, -spec_static and -ambient_factor, for a number of reasons. I want to remove them from the engine, but I also know that they serve an important role since the engine does not provide brightness options. I've discussed my plan of action on discord with a number of people over the past year or two, but I didn't want to change such a deeply ingrained part of FSO without bringing it here too.  I'll go over my reasons first, then my plan of action.

The -spec lighting flags were added almost 20 years ago, along with shine maps. In my experience they are used almost entirely as brightness controls by the community, either by user options or for mod visual design. The thing is, they're really bad at that. They don't control brightness overall but rather the brightness of specular reflections, the sharp highlights on shiny parts of a ship. This has a number of negative consequences.



Here's a comparison of -spec_static 2.0, 1.0, and 0.0 on two ships from the same angle under the same lighting conditions. It shows a number of the issues.

  • By comparing the non-shiny areas of the Hecate you can see that this tool is not very effective at changing the overall brightness of a ship very much. If you're trying to make the game much brighter or much darker this way, it's not very effective.
  • No, I didn't screw up and put three copies of the same Erebus screenshot in, though I can't promise they're in the right order ;). How much a ship is affected by the -spec flags depends heavily on the ship's texturing, so using the flags as a brightness control leads to an incoherent and unpredictable results between assets.
  • The shinier areas of the Hecate start to look very strange at extremes, because PBR assets intrinsically depend on properties of light that these flags break. Even worse, if you have noticeably different values for the different spec flags you get a ship that looks like it's made of different materials depending on where the light is coming from.

I'm sure when these flags were added and specular was a relatively new feature people were tuning, this made sense. Now though, PBR textures have specularity as an integral part of the artistic intent for a ship from the very start and the flags unpredictably mangle that intent more than anything else.

Ambient_factor I hopefully don't have to explain, the math behind it is confusing, for little benefit. Simple scaling is what people expect and likely what they should get.

So what am I going to do about it?

Of course none of this is set in stone, I'm confident in it but there's always the possibility that discussion or development will prompt a change of plans.

Firstly, I will disable the current set of flags, and replace them with two new ones. -lights and -ambient, both simple multipliers on the lighting. I want to do this rather than simply update the old ones so that people are aware of the changes and have the chance to adjust for them, rather than having their lighting change in potentially subtle ways and only discovering why down the line.

Second, I will add a swath of brightness controls to the lighting profiles table, again controlling the whole light rather than only the specular. This will allow much more detailed changes to lighting than would ever be practical as command line flags, and allow mods to incorporate these changes directly into their files rather than relying on launcher flags to implement their visual design. When profile switching is fully implemented this will even let mods tweak their global lighting properties from mission to mission, such as making weapon lights dimmer and smaller in nebula missions or the like.

In my mind if you want to adjust a game's lighting at that level of granularity you are dipping into what is essentially modding, just as much as editing the HUD or fonts is, and it makes the most sense to support that via tables. Still, while it is my hope that mods will take more ownership of lighting design over time and players will feel less need to adjust it I have no expectation that this will happen immediately or completely. So as lighting profiles matures as a feature I will be mindful of ensuring there is always a viable way for an end user to over-ride a mod's settings if they feel the need.

In doing all this I also intend to disable the SunSpecularRGB config option in stars.tbl. I have yet to find a mod that uses this option and it has all the same problems as the specular flags do. With it gone the FSO's shaders can be somewhat simplified under the hood, and quite possibly improved further too.

Please, let me know if you have any concerns or question. I understand that I am messing with something the community takes for granted and I want to do it in the best way I can.
« Last Edit: May 08, 2022, 01:42:52 pm by EatThePath »
Name your damn turrets and sounds! Numbers alone aren't helpful!
"if disco is dead then I am the laser lich"
"...[Warmachine] keeps changing as fast as EatThePath can force the engine to do his dark bidding..."

 
Re: The future of lighting flags in FSO
I'm entirely in favour of this; the current situation with lighting settings is frankly an embarrassment and I'm personally sick of having to think about it at all. We've gone through 3 or 4 different overhauls of the lighting model since those parameters were introduced and more are entirely possible in the future.
The good Christian should beware of mathematicians, and all those who make empty prophecies. The danger already exists that the mathematicians have made a covenant with the devil to darken the spirit and to confine man in the bonds of Hell.

 
Re: The future of lighting flags in FSO
I had a lot of fun messing around with lighting flags ~10 years ago but now with all the newfangled PBR and deffered lighting I'm happy if there's just a "one size fits all" solution rather then a bunch of things you have to manually set depending on which built you are on.

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
Re: The future of lighting flags in FSO
There also seems to have been a general culture shift in the community where once there were vocal players would would commit murder if they lost the ability to fine-tune things. Now it seems most players are happy to let mods and artists have more say in how their creations look. +1 from me.
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.

 

Offline 0rph3u5

  • 211
  • Oceans rise. Empires fall.
Re: The future of lighting flags in FSO
Quote
allow mods to incorporate these changes directly into their files rather than relying on launcher flags to implement their visual design

You had me at this.  :)
"As you sought to steal a kingdom for yourself, so must you do again, a thousand times over. For a theft, a true theft, must be practiced to be earned." - The terms of Nyrissa's curse, Pathfinder: Kingmaker

==================

"I am Curiosity, and I've always wondered what would become of you, here at the end of the world." - The Guide/The Curious Other, Othercide

"When you work with water, you have to know and respect it. When you labour to subdue it, you have to understand that one day it may rise up and turn all your labours into nothing. For what is water, which seeks to make all things level, which has no taste or colour of its own, but a liquid form of Nothing?" - Graham Swift, Waterland

"...because they are not Dragons."

 

Offline Mongoose

  • Rikki-Tikki-Tavi
  • Global Moderator
  • 212
  • This brain for rent.
    • Minecraft
    • Steam
    • Something
Re: The future of lighting flags in FSO
I've always stuck with whatever the default lighting settings were, no matter how good or bad they wound up looking, because having to fiddle with multiple esoteric flags seemed like far more trouble than it was worth. Having something that actually makes logical sense would be a massive improvement. :yes:

 

Offline Iain Baker

  • 29
  • 'Sup?
    • Steam
    • Twitter
    • NOMAD's Reviews
Re: The future of lighting flags in FSO
Sounds good to me 👍
Wanna check out my video games, technology and media website? If so, visit; https://www.nomadsreviews.co.uk/

Interested in hiring my freelance writing, proof-reading, editing, SEO, TTSO, Web Development or Social Media Management services? If so, please messege me at [email protected]

 
Re: The future of lighting flags in FSO
I agree also.  I used to occasionally mess with different lighting settings back in the days of the pre-Knossos launcher, because a lot of people had included their own settings so I could try them out with ease.  But since Knossos didn't include those easy lighting presets, I just stopped bothering and used whatever defaults the mod came loaded with.  I wanted to spend what little free-time I have playing mods, not starting and exiting FSO over and over again to see what THIS setting tweaked...
"Wouldn't it be so wonderful if everything were meaningless?
But everything is so meaningful, and most everything turns to ****.
Rejoice."
-David Bazan

 

Offline Iain Baker

  • 29
  • 'Sup?
    • Steam
    • Twitter
    • NOMAD's Reviews
Re: The future of lighting flags in FSO
I find I always use the same dark and moody lighting presets for any campaign that isn't a meme campaign. So long as I will still be able to do something similar I will be happy  :)

My go-to settings are below if anyone is interested, although I'm open to suggestions about how to improve it. I'm aiming for dark and moody, with lots of dynamic lighting and colour from stars and weapons.

-ambient_factor 70 -spec_point 0.4 -spec_static 2 -spec_tube 0.8 -spec_exp 0.8 -bloom_intensity 15 -no_emissive_light -shadow_quality 1 
Wanna check out my video games, technology and media website? If so, visit; https://www.nomadsreviews.co.uk/

Interested in hiring my freelance writing, proof-reading, editing, SEO, TTSO, Web Development or Social Media Management services? If so, please messege me at [email protected]

 
Re: The future of lighting flags in FSO
If I recall correctly, most of the lighting settings (especially ambient factor) were rendered near useless after the version 3.8.0 which introduced forced HDR. The modularity was also gone as it was no longer possible to turn off all the extra graphic options and play with retail level graphics if one wanted.

For me the version 3.7.4 is still the best looking FSO version when it comes to achieving moody and dark lighting. It had dynamic shadows and deferred rendering but no HDR nonsense. The specular effects were also so much better. The fact that different specular parameters no longer have much effect on the game is very telling.

Sure, the MVP assets are miles better now then they used to be, but the lighting is soooo important to the overall mood of the game. I actually took years of break from FSO after the release of 3.8.0 in 2016. I was so disappointed in the lighting and the fact that SDL2 broke all kinds of ****, like some of the most memorable Force Feedback effects in my joystick. Direct Input worked way better.

-----------------------

A bit ranty post, but still I applaud any efforts in fixing the current lighting system and its parameters  :yes:

 

Online EatThePath

  • 28
  • Laser Lich
    • Twitter
Re: The future of lighting flags in FSO
As a little history, I dabbled in FSO a little around 3.6.12, and only came back to it and got really invested late in 3.8's lifetime. The modern HDR+PBR setup is what I know, so I'm not too well equipped to recapture old magic I don't know.

BUT, the features added for 22.0 in https://wiki.hard-light.net/index.php?title=Lighting_Profiles.tbl may help you achieve what you want. I think a lot of people's dissatisfaction with the HDR comes not from HDR intrinsically, but some of the choices made in implementing it. A few of the most important of those those choices are now configurable, and you can play with them in the lab accessible by pressing F3 from a mainhall. I still need to finish the illustrated guide to them, but the lab is really the better way probably.

-ambient_factor 70 -spec_point 0.4 -spec_static 2 -spec_tube 0.8 -spec_exp 0.8 -bloom_intensity 15 -no_emissive_light -shadow_quality 1 
FYI, unless the wiki is lying to me spec_exp and no_emissive_light do nothing currently. Emissive light is off by default.
Name your damn turrets and sounds! Numbers alone aren't helpful!
"if disco is dead then I am the laser lich"
"...[Warmachine] keeps changing as fast as EatThePath can force the engine to do his dark bidding..."

 

Offline Admiral Nelson

  • Resurrecter of Campaigns
  • 211
  • The GTA expects that every man will do his duty.
Re: The future of lighting flags in FSO
I certainly applaud this effort.  I must say I've always found the current set of lighting flags and such about as comprehensible as Linear A. It would be very useful to have something as critical to the gameplay experience configurable in a straightforward manner, hopefully with some suggest quality "defaults".
If a man consults whether he is to fight, when he has the power in his own hands, it is certain that his opinion is against fighting.

 
Re: The future of lighting flags in FSO
This isn't just a "sounds good" but a resounding "PLEASE, IMPLEMENT IT!" from me. Would solve a lot of concerns I have as a developer.

 

Online EatThePath

  • 28
  • Laser Lich
    • Twitter
Re: The future of lighting flags in FSO
Time to show off what the new flags look like. There may be a few tweaks yet, but this should be fairly indicative of how things can will work

-light sets a mutliplier, defaulting to 1, for all lighting.
-ambient sets a similar multiplier that applies to only ambient light.
-emissive sets a minimum level of brightness for lighting no matter the conditions or what other settings are set to. the old -emissive_light flag remains, now setting this value to something approximating the look with the emissive flag on.

The first three sliders in the lab replicate the effect of adjusting these.


Using both a modern pbr ship and the decidedly non-PBR Erebus. If you compare to my original screenshot set, you can see it gives you a lot more power in both cases.

This is without qaz's new shaders, which are still in development but are very promising. It's possible my changes will be in 22.2 and his in 22.4, but it's also possible both will be in 22.4. We're coming down to the wire a bit on that deadline.

A final note: These controls along with many others are also going in the lighting profiles table. Currently in review is the ability to set modifiers for each type of light or each type of weapon, affecting both size and brightness of the lights, covering all the bases of the old flags and more. These settings are set up to stack with the command line flags; if a user plays with -light 2.0 they'll see every mod as twice as bright as originally designed, and so forth.
Name your damn turrets and sounds! Numbers alone aren't helpful!
"if disco is dead then I am the laser lich"
"...[Warmachine] keeps changing as fast as EatThePath can force the engine to do his dark bidding..."

 

Offline Dilmah G

  • Failed juggling
  • 211
  • Do try it.
Re: The future of lighting flags in FSO
Love everything about this. Damn, the Erebus looks hilarious with high emissive settings though!

 

Online EatThePath

  • 28
  • Laser Lich
    • Twitter
Re: The future of lighting flags in FSO
Just as an update, we didn't get everything needed together for 22.2 so your -spec_... and -ambient_factor will still work in the upcoming verrsion. However, a lot of the mod-side replacements for the flags did make it in, and can be found in Lighting_Profiles.tbl. These already affect the whole light rather than the specular, and if you're updating a mod for 22.2 which uses default command line lighting settings I would recommend at least looking into changing over from them to this.
Name your damn turrets and sounds! Numbers alone aren't helpful!
"if disco is dead then I am the laser lich"
"...[Warmachine] keeps changing as fast as EatThePath can force the engine to do his dark bidding..."

 

Online EatThePath

  • 28
  • Laser Lich
    • Twitter
Re: The future of lighting flags in FSO
Another heads up! these features have started getting merged into development builds. Tonight's nightly should contain the command line flag changes and associated lighting profiles values. Qaz and I have a lot of graphics code working through review right now. If you're playing nightlies you may see things change a bit as each goes in, but the final stages once merged should bring the typical freespace lighting and ship pretty close to how they look now, but better in some key subtle ways.
Name your damn turrets and sounds! Numbers alone aren't helpful!
"if disco is dead then I am the laser lich"
"...[Warmachine] keeps changing as fast as EatThePath can force the engine to do his dark bidding..."

 

Offline Dilmah G

  • Failed juggling
  • 211
  • Do try it.
Re: The future of lighting flags in FSO
Delicious.

 

Online EatThePath

  • 28
  • Laser Lich
    • Twitter
Re: The future of lighting flags in FSO
Well that happened quicker than I expected! All of our lighting and shader changes are in as of the current build. Enjoy the shiny things, let us know if anything breaks, and probably stop using invisible suns to fake planet-shine
Name your damn turrets and sounds! Numbers alone aren't helpful!
"if disco is dead then I am the laser lich"
"...[Warmachine] keeps changing as fast as EatThePath can force the engine to do his dark bidding..."

 

Offline Trivial Psychic

  • 212
  • Snoop Junkie
Re: The future of lighting flags in FSO
Soooo, how does the new lighting system work?  I've been using command-line flags all of this time.  I can compensate by changing things in the lab, but as soon as I quit the game, any of those changes are lost.
The Trivial Psychic Strikes Again!