scp-fs2open / scp-fs2open/fs2open.github.com
A Collected Lighting Feature Wishlist/Proposal
- Dominant language
- C++
- Stars
- 487
- Forks
- 184
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 45
Description
When I was fixing beam lights I noticed several things about the state of Freespace lighting, as well as related options that I think should change. In many cases I'm not locked too hard on any one change and am oepn to input. This is all stuff that I want to eventually do, if nobody else takes it up first, but I want to be sure I'm doing it right, and that it's all changes the SCP wants to include, before I start digging in. Maybe it should be broken up into multiple issues for proper discussion, but it's all related ideas and I didn't want to flood the tracker. However works best, I would very much appreciate some yea or nay or other guidance from the powers that be on any or all of this. Maybe it should be workshopped on the forums too for user visibility?
### SPECULAR LIGHTING AND THE LIGHTING FLAGS
The community seems to generally view the lighting flags as general brightness controls, but they only affect the specular component of the lights, not the diffuse. I'm not too versed in the math or physics behind there being two different lighting components, but I can talk about the effects I've observed. That effect is that some ships, in particular (?some?) pre-PBR ships of which there are many still in use, are lit only by diffuse lighting and see no change from the flags.
I think that should change. If I'm going to scale the lighting, I want to scale it all. Maybe it would make sense to implement a second set of flags for diffuse lighting. Maybe it would make sense to make the specular flags scale both. Maybe it would make sense to make it a game option or flag to make the specular flags scale both but leave the default behavior alone. Maybe something else would be best, but I don't think the current state is good.
In the long run I'd love to see the lighting flags retired in favor of in-game lighting settings, but for now flags are the tools we have and I'd rather those tools be good.
### AMBIENT LIGHTING FLAG
The ambient lighting flag is insane. Maybe there's a niche reason to want what it does, but needing a 150 word wiki entry, a general understanding of the actual ambient lighting numbers in the missions you'll be playing, and a calculator in order to pick a good value for what would in a sane world be a simple multiplier attached to a slider is nuts and bad. If I recall correctly the formula used can also distort the hue of the ambient lighting in some cases, which is probably not noticeable much but is just in principle bad.
IMO the flag should just be replaced with saner behavior. This'll break everyone's lighting presets though I guess, so maybe a different approach should be taken. Maybe I'm wrong and this is actually how lighting is typically scaled under the hood for unintuitive reasons, stranger things have happened, but there's got to be a more intuitive way to present it to users if so.
### LIGHTING OPTIONS/FLAGS AND SCALE
This one is a little speculative, but maybe it'd be cool to throw in a user settable scalar on lighting size? This way users could flex with their big strong GPUs by cranking that up and seeing beams light up everything and whatnot, and they could compensate for the increased brightness by turning down the brightness with the existing flags.
### LIGHTING FLAGS AND MINIMUM VALUES.
I can imagine why someone would put a minimum value in the light scaling flags, and I disagree with it vehemently. Hacking together a build that lets me black out light types completely has led to both very useful debugging sessions AND very striking visuals. Remove the floor, let users live in darkness should they so choose. But let the emissive flag take precedence...
### ACCESSIBILITY
It's possible that 'fixing' the ambient lighting flag would make it harder to maintain visibility in dark levels for people using the flags for that. To safeguard against that I would suggest allowing the emissive flag to accept a parameter to act as a new minimum brightness for ambient lighting.
### MODDER TUNING OF WEAPON LIGHTS
Right now, the light cast by weapons is only very slightly adjustable by modders. Sizing of laser and missile lights is fixed, laser light color is controlled by the laser color table entry, IIRC beam color is too, missile color is always white, and beam light width is controlled by beam width. That works, and the defaults aren't bad, but I think it's holding things back. Imagine if Shivan megabombs cast an eiree red light that reached their target's hull, for instance. Utterly impossible now, and that’s a shame.
I don't know if it'd make sense to give modders separate control over specular and diffuse components of these lights. If it does, then let it be so.
### LIGHTING MAGIC NUMBERS
Right now the lighting process is rife with magic multipliers. A beam creates a tube light based on it's width, times a constant, and then that size is multiplied by a magic number when handed off to the GPU. Point lights go through a similar process but are multiplied by a *different* radius. If/when weapon light controls are handed over to modders I think these should be as much as possible baked out, so that any values that modders enter in are exact meter radii and are passed through the code to eventually reach the GPU without having been touched by any static or hard coded values. Situational or optional scalars are fine of course.
### ATTENUATION FORMULA
As far as I recall, all lighting in FSO currently uses linear falloff equations. I believe it would look better if it used one of the equations that better mimicked realistic lighting falloff. The effect can be subtle, but I can try to produce visual comparisons that show it if that is required.
### MISSION LIGHTING CONTROLS
This is a perhaps only tenuously connected to the rest, but I think the mission format should allow the direct overriding of the directional lighting. Use the existing suns as a default, but mission makers shouldn't have to add new table entries to that to get bespoke lighting setups for a mission.
That's what I've got. Again, I'd very much value some feedback on the desirability and best route for these.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.