Search Unity

[released] Overcloud - Volumetric Sky And Lighting

Discussion in 'Assets and Asset Store' started by Fewes, Mar 25, 2019.

  1. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    126
    It's already on the list to add compatibility to but I just haven't had the time yet. It'll be up on the compatibility page this upcoming week for sure.
     
    KarloE likes this.
  2. KarloE

    KarloE

    Joined:
    Aug 26, 2013
    Posts:
    140
    If you saw recent post, nevermind it, I seemed to missed a step in the setup of lux water.

    Also got a question, which is the best way to change at which height the clouds are forming?

    There is a slight problem with the underwater look of the lux water combined with overcloud:

    http://prntscr.com/om0w8w

    Any ideas how to get rid of that?
     
    Last edited: Jul 30, 2019
  3. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    126
    Hmm, looks like Lux is not rendering its underwater fog for a sliver of the horizon. Could you check the frame debugger for the order in which things are drawn? Lux should be drawn afterwards no problem but it looks like it is failing for some reason.
     
  4. KarloE

    KarloE

    Joined:
    Aug 26, 2013
    Posts:
    140
    Fewes likes this.
  5. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    126
    This might be something Lux has to fix on their end, but I'll check it out and see if I can get around it. Thanks for the video, it makes it much easier to pinpoint!
     
    KarloE likes this.
  6. KarloE

    KarloE

    Joined:
    Aug 26, 2013
    Posts:
    140
    I can probably fix this by using lux water Managed Transparent Materials. I would just need to know where to find the material used by the clouds in question. Or is it generated at runtime?

    Im not even sure what it is thats getting rendered, part of it are 2d Clouds, but here is me removing them: https://gyazo.com/bedb31c08b4f2ce7b4fb9173ffee09ed

    Not sure what is left?

    EDIT: Ok Im silly, I didnt notice that there are 2 of those layers, I just deleted 1. Ok so basically its 2D clouds that are making the problem.
     
    Last edited: Jul 30, 2019
  7. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    4,852
    I had a closer look at your capture of the frame debugger (great thing!) and i think that the "thin line" you get is the gap between solid geometry (terrain) and the water surface - or the hemisphere used for cloud rendering and the water surface.

    due to the rendering order:
    1. underwater
    2. clouds
    3. water surface from below
    only the water surface from below may occlude the clouds.

    but we need the underwater post effect to do so as well.
    so my first try would be to move the cloud rendering from CameraEvent.BeforeForwardAlpha to CameraEvent.AfterSkybox.

    @Fewes Do you see any problem in moving cloud rendering up in the queue?
     
  8. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    126
    Thanks for the reply! Unfortunately yes. The reason the clouds are drawn in BeforeForwardAlpha is so translucent materials can be mixed with the clouds using the clouds depth buffer.
    Are you using ImageEffectOpaque to render the underwater effects? If so I could look into moving at least part of the rendering of OverCloud there so it can be ordered manually in the inspector.
     
  9. KarloE

    KarloE

    Joined:
    Aug 26, 2013
    Posts:
    140
    Hey, yeah the problem is the post effect is not rendering over the clouds, so there is a gap once I ran out of surface to cover them. @larsbertram1 here is my setup, ZWrite is On(you asked me that previously): http://prntscr.com/omebb3

    Also, when I go deeper, the clouds become more visible(since the angle is greater towards them so I can see more of it), just wanted to note that, which confirms whats happening:
    http://prntscr.com/omee0d

    So If I put ZTest Never in the water settings, I get this:
    http://prntscr.com/omeesy

    https://gyazo.com/100b04326dc05ad55c508e9344094811

    Anyhow, just confirming what is the case. :)

    Thank you both for helping out I am sure we can figure something out.


    BTW as I mentioned, seems the only problem are 2d clouds, I think it is because only them go far enough to go pass the water surface that covers the clouds normally. So maybe there can be some separate solution for them, compared to volumetric clouds? Not sure, just throwing ideas.
     
    Last edited: Jul 31, 2019
  10. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    4,852
    that was a dumb question :)
    ZTest Never means: never draw the water. so the result is expected.
     
  11. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    4,852
    and that would not be possible if they used CameraEvent.AfterSkybox? i don't see why...
    yes.
     
  12. KarloE

    KarloE

    Joined:
    Aug 26, 2013
    Posts:
    140
    I understand, just wanted to show the whole clouds plane, and what actually is the line I see! :)

    But I realize now its already shown on the gif I sent previously, honestly I forgot about what I have shown. :)
     
  13. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    126
    Actually, you might be right! KarloE, could you try going in OverCloud/Scripts/OverClouds.cs and change all occurances of "CameraEvent.BeforeForwardAlpha" to "CameraEvent.AfterSkybox" (there should only be two) and see if that fixes it?
     
  14. KarloE

    KarloE

    Joined:
    Aug 26, 2013
    Posts:
    140
  15. KarloE

    KarloE

    Joined:
    Aug 26, 2013
    Posts:
    140
    Hey, unfortunately I have another problem, OverCloud wise. :)

    When I get really close to water, this happen ( so if im close to water surface looking up): https://gyazo.com/3a29334e3ba577b593021fd2a7b22b32

    Any clue why that would appear? I also noticed it when I make the time go too fast, the same kind of flickering appears.

    Oh ok, so seems like the volumetric clouds completely dissapear when im underwater looking up:

    https://gyazo.com/7420f23ea96803878f7f4a77f86cd1df

    The flickering seems to be some mid-state that makes them appear/dissapear real fast, I think. Not sure.


    EDIT: Ok I figured it out. I happens when Camera is near Y = 0, and is not related to shaders at all, seems so. My water was at 0.0 Y, thus it seemed like they dissapear because of the water but they do because of the Y. Not sure if this is the intended behaviour and what is the reason for that.
     
    Last edited: Jul 31, 2019
  16. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    4,852
  17. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    126
    Great to hear it works, I'll include that in the patch.
    What you are seeing in regards to the flickering is the camera culling the clouds because the "planet sphere" intersects the view rays.This is needed to allow clouds to be occluded by the horizon, but it is not required if the camera is inside the sphere (which it is in this case). It is very easy to fix so you can count on it also making it into the patch.
     
    Last edited: Jul 31, 2019
  18. KarloE

    KarloE

    Joined:
    Aug 26, 2013
    Posts:
    140
    Got it, thanks a lot for all the effort. :)
     
    Fewes likes this.
  19. whiskers434

    whiskers434

    Joined:
    Sep 23, 2014
    Posts:
    8
    Hi,

    The shadows from my building objects have a strange "shake" to them as the sun moves.

    Any tips on what settings to use to reduce this "shake"

    Thanks
    ~whiskers434
     
  20. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    126
    Hi!
    This is most likely due to directional light shadow instability. Try:
    1. Reducing your shadow distance under project settings.
    2. Increasing your camera near clip plane.
    3. Reducing your camera far clip plane.

    Let me know if this works for you, thanks!
     
  21. whiskers434

    whiskers434

    Joined:
    Sep 23, 2014
    Posts:
    8
    thanks, tweaked those settings and it has reduced the shaking
     
    Fewes likes this.
  22. PhoenixAdvanced

    PhoenixAdvanced

    Joined:
    Sep 30, 2016
    Posts:
    135
    Hello,

    I am interested in this asset, but I want to know if it supports non y-up orientation?

    IE, can I rotate the asset to any orientation?

    I am working on a space game with spherical worlds, and so my players up vector may not be along the y-axis.

    Thanks!
     
  23. ProtoPottyGames

    ProtoPottyGames

    Joined:
    Dec 18, 2015
    Posts:
    42
    Hi. I just happened to catch the conversation toward the top of this ( @threadlarsbertram1 , @Fewes , @KarloE ) about Lux Water compatibility and was wondering if that all turned out to be a thing that worked. If so, what might be the best place for me to find information on getting that set up?
     
  24. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    126
    OverCloud does not support spherical worlds, nor does it support rotating its world axis as it was made with default Unity scenes in mind.

    Lux support is coming, as well as Ceto. I know I stated in a previous post that it would be out by now, but that turned out to be an optimistic guess. I'll be working on it, plus a new cloud stamp feature (which will allow you to place clouds manually, or reversely punch holes in existing cloud coverage) in the coming weeks. Thank you for your patience!
     
    jashan likes this.
  25. PhoenixAdvanced

    PhoenixAdvanced

    Joined:
    Sep 30, 2016
    Posts:
    135
    Thanks for that!
     
  26. KarloE

    KarloE

    Joined:
    Aug 26, 2013
    Posts:
    140
  27. Migueljb

    Migueljb

    Joined:
    Feb 27, 2008
    Posts:
    436
    Don't forget to add RAM integration it's the best for rivers. Rivers and clouds go hand in hand:)
     
    KarloE likes this.
  28. KarloE

    KarloE

    Joined:
    Aug 26, 2013
    Posts:
    140
    So I fiddled around with the options, seems that the issue dissapears when I disable the scattering mask. Not sure why it happens though, it definitely seems to be connected to the scattering mask.