✔️ NEW FEATURE: Two Horizon Colors (ADF/TAW)
Posted: 2024-Jan-19, 21:38
TFXplorer already supports two horizon colors: One towards the Sun and one opposed to it.
At the moment, this feature is used exclusively by Ace Combat 3, which uses it heavily in its missions to improve situational awareness.
But we know that it was implemented experimentally in f22, too. Specifically, this old screenshot from Polak exists (source):
F22 calls it East/West palettes. From redxxxx.txt:
Even without East/West palettes being active, this feature can easily be enabled in TAW by setting the sun color for second horizon color. It seems the sun color is always at index 255. Multiply by 1.5 to brighten it up. This gives a really nice effect:
There is one situation, however, where it is not nice – at night. The Moon is too bright in TAW, most likely due to it being programmed before linear color space was established.
So this feature could be implemented and it’s only a few lines of code, too. In DIDtoUAW F22 scenarios.cpp, in getSkyColors(), replacewithSome kind of if should be added to tell night apart from day, and to make horizonSunny darker instead of light then:This seems like a low-hanging fruit. But I’ll postpone it because I have too much stuff to fix right now.
At the moment, this feature is used exclusively by Ace Combat 3, which uses it heavily in its missions to improve situational awareness.
But we know that it was implemented experimentally in f22, too. Specifically, this old screenshot from Polak exists (source):
F22 calls it East/West palettes. From redxxxx.txt:
Code: Select all
;────────────────────────────────────────────────────────────────────────
; new palette commands
; <east_palette> <start_altitude> <end_altitude> <west_palette>
; nb. (1) The altitude is specified in feet
; (2) If no west palette is given only one
; palette will be used within the altitudes.
;────────────────────────────────────────────────────────────────────────
So this feature could be implemented and it’s only a few lines of code, too. In DIDtoUAW F22 scenarios.cpp, in getSkyColors(), replace
Code: Select all
store(result->horizonSunny, GFX::linearFrom(load(palette[143])));
Code: Select all
store(result->horizonSunny, GFX::linearFrom(load(palette[255])));
result->horizonSunny.red *= 1.5f;
result->horizonSunny.green *= 1.5f;
result->horizonSunny.blue *= 1.5f;
Code: Select all
if(utc.i17f15 < 6 * 60 * 60 * 32768 || utc.i17f15 > 22 * 60 * 60 * 32768) // before 6 or after 22?