Atmospheric Scattering

Discussion in 'Ideas and Suggestions' started by Occam's Razer, Sep 7, 2016.

  1. Occam's Razer

    Occam's Razer
    Expand Collapse

    Joined:
    Aug 7, 2013
    Messages:
    1,152
    Hello, all.

    I'm sure that at one time or another, we've all had some qualms with the way things look in the world of BeamNG.Drive. And so have the developers it seems, as one of the major items on the roadmap is the incorporation of physically-based rendering and shaders, enabling such visual features as fresnel.

    However, one thing that was missing from that roadmap insofar as I could tell was a better sky. Right now the optimal choice is the scattersky, which seems to simulate light in an atmosphere at a basic level. However, this doesn't seem to extend to the way the sky actually looks, as the colors seem to simply shift through a predetermined color/value range over the course of a day rather than simulating the way light enters into and diffuses within an atmosphere, resulting in the dreaded 'green sunsets.'


    from here: http://www.oskee.wz.cz/stranka/oskee.php?id=1223749027

    Most forms of digital simulations of atmospheres derive from the real-world physics counterpart: Rayleigh Scattering. Various sources incorporate their own computations for creating the light scattering effect in various engines and simulations. BeamNG's situation is made even simpler by the fact that the game world will be seen almost exclusively at or near the ground, making the calculations global, and in turn, much more succinct than with, say, a flight simulator. And since it's pretty much just a mathematical calculation, the variables can be tweaked as needed to provide a map maker much more control over how their maps will look, while keeping it all dynamic.

    I can't pretend that I know enough about how the calculations work to say with certainty that this implementation would be simple. What with all of the many things that the BeamNG team is currently hard at work removing from Torque, adding anything at all is bound to be a challenge. Still, I'd like to see this get added to the roadmap at some point, if even tentatively. I just find it a bit tough to appreciate the view of the sun setting over Utah when it's just so darn green.
     
    • Like Like x 7
  2. Dr. Death

    Dr. Death
    Expand Collapse

    Joined:
    May 12, 2016
    Messages:
    1,962
    Again, not only you have proven yourself to be a fantastic moddern and designer, but i agree 100% with you. There are just a few things that can do big for the immersion in BeamNG, Atmospheric scatter and having moon and sky produce light would make the game so much better and better looking.
     
  3. randomshortguy

    randomshortguy
    Expand Collapse

    Joined:
    Aug 9, 2013
    Messages:
    1,562
    Thanks for posting this! I have quite a few problems with Torque3D's sky as I have (probably to the annoyance of the devs) complained before. If you look at the parameters for a ScatterSky, Rayleigh and Mie scattering are actually present in the simulation, but they seem to be more just variable names for a sky shader and not actual values used for proper atmospheric scattering.

    Indeed the green sunsets are ugly, and even the daytime sky colours just aren't right; the sky directly above the player is a very cold and desaturated blue, whereas at the horizon the sky is almost light grey-blue. Removing the "fog" layer seems to reveal that the ScatterSky doesn't actually support a very complicated sky shader, since the horizon then looks the same-ish colour as the sky above.

    Untitled.png <top of the image is too cold/desaturated to be right; horizon is too cyan and bright to be right
    Untitled2.png <irl

    Then you can talk about the weird clouds that disappear in front of the horizon, and the fact that they're clearly 2D textures. Here's a shot of the gorgeous vegetation work by LFJHutch that's more or less spoiled by the ugly clouds in the background. Assets of this quality really contrast against the decidedly 2005-era skybox in this game.


    Anyway, not to hijack your thread, but I just want to be verbose in explaining my annoyance with the sky. It's one of those things that's not immediately obvious, but you really start to notice after a while. So I fully support your push to get a atmosphere simulation that looks realistic ingame.
     
  4. Occam's Razer

    Occam's Razer
    Expand Collapse

    Joined:
    Aug 7, 2013
    Messages:
    1,152
    Yeah, I knew that the scatter sky did at least some of the things needed for a full atmo simulation, but I wasn't sure which parts it did or didn't do. Honestly, we may not even need a full scatter simulation in order to improve the visuals; even just a color selector for the sunset/sunrise atmosphere might allow us to inject just the right shade of red nearer the ends of the solar day.

    I did read your complaints on the clouds in some of your past posts, but while I was thinking about that when writing the above, I'm not sure that there's a lot that can be done about that easily. I actually think that the clouds look pretty good for as simple as they are, but when viewed from the side (which they almost always are), it's pretty apparent that they're flat. Perhaps some form of visual offset could be implemented, in which multiple layers of the current-gen cloud system could be stacked on top of one another with the same random seed and scaled toward the current camera position, to fake depth. Going a little farther, their aggregate silhouettes could be used to define a cloud normal, which would allow for light to impact the clouds differently toward the edges. I doubt any of what I just described comes through in text, or would be in any way simple even when compared with the above, so this may come off as rambling.
     
    • Like Like x 1
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice