Search Unity

☁ Weather Maker ☁ AAA Clouds, Sky, Weather, Water, Volumetric Light & More!

Discussion in 'Assets and Asset Store' started by jjxtra, Jun 30, 2016.

  1. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    5.6.7 refresh is now live with an option to disable auto-bounds for water height sampling. You can set a custom orthographic size to zoom in. As long as a little bit of ocean is on the edges, it should still work fine. You can double check your result by looking at the y depth render texture on the camera depth script on the water prefab.
     
    dsilverthorn likes this.
  2. razzraziel

    razzraziel

    Joined:
    Sep 13, 2018
    Posts:
    396
    Hi!

    SunLensFlareBlocker doesnt work because sphere is in wrong position. I thought its because i changed sun rotation on WeatherMakerCelestialObjectScript (180@Rotate Y Degrees) and on WeatherMakerDayNightCycleProfile (180@Axis Tilt). But i looked at demo and its not working at there too.


     
    Last edited: May 21, 2019
  3. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    There is a lens flare blocker on the WeatherMakerPrefab -> FullScreenEffects -> Clouds -> LensFlareBlocker. You can try enabling it see if it helps. It basically turns off the lens flare at a certain cloud coverage.

    For the shadows, you will need to edit UnityShadowLibrary.cginc and set the shadow fade to 0.0. You have to do this everytime you reinstall or update Unity. Let me know if you've already done that.
     
  4. razzraziel

    razzraziel

    Joined:
    Sep 13, 2018
    Posts:
    396
    i guess you didnt read properly. i'm already using it to cover sun flare but it fails. but i solved it. since i changed sun rotation on two places above, sun blocker gets wrong position (behind the player, literally underground). so i changed this:

    Code (CSharp):
    1.  
    2. //CloudLensFlareBlocker.transform.position = c.transform.position + (toSun * 16);
    3. CloudLensFlareBlocker.transform.position = c.transform.position + (toSun * -16);
    4.  
    that constant(16) needs to be dynamic which depends on one of these (Rotate Y Degrees @WeatherMakerCelestialObjectScript or on Axis Tilt @WeatherMakerDayNightCycleProfile).

    anyways, min cloud cover to block sun values are constant too. so blocking sun doesnt work dynamic. is there any way to tell if sun is behind clouds?
     
    Last edited: May 21, 2019
  5. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    Thanks for sharing, I will integrate something like this. I plan on using compute shader in a future update to sample the clouds in a small cone pointing towards the sun from the camera to see how blocked it is. But it is not ready yet, so I am doing the poor mans average cloud coverage approach.
     
    Willbkool_FPCS and razzraziel like this.
  6. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    Just a heads up everyone I have identified and am fixing the flat cloud outline bug. Thanks to @ThomQ#2568 on Discord for finding it!
     
    dsilverthorn likes this.
  7. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    Weather Maker 5.6.8 is released with the flat cloud outline fix
     
    dsilverthorn likes this.
  8. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    Does this work?

    Code (CSharp):
    1.  
    2. Vector3 toSun = WeatherMakerLightManagerScript.Instance.SunPerspective.transform.forward;
    3. CloudLensFlareBlocker.transform.position = c.transform.position + (toSun * Mathf.Min(1000.0f, c.farClipPlane) * -0.9f);
    4.  
     
    Last edited: May 22, 2019
  9. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    I also had to put the lens flare blocker object back on the default layer as well. But the compute shader is the better approach, by far, so I will look into doing that soon.
     
  10. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    Sweet! I have lens flare activation working with compute shaders, it's very nice, will upload a new version soon.
     
    razzraziel, hopeful and StevenPicard like this.
  11. razzraziel

    razzraziel

    Joined:
    Sep 13, 2018
    Posts:
    396
    wow thats great news mate, looking forward to try. i hope that doesnt cost much in terms of performance?
     
  12. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    Here is an example. Requires Unity 2018.3 or newer, compute shaders and async gpu readback. No impact on FPS as it is a pretty lightweight call to get the clouds from a single pixel. I do not know of any other asset that does this.

     
  13. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    Lens flare blocker is live in the asset store, just redownload same version, 5.6.8
     
    hopeful likes this.
  14. razzraziel

    razzraziel

    Joined:
    Sep 13, 2018
    Posts:
    396
    that was fast :)

    i'm glad i changed enviro with weather maker.
     
  15. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    I'm glad you are happy with your choice. I've been getting a LOT of emails asking me why Weather Maker vs Enviro, so I will share my thoughts. This is not meant to bash Enviro. It is a great asset and the developer provides excellent support. If you are using Enviro and like it, great, keep with it and enjoy. There are also plenty of other great weather and sky assets. For example, the Unistorm dev just did an update that added volumetric clouds and weather zones, and he didn't charge for the update! Overcloud is another one that looks awesome for flight simulators, and the dev also looks to provide top notch support. So the point is, there are options and I am just trying to provide a niche and place in the asset store in a crowded market.

    I think Weather Maker offers a compelling value proposition. There is probably a set of features that Enviro has that Weather Maker does not, but I didn't see much except some stuff for seasons when playing around in the Enviro demo scene.

    Disclaimer: I had to buy Enviro to do this comparison. I did not reference any Enviro shaders or scripts, just the Enviro demo scene and the Enviro documentation, along with the frame debugger. So I may have missed some things, but I did not want to go snooping through shaders and scripts to avoid any copyright issues.

    Here is a list of what Weather Maker can do or is improved over Enviro:

    - Null zones. Hide rain, fog, snow overlay, water, etc. in specific areas. You can use sphere or box collider. Both can be scaled. The box collider can even be rotated in all directions. Enviro does not have this.

    - Performance profiles. Weather Maker auto-adjusts to the Unity quality level for the best FPS. No need for a "lite" or "mobile" version that Enviro has. Weather Maker makes it easy to publish to all platforms with no hassle of multiple versions.

    - One pass volumetric lighting. From what I could tell, Enviro does a separate draw pass for each light. Weather Maker does all the volumetric lights in the fog in a single draw call. The main dir light has shadows, but the other point and spot and area lights do not for performance. If you want AAA volumetrics and shadowing of all lights, use HDRP. In fact I don't know of any other asset that does one pass volumetric light for all lights.

    - Fog sphere and fog cube. Enviro just has global fog as far as I know.

    - Water. Weather Maker has pretty decent water. For the price of basically Aquas you get full water, and Weather Maker! Enviro does not have water. In the future I plan on making a super water asset, with tight integration to Weather Maker so the fog, reflections, etc. will work seamlessly.

    - Volumetric Cloud Performance. I've tested VR and regular, and on max settings for both assets, Weather Maker is about 15% faster at rendering volumetric clouds. This is Windows 10, x64 1080 TI, Ultra Unity quality level, Fantastic profile for Weather Maker and Ultra cloud profile for enviro. I hit about 280-320 fps in Enviro cloud profile 1, Weather Maker bounced between 320 and 400 fps, medium heavy scattered clouds.

    - Volumetric Cloud Appearance. Enviro has a few cloud profiles. They do not look super great in my opinion, the edges and sides of clouds are washed out and very white with no fine detail. Maybe it's my color or render settings, I dunno. I wasn't doing any post process, maybe that makes this point mute. Weather Maker has many cloud profiles and a ton of knobs and dials to configure the volumetric clouds for any style needed. Cartoon, realistic, alien, rolling storm, dark, light, epic, whatever you need Weather Maker clouds can be configured and new cloud profiles created.

    - Volumetric Cloud Fly-Through. I think Enviro is working on fly-through for clouds, not sure if it was released yet. If not, that is another thing Weather Maker has that Enviro does not.

    - Volumetric Cloud Temporal Reprojection Sharp Mode. Enviro has temporal reprojection, confirmed in frame debugger, but it appears to be done with a blur. Weather Maker also uses a blur based on Inside open source temporal reprojection (https://github.com/playdeadgames/temporal), but has a second option for a sharp reprojection (set blur mode on the temporal reprojection material on the cloud object to 1 (sharp)), keeping every pixel crisp and exact. This works great for most cases except for fast moving or changing lights.

    - Aurora borealis / northern lights. Enviro does not have this.

    - Lens flare blocking behind clouds dynamically. Enviro does not have this.

    - Full screen snow overlay effect. No need for a global snow asset or terrain shader. Enviro does not have this as far as I know, someone correct me if I am wrong.

    - Volumetric cloud probes done on the GPU. Get cloud density at a point or along a ray. Enviro does not have this.

    - Procedural lightning. Lightning bolts, forks, glow and more are configurable and make gorgeous cloud lighting from point lights. Enviro uses a point light and nothing else for the lightning. Maybe there was an option for bolts, forks, etc. I did not see it.

    - 2D/orthographic Weather System Prefab included in the same asset. Enviro is only 3D.

    You may not have known that:
    - Weather Maker has ambient sound management and sound zones, just like Enviro.
    - Weather Maker fog provides great atmospheric scattering out of the box, just like Enviro.
    - Weather Maker has weather profiles and weather zones, just like Enviro.
    - Weather Maker recently added events for time of day changes and weather changes. Just look on the root of the prefab on WeatherMakerScript.
    - Weather Maker recently got PlayMaker actions!
    - Weather Maker is 1 USD cheaper than Enviro, as of 2019-05-22
    - Weather Maker does not come close to fully supporting me and my family, I have many other projects and efforts to make up the difference. I don't have a day job, I am full solo/indie dev.

    Near(ish) future in the works:
    Global wetness (i.e. wet stuff asset but simplified and more performant) and LWRP. As far as I know Enviro does not have these either.

    Less near future in the works:
    - Physically based sky, based off of https://github.com/Scrawk/Brunetons-Improved-Atmospheric-Scattering. I will also look at making sky profiles easier to change, no need for other expensive sky and ambient setting assets.
    - Cloud particle systems with shuriken and better volumetric cloud depth interaction in general. That is one weakness of Weather Maker, the clouds don't interact super great with the depth buffer.
    - Ocean water asset, like sea of thieves.

    Thanks for reading, and regardless of what asset you are using, best wishes and good luck with your games or apps.
     
    Last edited: May 22, 2019
  16. razzraziel

    razzraziel

    Joined:
    Sep 13, 2018
    Posts:
    396
    Yes Enviro dev is super helpful (even made some fog particles for me about an issue) and so responsive. But weather maker has good pros for me.

    - volumetric clouds looks better
    - a little more performance
    - better weather effects (particles were awful (snow etc))
    - global accurate cloud shadows (they were fake) and better looking scattering
    - easier to edit weather cloud map (i needed for mad max style storm clouds)
    - crest integration
    - null zones
    etc...

    and you seem like super active, so yea i'm glad for now.

    btw is this fog blur effect possible in weather maker (played with blur a bit but didnt get same effect)?
    https://github.com/OCASM/SSMS
     
    Last edited: May 23, 2019
    OdderOtter likes this.
  17. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    The weather maker fog uses a bilateral blur, you could try downsampling to half or quarter and see if it is close. But assuming the license is OK for that fog asset I may just add that as an option, it looks amazing!
     
    Vincent454 and OdderOtter like this.
  18. razzraziel

    razzraziel

    Joined:
    Sep 13, 2018
    Posts:
    396
    yea regular fogs looks old gen after seeing this, its superb and would definitely look great with your sunsets. but i dont know about the performance and license tho.
     
  19. Morothar

    Morothar

    Joined:
    Dec 3, 2009
    Posts:
    25
    Hi, I'm trying to build for the Oculus Go, but while building it throws errrors.
    The first one is:

    Shader error in 'WeatherMaker/WeatherMakerWaterTesselationShader': invalid subscript 'stereoTargetEyeIndex' at Assets/WeatherMaker/Prefab/Shaders/WeatherMakerTesselationShaderInclude.cginc(95) (on gles3)

    Compiling Vertex program with STEREO_MULTIVIEW_ON WEATHER_MAKER_SHADOWS_SPLIT_SPHERES
    Platform defines: UNITY_NO_DXT5nm UNITY_NO_RGBM UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_NO_CUBEMAP_ARRAY UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF3 UNITY_NO_FULL_STANDARD_SHADER SHADER_API_MOBILE UNITY_COLORSPACE_GAMMA UNITY_LIGHTMAP_DLDR_ENCODING

    and then several ones complain "Shader error in 'WeatherMaker/WeatherMakerFullScreenFogShader': Program 'temporal_reprojection_fragment_custom', error X8000: D3D11 Internal Compiler Error: Invalid Bytecode: source register relative index temp register component 1 in r10 uninitialized." for several Opcodes (#537, #538, #540, #542, #555, #720)

    I'm on 2018.21f1... Do I need to upgrade?
     
  20. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    Please try 2018.3 or newer. Please post back if it still fails.
     
  21. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    Sweet it is mit license. Will test performance.
     
    OdderOtter and razzraziel like this.
  22. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    Weather Maker 5.6.9 is live which reverts my Untiy 2019 VR hack. In Unity 2019.1.3, Unity fixed upside down VR so I have removed my hack. Please update both Weather Maker and Unity 2019 to latest versions to get the fix.
     
  23. Morothar

    Morothar

    Joined:
    Dec 3, 2009
    Posts:
    25
    I took the better part of the day upgrading my project to 2019.1 (which I wanted to do soon anyway) and it builds now fine. I still have a crash at startup, but that's in my project, not a problem of WeatherMaker. Thank you!
     
  24. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    Just FYI all I am having my gall bladder removed tomorrow. It has been troublesome for several years, and family history is really bad with it. Should be out of comission for a couple days then will be back on early next week.
     
  25. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,682
    Best wishes with the operation, and a speedy recovery!
     
  26. Willbkool_FPCS

    Willbkool_FPCS

    Joined:
    Jun 13, 2018
    Posts:
    169
    Good luck on your cholecystectomy, are they doing it laparoscopically? If so, you'll be back to work quickly. ;)
     
  27. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    Thankfully yes it is laparoscopic. It's out now and the biggest issue now is bloating and soreness in the belly. Sneezed and thought I ripped open my naval :) Should be back on full time early next week.
     
  28. Willbkool_FPCS

    Willbkool_FPCS

    Joined:
    Jun 13, 2018
    Posts:
    169
    Rest and recover, get a small pillow to hold on your stomach if you sneeze or cough.:D

    (p.s. I work in an OR.);)
     
    hopeful likes this.
  29. dsilverthorn

    dsilverthorn

    Joined:
    May 14, 2017
    Posts:
    839
    Best of luck. Hope you feel better soon!
    We will keep an eye out for anyone who may post looking for a quick response.
    Get well soon.
    David
     
  30. NightcoreLV

    NightcoreLV

    Joined:
    Feb 26, 2014
    Posts:
    34
    any plans to integrade megasplat? :):):):):)
     
    dsilverthorn likes this.
  31. dsilverthorn

    dsilverthorn

    Joined:
    May 14, 2017
    Posts:
    839
    @NightcoreLV
    Just a heads up, look above for details, but you might not get a response for a day or two.
    Just wanted to let you know, I’m case you didn’t see it. ;)

    I’d like the idea of integration with megasplat too!:)
     
  32. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    I'm pleased to announce that Weather Maker 5.7.0 is now submitted to the asset store. LWRP support is now in Weather Maker! Water LWRP will come in another update, and the snow overlay only works in standard pipeline, but everything else should be good to go!

    Regarding megasplat, I will look into it. If anyone can give me some pointers I would appreciate it. Body is healing up well, the offensive gall bladder has been removed, still a lot of tenderness and bloating but I can mostly think straight now!

    It was laparoscopic thankfully!
     
    Last edited: May 27, 2019
  33. Morothar

    Morothar

    Joined:
    Dec 3, 2009
    Posts:
    25
    My problems came back. The problems seems to be when I set things to GLES3, which is recommended by Oculus. Errors are exactly the ones as in my previous post.
    If I don't do that the build succeeds but there's a problem loading the scene that I need to identify today.
    (But please, prioritize healing before my problems, I can manage without WeatherMaker for a bit)
     
  34. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    Please redownload 5.7.0 in about an hour.
     
  35. Karearea

    Karearea

    Joined:
    Sep 3, 2012
    Posts:
    386
    Hi, glad to hear you're recovering well.

    I recall you were chatting on the Crest Discord (which is currently down as luck would have it..) - Does the LWRP implementation of Weather Maker play nicely with Crest LWRP?
     
  36. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    I can't speak to that, I don't have the funds to buy LWRP crest to test, but will reach out to the dev for a possible voucher to test with.
     
    Karearea likes this.
  37. Bzuco

    Bzuco

    Joined:
    Sep 6, 2015
    Posts:
    56
    Hi, some Unity scene window GUI redrawing issue after leaving play mode. This issue occurs when both scene and game windows are directly visible before entering play mode. No issue if "Maximize On Play" is enabled or if weather maker object is disabled.
    video: http://images.bzucko.sk/weatherMakerSceneWindowGUI.mp4
    2018.4.1
     
    Last edited: May 29, 2019
  38. razzraziel

    razzraziel

    Joined:
    Sep 13, 2018
    Posts:
    396
    yep same happens to me on 2019.1.3

     
    Last edited: May 29, 2019
  39. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    I'll look into it, most likely it is command buffers in the scene view
     
  40. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    Coming in next release, clouds cast shadows when fog is enabled. Requires dir light shadows enabled for fog.

    upload_2019-5-30_13-51-45.png
     
  41. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    Weather Maker 5.7.1 is now live with lots of goodies including fog cloud shadows!
     
    Vincent454 and dsilverthorn like this.
  42. GlaireDaggers

    GlaireDaggers

    Joined:
    Feb 18, 2018
    Posts:
    13
    Hm, any plans to address GC impact? Been doing some performance optimization today and noticed Weather Maker itself is really hefty on GC allocations per frame.
    Enabling deep profile shows 2.2KB per frame in WeatherMakerCommandBufferManagerScript.CameraPreRender(), 0.9KB per frame in WeatherMakerCommandBufferManagerScript.CameraPreCull(), and 184 bytes per frame in WeatherMakerCommandBufferManagerScript.CameraPostRender.

    The last one's not so bad, but the other two are causing some heavy GC-related hitching and I'd like to see if I can get that reduced to as near zero as possible.
    Doing some preliminary digging and it seems like a lot of this is from the way it sets up command buffers (seems to call GetCommandBuffers on the camera, and then do a name string compare, both of which allocate), some comes from retrieving the alpha/color keys of gradients (allocates a new array every time), some from allocating iterators in a foreach (there's a place where it iterates over an IList, which allocates a new iterator object)

    EDIT:
    Did a bit of a first pass/attempt at getting rid of the allocations. My quick patchwork attempts are nowhere near share-worthy but do seem to be doing the trick lol.
    Anyway I feel like I ought to share screenshots of what I've been doing with it, so here they are!
    Something that started as a little experiment to see if I could make a more efficient voxel mesh system using Unity's new DOTS stack, then quickly ballooned into a bunch of stuff, like simulated hydraulic erosion, procedurally generated forests, & a dynamic voxel-traced GI solution.




     
    Last edited: May 31, 2019
    dsilverthorn, razzraziel and hopeful like this.
  43. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    You need to re-profile with an actual build. The editor adds some GC and overhead. For example foreach generates GC in editor but not build.

    But even still 2-3KB per frame is tiny and I would be shocked if this is affecting your FPS much. But I could be wrong.

    The gradient GC is unlikely to be fixed as this is needed for cloud transitions, but I can look at removing get command buffers and the name compares, but again I do not think removing the GC will improve your FPS much.
     
  44. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    Refreshing 5.7.1 update with non-GC cloud probes and command buffers. Gradient API does not have a non-GC version, but I'm open to ideas. Should be available in a few hours.
     
    Vincent454 likes this.
  45. GlaireDaggers

    GlaireDaggers

    Joined:
    Feb 18, 2018
    Posts:
    13
    I have a bit of a hack in place right now that caches off the keys on startup, but probably not the most robust solution. Only other thing I can think of is something drastic like a custom editor for a custom non-allocating gradient type :\
     
  46. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    I have a command buffer and water reflection fix, but cannot upload asset due to Unity upload failing. When it goes through, new version to try is 5.7.2
     
    hopeful, Bzuco, Vincent454 and 3 others like this.
  47. Bzuco

    Bzuco

    Joined:
    Sep 6, 2015
    Posts:
    56
    Hi, I am assuming, that custom weather map in override slot is static and its clouds are not moveable. Can be added some velocity using texture offsets?
    Also if my measurements are correct the weather map(custom or procedural) is mapped in world space on area ~100x100 km...can I somewhere in shader or script change this area to much smaller e.g. max. 20x20km?

    I am on GTX 950 and its performance will be not enough to keep 60fps@1080p 8x8 temporal repro., half res., with other staff like terrain, trees, buildings, ...So my idea is:
    - prepare very small custom weather map ~16-64pix and set same weather map size in performance profile
    - have volumetric clouds only on area 20x20km or even smaller (my game area is 8x8km)
    - find beauty/performance compromise in sample count
    - adjust cloud shapes and details just using cloud noises (shape, detail, curl).
     
    dsilverthorn likes this.
  48. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    The weather map scale is defined on the cloud profile. Start with the simple performance profile then try good profile and maybe the beautiful profile.
     
    dsilverthorn likes this.
  49. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    5.7.2 null zone fix refresh being sent now. If you are having null zone issues, redownload this version in about an hour.
     
    Vincent454 and dsilverthorn like this.
  50. Bzuco

    Bzuco

    Joined:
    Sep 6, 2015
    Posts:
    56
    Map scale works only in Z axis for custom weather map, X/Y has no affect.
    I can limit clouds to 20km using mask feature.