Mad_Shell Posted October 2, 2023 Posted October 2, 2023 This work is not mine, I copy paste what the dude (Maya on discord) wrote on the discord bug channel so his work attracts attention from ED. "Hi, has anyone thought that the sunrises & sunsets in DCS are a bit too purple? I'm a graphics programmer who's familiar with Eric Bruneton's (which is used in DCS) and Sebastien Hillaire's atmosphere models and I found a "bug" in their implementation which causes the sky to be too purple and developed a tool called ARPC which allows accurately calculating the atmosphere parameters. Basically both Bruneton's and Hillaire's models pick 3 primary wavelengths for red, green and blue to determine Rayleigh scattering and Ozone absorption coefficients, but this method simply doesn't have enough precision to take especially the Ozone absorption spectrum into account. ARPC on the other hand uses CIE 1931 XYZ color matching functions to take a weighted average of the coefficients for all wavelengths when calculating the coefficients for red, green and blue. This approach gets much closer the spectrally rendered path-traced reference, which has more blue-tinted sunrises / sunsets. It also calculates a few other parameters such as the scale height and ozone distribution more accurately, by using ISA instead of the constant temperature atmosphere used in Bruneton's and Hillaire's models. If anyone's from ED is interested, I can provide more technical details regarding how ARPC works. It's already open source (MIT licensed, so can be integrated to any commercial project without any royalties) and available on GitHub: https://github.com/FarukEroglu2048/ARPC Here's a quick comparison with the ARPC coefficients, I changed the coefficients in the shader code for it: Default Coefficients: ARPC Coefficients: Here's another comparison using a ShaderToy implementation of Hillaire's atmosphere model: Hillaire's Original Coefficients: ARPC Coefficients: To validate my approach with ARPC, I used a root finding algorithm which tried to find the scattering and absorption coefficients which minimized the error between the spectrally rendered reference and also converted a reference spectral light source and the transmitted light spectrum after it passes through the atmosphere into sRGB to solve for the coefficients. In both cases, the expected coefficients almost perfectly matched the coefficients calculated by my approach: Under the spectrum calculations section, the first line is Rayleigh scattering coefficients and the next line is Ozone absorption coefficients for red, green and blue, calculated using ARPC. And below them, the array shown by “x” contains the Rayleigh scattering and Ozone absorption coefficients that match the spectrally rendered reference the best, found by the root finding algorithm. You can see that they are in great agreement with the ARPC coefficients. Even without more rigorous tests like that, the results with the ARPC coefficients are visually very close to the spectrally rendered path-traced reference." 8 6
SpecterDC13 Posted October 2, 2023 Posted October 2, 2023 Finally. This amazing work and hopefully ED sees this and implements it or changes it. The sky is waaay too purple in the SIM. My PC: GPU-AMD 6800XT OC / CPU- AMD RYZEN 5800X OC / 32 GB RAM 3200Mhz / 1TB SSD / 2TB HDD / 500GB M.2 / Monitor: 34" Ultrawide Samsung 1000R Curve / WinWing F16EX HOTAS / TM Cougar MFDs / TM TPR Rudder Pedals / TrackIR5 / ICP
ED Team BIGNEWY Posted October 3, 2023 ED Team Posted October 3, 2023 Hi, I will ask the team to take a look. thank you 3 Forum rules - DCS Crashing? Try this first - Cleanup and Repair - Discord BIGNEWY#8703 - Youtube - Patch Status Windows 11, NVIDIA MSI RTX 3090, Intel® i9-10900K 3.70GHz, 5.30GHz Turbo, Corsair Hydro Series H150i Pro, 64GB DDR @3200, ASUS ROG Strix Z490-F Gaming, PIMAX Crystal
ED Team BIGNEWY Posted October 3, 2023 ED Team Posted October 3, 2023 I have spoken to the team and they are aware, we do plan to revisit atmosphere in DCS in the future. thank you 6 5 Forum rules - DCS Crashing? Try this first - Cleanup and Repair - Discord BIGNEWY#8703 - Youtube - Patch Status Windows 11, NVIDIA MSI RTX 3090, Intel® i9-10900K 3.70GHz, 5.30GHz Turbo, Corsair Hydro Series H150i Pro, 64GB DDR @3200, ASUS ROG Strix Z490-F Gaming, PIMAX Crystal
Recommended Posts