Graphics Update, V1.2

Discussion in 'Planetary Annihilation General Discussion' started by varrak, March 15, 2014.

  1. SXX

    SXX Post Master General

    Messages:
    6,896
    Likes Received:
    1,812
    This screenshot makes me ask you what happen with atmospheric effects especially one for the sun?
    I know planet still have them, but I feel that sun looks much better before HDR was integrated.

    sun.jpg
  2. bgolus

    bgolus Uber Alumni

    Messages:
    1,481
    Likes Received:
    2,299
    Honestly we're not sure yet. I need to rewrite the sun shader at some point (it's the most expensive shader in the game and was never meant to ship), and we've been bantering around thoughts about the atmospheric shell since before it atmosphere went in.

    There isn't actually a difference between the sun shader between HDR and non HDR mode, and that's part of the problem. For HDR we push the brightness of the sun so it blooms, but it meant we lost some of the original coloring.

    For atmosphere we've talked about doing one of the various Rayleigh scattering approximations, doing a more basic inverted sphere, keeping what we have, or somewhere in between. Really though we just don't know.
  3. staben22

    staben22 New Member

    Messages:
    7
    Likes Received:
    12
    That is absolutely fantastic! You guys are simply amazing. Need I say more?
  4. SXX

    SXX Post Master General

    Messages:
    6,896
    Likes Received:
    1,812
    Yep I noticed that on my laptop with Intel HD3000. On empty system I get something like 17-25FPS, but when I zoom to the sun I got 5FPS. :)

    I didn't mean HDR affect sun shader or atmosphere, but it's was broken somewhere in Beta when HDR was introduced.

    It's great that you think about that because I miss warm colors PA had in alpha and especially how the sun looks. :(
  5. bgolus

    bgolus Uber Alumni

    Messages:
    1,481
    Likes Received:
    2,299
    The sun never have an atmosphere, it was just a cheat with the shader. We changed it from transparent (with some fancy tricks with fresnel falloff) to opaque to try to fix issues with the exposure. If you followed my post on exposure I mentioned we weight the luminance. We actually render out a first pass of weights in to the accumulation buffer for opaque geometry. There isn't an easy way to do this for transparent geometry, so we made it opaque. It's another area we've discussed in the past on how we want to improve it, but it's been pushed back as it's a purely polish thing. The first pass I might do will likely make it look worse first.
  6. maxpowerz

    maxpowerz Post Master General

    Messages:
    2,208
    Likes Received:
    885
    What are you using to animate the sun shader? is it based on simplex or perlin nosie

    edit..
    it's ok i looked in the shader it's simplex :D
  7. bgolus

    bgolus Uber Alumni

    Messages:
    1,481
    Likes Received:
    2,299
    It's a lot of simplex. :rolleyes:
    maxpowerz likes this.
  8. chronosoul

    chronosoul Well-Known Member

    Messages:
    941
    Likes Received:
    618
    Yeah I rushed it, I'll make another one with nukes.
  9. pcnx

    pcnx New Member

    Messages:
    13
    Likes Received:
    12
    There is an implementation with the atmosphere just being added in post, based on rayleigh and mie scattering.
    Goes by parameterizing height above ground and the viewing angles and create two textures to look up the atmosphere color in realtime. Also, with subtracting data from a second lookup you get realistic "aerial perspective" so buildings, units and mountains vanish as they get more distant in the background.
    I implemented the method for my bachelor's thesis and it looked something like this:
    [​IMG]
    And you can seemlessly zoom out from the planets surface to something like this:

    [​IMG]
    tatsujb, glinkot, cola_colin and 8 others like this.
  10. Corang

    Corang Well-Known Member

    Messages:
    772
    Likes Received:
    313
    me like
  11. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
    That's a nice one!
  12. maxpowerz

    maxpowerz Post Master General

    Messages:
    2,208
    Likes Received:
    885
    LavaSnake likes this.
  13. SXX

    SXX Post Master General

    Messages:
    6,896
    Likes Received:
    1,812
    It's interesting because I didn't to notice the difference between this "cheat" and planet atmosphere effects. ;)
  14. Nairou

    Nairou New Member

    Messages:
    2
    Likes Received:
    0
    bgolus, can you explain how you draw the fog of war as a stencil? I've never heard of it being done that way, but it sounds interesting. Do you cover the screen with fog, then cut out volumes for each entity radius, similar to the deferred lighting?
  15. maxpowerz

    maxpowerz Post Master General

    Messages:
    2,208
    Likes Received:
    885
    I just noticed the system editor seems to ignore some of the in game graphics setting's like Virtual Texturing and Shadows..
    In the system editor it seems that virtual texturing is always set to medium or high and shadows are always on regardless of the in game settings.

    Easiest check is set all settings to low or off (except the resolution slider).
    Load a system in the system editor and press "Ctrl-p" and check the FPS.
    Then load the same system to play a game on and do the same FPS check..
    As soon as the game starts you can see the graphical difference between the system editor and in game graphics settings.
  16. bgolus

    bgolus Uber Alumni

    Messages:
    1,481
    Likes Received:
    2,299
    Fog of war isn't done as a stencil, it's done as a distance field, then the distance field is used as an input to the final fog shader.

    So you start with a black buffer, then render "lights" in to the buffer that only render distance to the center of the light. We combine these with a max instead of add to prevent over brightening. The final shader inverts this buffer and uses it as the mask for the rendered "fog".
    Nairou likes this.
  17. SXX

    SXX Post Master General

    Messages:
    6,896
    Likes Received:
    1,812
    If this behavior didn't appear in Gamma I think you're wrong. I spend lot of time in system editor and can say for sure "virtual texture" setting work properly here.
  18. maxpowerz

    maxpowerz Post Master General

    Messages:
    2,208
    Likes Received:
    885
    My settings
    hmmmmn settings.jpg

    Hmmmn , shadows still on , and virtual texturing reacting much slower than in game and a much higher quality texture too... hmmmmn.jpg
  19. SXX

    SXX Post Master General

    Messages:
    6,896
    Likes Received:
    1,812
    I'll test latest version soon. I just checked lot of settings when work on planet preview service and can say for sure "virtual texture" worked fine before. :confused:
  20. maxpowerz

    maxpowerz Post Master General

    Messages:
    2,208
    Likes Received:
    885
    i have noticed that shadows have always seemed to be on for me in the system editor,
    But i only noticed the virtual texturing difference when i was using the system editor as a gauge to see how many planets i could get into a system with decent FPS..

    In game that 1200 planet i posted above can be played on @ 25-30fps.
    In the system editor i seem to lose about 15-20 fps and runs @8-12fps.

    For me it has been like this ever since the new camera system was added..

Share This Page