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:
    253
    Could you upload a video of the issue? It's a little hard to tell what might be the cause from the picture. Could be camera clip plane related but unsure.

    Great to hear you got it working in standard :)
    I'd like to support URP but it's a question of time. Currently I have too much on my plate to promise anything but it is something I am looking into.
     
    ShiftedClock and mariuslesauter like this.
  2. mariuslesauter

    mariuslesauter

    Joined:
    Nov 5, 2019
    Posts:
    4
    I know this situation just too well. Keep up the great work! :)
     
    ShiftedClock and Fewes like this.
  3. YolanOTHER

    YolanOTHER

    Joined:
    Oct 23, 2016
    Posts:
    47
    So I turned it all the way off and tried a variety of settings and there was no change.
    upload_2020-9-17_8-25-43.png
     
  4. Tzirrit

    Tzirrit

    Joined:
    Sep 9, 2014
    Posts:
    23
    Does this GIF help?


    I've played around with the clip plane, but so far it didn't have any effect.
     
  5. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    253
    Since you had trouble with the wetness smoothness, can you check if the wetness albedo darken effect is the culprit here by turning it down on the weather preset? I had a look at your video and it looked like the dragon faded to black once it got beneath the clouds which might indicate this is the issue.

    Ah I think I know what might be the issue here. Can you try moving your character up a few meters, then look up again? It might be the planet intersection code in the cloud shader suffering from precision issues if the camera height is very close to 0
     
    Tzirrit likes this.
  6. Tzirrit

    Tzirrit

    Joined:
    Sep 9, 2014
    Posts:
    23
    Haha yes, that solved it. The character was standing on a plane at 0,0,0. Moving the ground plane up by 0.5 already helped!
     
    Fewes likes this.
  7. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    253
    Good to hear! I'll see about preventing this in the next update. It should be noted that the asset will perform best if the camera stays a few meters above 0 at all times.
     
    Tzirrit likes this.
  8. Tzirrit

    Tzirrit

    Joined:
    Sep 9, 2014
    Posts:
    23
    I guess the main target application was for "flight" games, where being close to or passing trough clouds is key. Is it still suitable enough for ground based games where I want a nice sky as background - if I just make sure the main camera will stay at a certain hight (e.g. 10)?

    So far, performance impact is small, but things always add up and it might me too much just for a nice backdrop.
     
    Last edited: Sep 17, 2020
  9. dvalles

    dvalles

    Joined:
    Nov 15, 2014
    Posts:
    9
    @Fewes Where are the quality options? In the vr demo you can switch between quality levels.
     
    Last edited: Sep 17, 2020
  10. YolanOTHER

    YolanOTHER

    Joined:
    Oct 23, 2016
    Posts:
    47
    So I don't notice any changes when I adust wetness darken. I have the same issue with all presets as well. If I set the lat and long to 0 it becomes noticeable right at 18:00. It is ok up to at least 17.999, but as soon as time hits 18 the blackness hits.
     
  11. silentpundit

    silentpundit

    Joined:
    May 2, 2020
    Posts:
    14
    2019.3.13f1
     
  12. BraniDev

    BraniDev

    Joined:
    Aug 3, 2019
    Posts:
    21
    Only Skybox is working and My Lights stop working and i getting this error : Invalid pass number (1) Graphics.Blit( Material "Hidden/SeparableBlur" with 1 passes i getting this error in Editor 999+ :/ could you please help me?


    added pictures :





    https://imgur.com/qYyf6vW
    https://imgur.com/Hv5Ahx9
     
  13. MasonWheeler

    MasonWheeler

    Joined:
    Apr 2, 2016
    Posts:
    179
    This is probably just me missing something incredibly obvious, but for the life of me I can't find the answer: where is the altitude of the cloud plane set? I have a mountain scene where it seems like the clouds are all rendering below my terrain, and I want to move them higher up, but I just can't find how that's done!
     
  14. Tzirrit

    Tzirrit

    Joined:
    Sep 9, 2014
    Posts:
    23
    For the volumetric clouds, you can set it in the weather presets (with different altidudes for every preset).
     
    Fewes likes this.
  15. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    253
    While it was initially created for a flight game, the asset itself targets pretty much any environment as long as you can have a camera far clip plane around a few km (shouldn't be a problem for most setups.)

    The quality is set via the OverCloudCamera component. The script which controls this in the demo is included in the demo scene, so you can reverse-engineer that if you wish to implement a similar level of control.

    I've seen this issue reported before. What version of Unity are you running? Are you using the standard rendering pipeline?

    Just like Tzirrit mentioned, this is set on a per-weather preset basis. When the system transitions from one preset to another, the cloud plane will smoothly move to the new altitude. Additionally, you can control the altitude of the 2D cloud planes using the interface on the main component.
     
  16. MasonWheeler

    MasonWheeler

    Joined:
    Apr 2, 2016
    Posts:
    179
    ...and there it is. Thanks!
     
    Fewes likes this.
  17. MasonWheeler

    MasonWheeler

    Joined:
    Apr 2, 2016
    Posts:
    179
    One more question. I tried adding the Overcloud prefab to a scene with a sunset skybox: fairly dark with a beautiful, dramatic red sky and rays of light filtering through clouds. Suddenly the skybox is gone and everything is very bright and blue. I go into the Atmosphere tab and uncheck "override skybox material," but my sky does not go back to normal. How do I fix this?
     
  18. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    253
    Did you try reassigning the original skybox material after unchecking override skybox material? All it does if checked is to check if the skybox material (under the Lighting settings tab) is set to the OverCloud one, and replacing it if it isn't.
     
  19. Bennidhamma2

    Bennidhamma2

    Joined:
    Jan 5, 2019
    Posts:
    23
    Hello!

    Thanks for this very cool asset. I'm excited to add it to my game. I purchased through the Humble Indie bundle promotion, so I understand if you aren't able to prioritize support for a reduced price customer like myself :)

    One of the actions my players can do is build solar panels, which I've been raycasting to a very simple sphere that I rotate around the game terrain to simulate a sun moving around the game. It works well enough, to determine if the solar panel is collecting energy. but the sun movement is a lot more complex in Overcloud. I'd like to see if I can get this working though.

    Do you have any idea how I could either position my sun sphere to follow the sun movement in overcloud, so I can do my linecast tests? It looks like the sun positioning happens in the skybox shader, which I'm guessing will make it hard to directly access the position from a mono behavior script.

    Any thoughts or help would be greatly appreciated,

    all the best,

    -- ben
     
  20. MasonWheeler

    MasonWheeler

    Joined:
    Apr 2, 2016
    Posts:
    179
    Just checked, and it looks like my original skybox is still there, but the Time of Day system is overwhelming it. If the Time of Day is set to daylight hours, the skybox is completely washed out by the sun, and if it's set to night hours or disabled, the scene becomes so dark that the skybox is basically the only thing clearly visible! :confused:
     
  21. neptoonism

    neptoonism

    Joined:
    Aug 19, 2019
    Posts:
    13
    Wow! This asset is amazing and I also got it on the 'Unity Games and Game Dev' Humble Bundle! I did run into a small issue when importing the asset into a fresh built-in pipeline project template using Unity 2020.2.0a19.2490.

    UnityException: Texture 'ZSlice_0000' is not readable

    I added this on line 150 of CloudNoiseGen.cs before tex.GetPixels() is called.

    Code (CSharp):
    1. string assetPath = AssetDatabase.GetAssetPath(tex);
    2. var texImporter = AssetImporter.GetAtPath(assetPath) as TextureImporter;
    3.  
    4. texImporter.isReadable = true;
    5.  
    6. AssetDatabase.ImportAsset(assetPath);
    7. AssetDatabase.Refresh();
    as per this stack overflow suggestion
    https://stackoverflow.com/questions/25175864/making-a-texture2d-readable-in-unity-via-code
    I was able to run the OvercloudDemo scene after having done that. I wasn't sure if this might be something others would run into as well.

    Anyway, the asset is amazing and I think it's terrific that it's part of the bundle! Thanks!
     
    Fewes likes this.
  22. TwiiK

    TwiiK

    Joined:
    Oct 23, 2007
    Posts:
    1,703
    Disclaimer: This post became very long and only parts of it applies to this asset and it's developer, but I hope it's valuable feedback nonetheless. :)

    I bought the latest Humble bundle which among dozens of other assets included this one. I have no actual interest in this asset or really none of the other assets in the bundle, I just like looking at various Unity projects for inspiration once in a while. This is just to say I more or less randomly chose you for this feedback as it seemingly applies to nearly every asset in this bundle, and therefore probably most assets on the Asset Store. And if parts of this feedback should be directed at Unity instead of you feel free to let me know.

    So many of the assets in the bundle, including this one, share the same problem and it's a problem I can't wrap my head around. Your last review as of this writing is from a guy who most likely bought the Humble bundle, same as me, and just installed the asset, looked at it, and thought it looked kind of crappy compared to the advertising. And it does. No one can deny it. Compared to the the release trailer the initial experience of loading this asset up screams false advertisement.

    But unlike that person who just left you a poor review I'm diving into this to try and understand the problem. Maybe I want to make my own assets in the future and it would be nice to get some experience from an actual Asset Store developer or maybe I just want to help. :p First of all, I'm certain this has nothing to do with false advertisement, but probably more to do with Asset Store limitations, but in this case it's also clearly due to poor documentation or setup on your part.

    The problem: Installed directly from the Asset Store into a new project this asset looks absolutely nothing like advertised.

    This is how it looks imported directly from the Asset Store into a new Unity 2019.4.9f1 project:
    overcloud-straight-from-asset-store.jpg

    Clearly nothing like the pictures, the demo or the trailer. So what is actually the problem here and how do I fix it? Looking at the documentation I see this:
    We both know that this isn't true as so much of a project's look in Unity comes from the actual project settings and this asset doesn't import any project settings. The next section in the documentation confirms this isn't true:
    That is fairly straight forward and immediately the look improves drastically:
    overcloud-linear-color-space.jpg

    But it's still missing a lot. And now the ambiguity starts:
    Now it's suddenly up to me to decide the look of this? I just want to make the demo scene look like the pictures and the trailer. After that I can begin to experiment with the asset, but first I want to verify that what I bought actually looks as advertised.

    There was no other steps in the Getting started section of the documentation, but the most prominent feature that is missing is cloud shadows. Searching for shadows in the documentation leads me to a section on how to get them. I tried the suggested fix of switching to the deferred rendering path and using a custom deferred shader, but I don't think the result looks good:
    overcloud-custom-deferred-shader.jpg

    This made the clouds cast shadows, but the terrain still doesn't so it looks broken and weird.

    Instead I just increased the shadow distance. I increased it to 15000 and now it looks a lot better:
    overcloud-15000-shadow-distance.jpg

    Note: The cube visible under the plane's wing in the last screenshot and the one before that is just me experimenting with and realizing the insane scale of this scene. The cube is 500x100x500. That cube alone is way bigger than any scene I've had in any project. This is why I enjoy looking at assets like these and other people's projects once in a while. Just to see how different things can be. :)

    But back to the issue at hand, another thing clearly missing when comparing my result to the trailer is bloom. The on-screen instructions even informs me how to toggle post processing, but this does nothing and looking at the code it's clear why as that functionality is defined out.

    So I install the post processing package, disable the built-in tonemapping, enable aces tonemapping (I probably don't have to, but I never actually tested without) and also enable bloom. Now it's starting to look pretty F***ing great:
    overcloud-bloom.jpg

    Note: I spent quite a bit of time tweaking the Overcloud sun intensity and the bloom values before I found something I liked. I wanted a lot of bloom on the sun, but not everything else to be bloomed out. In the I ended up increasing the default sun intensity from 100 to 1000. Likewise I increased the lightning emission and light intensity nearly ten fold as well to get some really sick looking lightning strikes during storms.

    But I'm still not happy. I don't seem to have volumetric sun shafts like those shown in the trailer. I've tried recreating the scenario by using fog and flying next to the mountains, but I get no visible volumetric lighting from the sun. And I actually have no idea how to fix that.

    Edit: Fog ambient intensity was the setting I was missing apparently. There may be other ways of achieving the look in the trailer, but for the default Foggy preset this was set to 1 which I guess makes the fog uniformly lit by the sky or something so that you're not able to see the sun shadows in the fog. Reducing this towards 0 gave me the look I was after.

    And it took me a lot of time of fiddling about to even reach this point. WIth me writing this post it's taken me multiple hours so far. So why do I have to do this? Why does it not look like advertised directly out of the box?

    All of this is just to say that this is surely leading to you getting more negative reviews (and potentially refunds) than what you would otherwise and I can understand it fully because it's an extremely frustrating first time use experience. I've been developing with Unity since version 2.x and I feel like I know my way around, but I find using assets from the Asset Store to just be infuriating due to issues like these.

    So how much of this is Unity's fault, how much is your fault and how can it be fixed?

    Like I said initially I've had more or less the same experience with most other assets in the bundle so it's safe to deduce this is an issue with many assets on the Asset Store. Many of the assets in the bundle I just gave up on. I couldn't get anything even remotely close to the advertised look of the asset. The reason I persevered with this one is that it does look pretty F***ing fantastic... once you get it setup that is. I can't imagine anyone with give you low ratings for the look of this asset when it's setup properly. And the demo scene you've provided is amazing fun to play around with. It's almost a game in itself. In fact flying around in it reminds me of GTA 5 and how impressed I was with the clouds and weather systems in that game.

    I need to reiterate that none of this criticism is towards the asset itself. None of the fixes or changes I've had to do were needed to get the asset working, they were only to try and recreate the look of the demo you've used to promote the asset. If I were to actually use this asset in a project of my own I would get familiar with it and change all the settings to suit my project. But I don't think you or apparently anyone else on the Asset Store realize how important it is to see exactly what the asset is capable first hand before you start tweaking it yourself. That is to see how the asset developer intended for it to look. I want to see how you intended for it to look so that I know what you consider good settings before I start tweaking the settings to see what they do. And it's crucial that I get this look in Unity on my own. Seeing it on Youtube and not being able to recreate it myself is what this whole problem is about.

    The main problem the way I see it is that you bundle your demo scene with the actual asset when the demo requires a tailored project to look and work correctly while the actual asset doesn't require any of that and is only bloated by the inclusion of the demo scene.

    The exact same problem is true for nearly every other asset out there and developers are forced to bundle their assets with setup manuals that are multiple pages long just to try and ensure their users are able to recreate the look they intended.

    Is this really not solvable by you as an Asset Store developer in a better way?

    I tried importing another asset into Unity 2020 and there the process is completely different and assets now behave as packages. I'm not sure if this opens up more possibilities for Asset Store developers? For a lot of Unity's official packages the samples are a separate install from the actual asset/package so I would imagine that you could put the entire demo into an optional install and also bundle project settings, package dependencies etc. into that. And then it would be clear that only if you want the demo scene do you install that and it will overwrite your entire project so do that in a fresh project. But because I have no experience with asset development I don't know.

    My actual criticism towards you based on what you're providing at the moment is that the documentation is lacking. It should at the very least have a section on how to recreate the look of the demo scene with precise steps and no ambiguity. I would venture the steps are somewhat similar to those I've described here, but like I've said I've still not succeeded despite spending hours on this and now I'm unsure what I need to do to get that final piece.

    That is unless there is a better way to provide demo scenes for Asset Store assets. I have the latest version of every major Unity version installed on my computer because I know how important it is to match the correct Unity version to a project to ensure it behaves correctly and in my world the ideal way to provide the demo scene for an Asset Store asset would just be a zip-file containing the entire project intended for a specific version of Unity, but I understand that's not a feasible solution. But there has to be something...

    Edit: Just wanted to add that some of the assets in the bundle are Unity's own Asset Store Originals, which I assume are officially supported assets. I'm not going to get into how messed up it is that Unity are now selling assets on their own Asset Store, but some of these assets share the the same problems described here despite even requiring a specific version of Unity. And they don't include any documentation at all so it's entirely up to the end-user trying to recreate the advertised look seen on the Asset Store. So this is certainly not a problem Unity is capable of fixing on their own.
     
    Last edited: Sep 23, 2020
    ikemen_blueD, Fewes and MasonWheeler like this.
  23. MasonWheeler

    MasonWheeler

    Joined:
    Apr 2, 2016
    Posts:
    179
    ...anybody?
     
  24. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    253
    It sounds like the best way to do this is to simply grab the environment sun direction in your script that calculates the solar panel exposure. You can get the vector with RenderSettings.Sun.transform.forward, then just make it negative for your raycast away from the solar panel. If you want, you can post/PM me the code you are already using for the raycast and I can try and modify it to do this.

    Sorry for the late reply, got a lot of support work piled up currently. That sounds like the skybox is using some weird shader that is affected by the sun. Are you using a simple cubemapped texture skybox or some sort of custom skybox system? If so, if you can post the shader you are using I can take a look and see what might be the issue.

    I've had this reported before as well. I did some testing on my end and textures generated were marked as readable, however I'll try the specific version you are using and include your fix in the next update. Thanks for poking around and finding the solution :)

    Thank you for your very detailed feedback and especially for explaining your user experience with the asset. I think my main takeaway from this post is that I might be quite biased in what I consider to be a "default" scene. I work almost exclusively with huge scenes with far clip planes and shadow distances, but I realize that's probably not the case for most users. I'll update the manual to reflect this.

    Regarding the example scene being included in the asset, this can go both ways. Some users don't like having to import additional packages, and I personally strongly dislike assets that change my project settings, hence why I opted for example content that is included directly, but not required (nothing in the example content folder is required for the asset to work). I do think it's fair that the user should expect to be able to reach visual parity with the demo video easily. I'll update the manual to include the steps you outlined, along with explanations to why there might be different options.
    That said, I think it's also fair by me to expect users to be able to make some decisions on their own about how they develop their game. OverCloud is a sky and cloud system, not a post processing solution. Some people use linear color space, some use gamma. Some use post processing stack V2, some use legacy etc. etc. Including this type of information in the manual is a good suggestion though.

    The volumetric shadows is an area where I can for sure say it should work straight away. I'll have to check your specific Unity version and see if something is up.
    I don't want to shift blame but it's getting increasingly difficult to ensure feature parity across Unity versions (especially on the VR/XR front), so if I'm to ask for patience on any front it would be that one.

    Again, thanks for your detailed feedback. I value it greatly!
     
    Last edited: Sep 23, 2020
  25. TwiiK

    TwiiK

    Joined:
    Oct 23, 2007
    Posts:
    1,703
    I don't think you need to investigate my lack of volumetric lighting. I can certainly see it appearing between the clouds, but I'm unable to reproduce the specific effect seen here:

    1:02 if it doesn't automatically start there.

    I'm thinking that there's just some sort of volumetric density setting or something that I'm missing, but this is exactly my point though. Now you say you're going to investigate this due to me not being able to recreate something I've seen in your trailer. And I'm not even interested in this asset to begin with. :p I just wanted to play around with the demo scene. And I'm not even sure whether this could be user error. Is my project even setup correctly? Making the documentation clearer is all well and good, but if this was written in stone in a fixed demo project then all, or at least most, of this ambiguity would be gone.

    I think it's wise to lower your expectations of the average Unity developer right away though. Just think about how many tens of thousands of copies the various "do everything template" assets have sold. And how many of those assets started out doing just one specific thing, but over time grew to incorporate everything users were asking for until they became a game of their own. I feel like a lot of Unity developers are actually more interested in modding an existing game rather than making their own, myself included, at least some times. I have no immediate intention of making money with Unity. I just like to play around with it and certain assets, like this one, allow me to to do just that. But without the demo scene it wouldn't have anywhere near the same appeal.

    What I guess I mean by this is don't underestimate the importance of showing your asset in a real-world scenario even if the asset is ultimately meant to be just be a part of someone's already existing project.

    I completely understand you not wanting to include project settings with your asset. That's just terrible practice in general in my opinion, unless the asset is an actual demo/sample to begin with.

    What I guess I was asking, although I think I know the answer, is whether or not this is currently the only options you have available. The ideal solution in my mind would be similar to how a lot of Unity's official package manager packages work. Something like this:
    overcloud-my-ideal-solution.png

    That is to have a separate optional download/installation directly available from the asset page for the demo project. For all I know Unity 2020 already facilitates this, and if so that is fantastic. And I'm no way asking you to investigate this for me, I'm just saying that if Asset Store developers could easily split their assets up into modular pieces then that would make it so much easier to work with and you would be able to tailor the experience around that. For example any documentation related to the demo scene could be included inside the optional installation. But more importantly the demo scene would be fully encapsulated with project settings, package dependencies etc. And in your case even though the demo scene is about 2/3 of the asset size it's still not very big, but in a lot of cases the demo scene could be massive while the actual asset is tiny.

    And I 100% understand your frustrations around supporting the different Unity versions. I don't know what Unity's ultimate goal is, but the way it is now with multiple incompatible render pipelines and package versions tied to Unity versions etc. is a complete mess and I imagine trying to develop assets in this eco system is painful. And the fact that you said you needed to investigate my specific Unity version is another frustration of mine. Why is it not listed anywhere on the Asset Store page what Unity version you used to last build the asset? There's a minimum version, but we all know how volatile that is. This is from the Asset Store page of one of the assets included with the Humble bundle:
    And that asset comes with specific, fairly complex instructions on how to get it working with the various combinations. I think it's tragic that it's left to the Asset Store developers to sort all of this out.

    But enough about that. Almost none of this is directed towards you or your asset. I just downloaded all the assets in the Humble bundle, tried most of them, encountered similar problems with nearly all of them, looked at the Asset Store to see what type of reviews people left for these assets and then chose your asset to write a feedback/rant post that is directed more at Unity than anything else...

    Your asset looks absolutely fantastic and the first thing I wanted to do with it when I fired it up was to find a 3d model of a fighter jet and just fly around, but I just now discovered your Youtube channel, blog and Twitter. Youtube actually autoplayed a video of a fighter jet game after the Overcloud trailer and I was like: "This looks insane, but it sort of looks like this guy is actually using Overcloud for his game.", and then I saw I was still watching the same channel... yours. :p Now I understand where this asset originated from. I also noticed you're posting photographs of real fighter jets on Twitter and pretending they are from your game... :p

    Guess I can just sit back and wait until you ship your game rather than spend any time trying to make something half-assed myself. :)
     
    Last edited: Sep 23, 2020
    Fewes likes this.
  26. MasonWheeler

    MasonWheeler

    Joined:
    Apr 2, 2016
    Posts:
    179
    I technically have a custom shader, but it's nothing complicated. Nothing lighting-related in there and it even has the "Lighting Off" directive.

    Code (CSharp):
    1. Shader "Skybox/Blended" {
    2.     Properties{
    3.         _Tint("Tint Color", Color) = (.5, .5, .5, .5)
    4.         _Blend("Blend", Range(0.0,1.0)) = 0.5
    5.         _FrontTex("Front (+Z)", 2D) = "white" {}
    6.         _BackTex("Back (-Z)", 2D) = "white" {}
    7.         _LeftTex("Left (+X)", 2D) = "white" {}
    8.         _RightTex("Right (-X)", 2D) = "white" {}
    9.         _UpTex("Up (+Y)", 2D) = "white" {}
    10.         _DownTex("Down (-Y)", 2D) = "white" {}
    11.         _FrontTex2("2 Front (+Z)", 2D) = "white" {}
    12.         _BackTex2("2 Back (-Z)", 2D) = "white" {}
    13.         _LeftTex2("2 Left (+X)", 2D) = "white" {}
    14.         _RightTex2("2 Right (-X)", 2D) = "white" {}
    15.         _UpTex2("2 Up (+Y)", 2D) = "white" {}
    16.         _DownTex2("2 Down (-Y)", 2D) = "white" {}
    17.     }
    18.  
    19.         SubShader{
    20.             Tags { "Queue" = "Background" }
    21.             Cull Off
    22.             Fog { Mode Off }
    23.             Lighting Off
    24.             Color[_Tint]
    25.             Pass {
    26.                 SetTexture[_FrontTex] { combine texture }
    27.                 SetTexture[_FrontTex2] { constantColor(0,0,0,[_Blend]) combine texture lerp(constant) previous }
    28.             }
    29.             Pass {
    30.                 SetTexture[_BackTex] { combine texture }
    31.                 SetTexture[_BackTex2] { constantColor(0,0,0,[_Blend]) combine texture lerp(constant) previous }
    32.             }
    33.             Pass {
    34.                 SetTexture[_LeftTex] { combine texture }
    35.                 SetTexture[_LeftTex2] { constantColor(0,0,0,[_Blend]) combine texture lerp(constant) previous }
    36.             }
    37.             Pass {
    38.                 SetTexture[_RightTex] { combine texture }
    39.                 SetTexture[_RightTex2] { constantColor(0,0,0,[_Blend]) combine texture lerp(constant) previous }
    40.             }
    41.             Pass {
    42.                 SetTexture[_UpTex] { combine texture }
    43.                 SetTexture[_UpTex2] { constantColor(0,0,0,[_Blend]) combine texture lerp(constant) previous }
    44.             }
    45.             Pass {
    46.                 SetTexture[_DownTex] { combine texture }
    47.                 SetTexture[_DownTex2] { constantColor(0,0,0,[_Blend]) combine texture lerp(constant) previous }
    48.             }
    49.     }
    50.  
    51.         Fallback "Skybox/6 Sided", 1
    52. }
     
  27. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    253
    I don't think I've seen this shader structure before but it looks like it should be fine. Could it perhaps be the height fog overpowering the scene? It is affected by lighting so if it is very thick it could look like everything is either bright or dark. Check the active weather preset settings and try turning it down. If that doesn't work, could you upload an image of what it looks like during different times of day? That'll help me pinpoint the issue :)
     
  28. TwiiK

    TwiiK

    Joined:
    Oct 23, 2007
    Posts:
    1,703
    Before I forget about this asset and never return :p I just wanted to say that fog ambient intensity was apparently the setting I was missing in my attempt of recreating those sun shafts from the trailer. There may be other ways of achieving the look in the trailer, but for the default Foggy preset this was set to 1 which I guess makes the fog uniformly lit by the sky or something so that you're not able to see the sun shadows in the fog. Reducing this towards 0 gave me the look I was after.
     
    iddqd likes this.
  29. MasonWheeler

    MasonWheeler

    Joined:
    Apr 2, 2016
    Posts:
    179
    It's basically meant to allow you to use the Blend value to fade from one cubemap to another.

    Yeah, it looks like it was the fog. Tweaking that really helped. But I'm noticing something very strange: there's a 2D cloud billboard that does not move with the camera, so it makes it look like someone hung a transparency with a cloud drawn on it directly over the camera's lens. It's very noticeable when you move your view around:
    upload_2020-9-23_18-23-13.png

    upload_2020-9-23_18-23-53.png

    upload_2020-9-23_18-24-46.png

    This happens even with all 2D cloud layers disabled. Any idea what's going on here?
     
  30. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    253
    What you are seeing is the 2D fallback cloud plane. It renders where the volumetric clouds can't cover in the distance, but it can be pushed too close if your far clip plane is too low. You can disable it entirely by unchecking "Render 2D Fallback" on the OverCloudCamera component. I would recommend increasing your far clip plane a bit until the volumetric cloud plane is rendered fully, otherwise you are wasting vertex processing on parts of the cloud plane that isn't rendered.
     
  31. MasonWheeler

    MasonWheeler

    Joined:
    Apr 2, 2016
    Posts:
    179
    The cloud plane altitude is 400, the cloud plane height is 400, and the far clip plane is 12,000. So it doesn't really feel like that's the problem.
     
  32. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    253
    Can you see the volumetric clouds at all? What happens if you toggle "Render 2D Fallback" off? It is possible to reduce the cloud plane radius, which will also make the 2D fallback appear "too early" (though the default radius should result in sensible visuals, so unless you've lowered the radius this shouldn't be a cause of issue).
     
  33. ikemen_blueD

    ikemen_blueD

    Joined:
    Jan 19, 2013
    Posts:
    322
    Just a quick test for those who wonder if you can get the visual look alike from his Plane demo. I replace my PP settings, Linear space, Deffered, I got a stable 90 FPS for 3840x1080 full screen. I notice Exposure, Tone Mapping could destroy his cloud looks, so be careful on these two. I did not change any OverCloud settings yet. The performance to me is quite okay. But I hope @Fewes to consider to improve the performance much more, please :D everybody wants a fast & pretty sky though, so far everything just works in Deferred rendering path, no need to change anything.
     

    Attached Files:

    Fewes likes this.
  34. NightcoreLV

    NightcoreLV

    Joined:
    Feb 26, 2014
    Posts:
    34
    cant use this asset, got this error then i trying to use it
     
  35. alphabean11

    alphabean11

    Joined:
    Apr 18, 2019
    Posts:
    18
    I am getting a really bad blown out effect when just adding this to a new scene. I deleted the old sun and just have a terrain, and the overcloud and a camera. Any ideas why this is happening?

    upload_2020-9-28_20-31-48.png
     
  36. ikemen_blueD

    ikemen_blueD

    Joined:
    Jan 19, 2013
    Posts:
    322
    @alphabean11 you could try post processing fx, bloom, tone mapping, exposure adjustment to reduce the over-whiteness issue you have.
     
    Fewes likes this.
  37. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    253
    Going off a quick Google search, this seems to be a bug with Unity itself. Have you tried using a different version or updating your GPU drivers?

    This happens because the sky luminance covers a very wide range of intensity values, which does not display well on a regular monitor. The best solution is to use a tonemapper of some sort. You can find one in any post processing suite, but OverCloud also comes with a simple one that you can drop onto the camera (called Tonemap.cs)
     
  38. Ictcmn

    Ictcmn

    Joined:
    Nov 17, 2014
    Posts:
    2
    Hello - Excited to give this a look! When I try and add the OverCloud prefab to my scene it says "The associated script can not be loaded" and when I click on the script it says "no monobehaviour scripts - or don't match filename" - am I doing something stupid? I have dowloaded and imported through the asset store and I haven't changed anything. It looks like the Filename is both "Assembly-CSharp.dll" and then in the project browser OverCloud which matches the class name? I am using 2020.1.6f1 and the scene is a standard 3D scene.
     
  39. Ictcmn

    Ictcmn

    Joined:
    Nov 17, 2014
    Posts:
    2
    Sorry - to answer my own question - turns out Unity bans all scripts if one script is knackered and I had also imported Standard Assets which apparantly has some problems now - removed the assets with issues and OverCloud is working fine :)
     
    Fewes likes this.
  40. XVB75

    XVB75

    Joined:
    Sep 12, 2020
    Posts:
    11
    We are having the exact same issue as @alphabean11.
    Everything is completely blown out. We have a terrain generated by MapMagic 2 and during "daytime" everything is just white.

    One fix that solved the problem with the terrain being white is to replace the sun with a custom dialed down object. Now we can see the ground during day time. But during dusk and dawn it looks a bit weird.

    The area above the horizon is still completely blown out and there are still problems with objects reflecting light during night time. Added a white cube for reference. It is like the sun never goes away but shines thru the terrain.
     

    Attached Files:

  41. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    253
    Can you confirm what the sun color/intensity is set to when this occurs (with the white cube)? OverCloud should control these based on the time of day but it looks like it's not working for some reason. The sun color should be very reddish when it is close to the horizon.
     
  42. Duende

    Duende

    Joined:
    Oct 11, 2014
    Posts:
    179
    Is a pretty nice asset, good job, Fewes. :) I have experimented with the asset and have some questions:

    1- I seen that you added solar and lunar eclipses, is there any way to force it to see it? Another question on this, any method/function to know how much is left for a solar/lunar eclipse?

    2- During the night, do the phases of the moon influence the illumination of the terrain? It seems that if it's a full moon or a new moon the lighting of the terrain is always the same, all dark. I need that depending on the moon phase, the terrain is more or less illuminated. Like in real life, pitch black during the new moon and some light during the full moon.
    And a method/function to know the moon phase it's in?

    3- I'm using a test shader for water, it's this. The problem is that it looks like this, what is happening?
    upload_2020-10-6_12-18-17.png

    4- I have tried adding this night sky as "Stars Cubemap" but it looks reddish (I guess because the horizon). Any solution?
    upload_2020-10-6_12-32-56.png

    5- Another detail that I try to change is the lighting of the sun and the moon. I try that they have that glow around them, so I increase the "Moon Intensity" and "Sun Intensity", but this causes the moon to show through the clouds and it looks like this image. (Also, by shining so bright, the moon "loses" its texture and only looks bright).
    The same goes for the sun.
    upload_2020-10-6_12-42-42.png

    Thank you.
     
    Last edited: Oct 6, 2020
  43. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    253
    1. To force a solar/lunar eclipse, uncheck time of day on the OverCloud component and manually line the directional lights up either in the exact same direction, or the exact opposite direction. There is no way to calculate how much time remains until an eclipse, but the date system should be accurate enough that you can use real-world dates for such events.

    2. It does not, however if you wish to add this, you can go to OverCloudLight.cs and around line 175, where the moon light color is calculated you can add this multiplication factor:
    Code (CSharp):
    1. float moonIntensity = Vector3.Dot(OverCloud.components.sun.transform.forward, -OverCloud.components.moon.transform.forward) * 0.5f + 0.5f;
    3. Any transparent surface (like water) will have to have its shader modified for it to properly mix with OverCloud. You'll have to ask the shader author if he/she can add support to your shader (there are shader macros available for this which can be found here: http://overcloud.me/compatibility.html)

    4. What you are seeing here is the absorption of light in the atmosphere (transmittance) which results in a reddish color around the horizon. If you wish to disable this, go to OverCloud/Resources/Shaders/Skybox.cginc and around line 250 where the starmap is added to the output color, remove the multiplication with "transmittance". Do note that this might break the physically based rendering of the sky, however.

    5. The Moon Intensity only changes the intensity of the celestial body in the sky. To change the "glow" around them, increase the Mie Scattering Intensity (also found under the Atmosphere rollout).

    Let me know if this helps!
     
    Duende likes this.
  44. XVB75

    XVB75

    Joined:
    Sep 12, 2020
    Posts:
    11
    We went back and experimented with the standard sun supplied with OverCloud. Intensity 1, size 3, color 4 X 255. We identified the problem. It depends on the angle of the camera.

    If the character looks into the sun (+/- 90 degrees) everything looks good. The moment the character rotates to between 90 and 270 degrees the lighting is messed up. This shows upp extremely well the going back and forth over 90 degrees line. We sent an email containing a movie showing this.

    When having the sun in the back the lighting depends on the pitch angle:
    Looking up = Blown out
    Looking down= Dark weird color (except high areas that are still blown out)

    Is this a bug concerning the standard pipeline?


    45.png 180up.png 180_down.png
     
  45. MasonWheeler

    MasonWheeler

    Joined:
    Apr 2, 2016
    Posts:
    179
    Do you have a tonemapper on your Camera?
     
  46. XVB75

    XVB75

    Joined:
    Sep 12, 2020
    Posts:
    11
    Tried with the included Tonemap script and without. Same result.

    When looking from the sun (90-270), the terrain looks good if a cloud passes by. If that is any hint.
     
  47. XVB75

    XVB75

    Joined:
    Sep 12, 2020
    Posts:
    11
    Could this be a platform issue? We are using mac and I see that DX11 is listed as a requirement.

    The result looks good when working but we are not getting that 3D-effect that this is all about.
     
  48. Duende

    Duende

    Joined:
    Oct 11, 2014
    Posts:
    179
    Thanks so much for the help! :)

    1- Ok, I did it manually and the result is quite spectacular. But I tried adding some dates that there was an eclipse and nothing happened.
    To know if an eclipse is happening, I can compare the positions of the sun and the moon, and if they are the same or very similar, one is happening, but it would be very good to know in advance which days there will be eclipses.

    2- You mean change 'multiplier' to 'moonIntensity', right? And it would look like this:
    Code (CSharp):
    1. float moonIntensity = (Vector3.Dot(OverCloud.components.sun.transform.forward, -OverCloud.components.moon.transform.forward) * 0.5f + 0.5f) * 3.25f;
    2. light.color = Color.Lerp(m_ColorOverTime.Evaluate(elevation), OverCloud.atmosphere.lunarEclipseColor, OverCloud.lunarEclipse) * moonIntensity * OverCloud.moonFade;
    For the terrain to light up I had to multiply the 'moonIntensity' value by 3.25, otherwise it would not light up enough (although I have to adjust this value more). The problem is that it also lights up the clouds, which were fine with the previous lighting. Look:
    upload_2020-10-7_0-6-41.png

    There is no way to illuminate the terrain more but that doesn't affect the clouds? The terrain shader is the Unity standard.
    By the way, is there any way to know what moon phase it's in?

    4- And can you think of a way to add a better night sky? Like that one I shared. That solution, as you say, would break the sky; and the default sky is fine but simple, it's useful if there is a lot of light pollution.

    5- Ok, it looks great, the problem now is that the sun and the moon need a different value of "Mie Scattering Intensity". Where in the code do I need to touch to make this value change when it's day and night? So that the sun increases the value of "Mie Scattering Intensity" and the moon decreases it.
     
  49. zaozhuangwang

    zaozhuangwang

    Joined:
    Jul 20, 2018
    Posts:
    2
    Would OverCloud support HDRP? Waitting for that...;)
     
  50. XVB75

    XVB75

    Joined:
    Sep 12, 2020
    Posts:
    11
    Ok, we deleted everything and added OverCloud again. One problem was that we changed the intensity of the sun under "Atmosphere" not in the sun object itself. Renaming this setting "Sun icon" or similar would perhaps be a good thing.

    This got rid of the blown out white color. So far very good!

    The "Broken" weather works and we have no problem. Tested full day/night cycle. If we select "Overcast" all weird 90-270 degree problems still exists.

    At least we can move forward but we would really like a darker more sinister looking sky in the future. So please look into this.
     
unityunity