Search Unity

[released] Overcloud - Volumetric Sky And Lighting

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

  1. Duende

    Duende

    Joined:
    Oct 11, 2014
    Posts:
    200
    Hi, how do these volumetric clouds work? Do they use a noise map?

    My game creates the terrain at runtime, so if there is a mountain I need some tools in this asset that prevents the clouds through into the mountain. I don't know I explained well.

    Also It would be interesting some video where you show the asset in Unity, to see how it's in the inspector, or maybe some tutorial of use.
     
  2. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    259
    Hi! The volumetric cloud coverage is generated from two noise textures which are mixed together using different tile scales. The result is stored in a render texture (called the compositor), which is then read by the shaders which render the clouds. Currently, there is no way to prevent clouds from showing up in a specific spot but if you are comfortable with writing shaders and you have your height map available as a parameter, you could do an additional pass over the compositor and modify the result based on some rules (distance from height map, for example).

    If you are worried about the clouds clipping into the mountains, it is worth noting that they use the depth buffer to smoothly fade into the scene, so you will never get hard clipping artifacts.

    A "stamp" system is planned, where you can position objects which either paint in or out clouds based on some texture, however I haven't had the time to work on this yet.
     
  3. Duende

    Duende

    Joined:
    Oct 11, 2014
    Posts:
    200
    Thank you very much for answering! :)

    Well, I have no experience working with shaders, so that solution is beyond me. ^^U

    Mainly I am worried that a cave will be generated in a mountain and the cloud will get into that mountain, and therefore, get into the cave.
     
  4. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    259
    This could probably be worked around in two ways:
    1. Disable/fade the clouds when you enter the cave.
    2. Set the depth fade value really high = the clouds will fade against the background of the cave.
    In any case, I am confident it can be solved somehow. If you do decide to try OverCloud, I'll help you figure things out :)
     
    Duende likes this.
  5. iddqd

    iddqd

    Joined:
    Apr 14, 2012
    Posts:
    501
    Hi @Fewes

    Just double checking. If I understood the manual correctly, then I can use my own Skybox Material but still use everything else from Overcloud, correct?

    Obviously I'll have to match up sun/moon position and so on.

    Thanks
     
  6. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    259
    Hi! Yes, there is a toggle for overriding the skybox material. If it is off, you can just set your own material like usual in the Lighting window.
     
    iddqd likes this.
  7. iddqd

    iddqd

    Joined:
    Apr 14, 2012
    Posts:
    501
    Great, thanks for the info.
     
  8. Duende

    Duende

    Joined:
    Oct 11, 2014
    Posts:
    200
    Well, for now I have another asset to create volumetric clouds, but, although it allows me to edit the 3D noise texture that creates the clouds to prevent it from passing through my height map, it doesn't have the quality and realism that this asset has .

    I'll be aware of the improvements you add, if you add something like that, I'll definitely buy it. And in a future, I may buy it anyway and ask for your help.
     
  9. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    937
    Hi. Do you have some ideas to get the rain little deeper towards horizon with some influence from the atmosphere and the scatter mask?

    I tried some old NVIDia rain stuff and these compute shader clone from store. ZH rain.
    To heavy.

    Cheap way could be to bring your scatter mask and DetphInverseProjection https://github.com/keijiro/DepthInverseProjection
    in Post somehow together.

    Do you see some other ways for improving rain?

    Also little nice detail would be fireing the thunder (333m/s) later than than the flash depending from camera pos. ]
     
  10. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    259
    Hi, I'm not sure what you mean exactly. Do you mean the rain particles, the "wetness" feature or the rain depth mask? I actually already use that very same inverse depth projection. but it is used for calculating world position in image effect shaders. The scatter mask is not related to the rain but is used to mask out areas where the sunlight would not light the atmosphere.
     
  11. Ghost_101010

    Ghost_101010

    Joined:
    Apr 18, 2014
    Posts:
    10
    Hi, i was look for a solution about how to make a single shaped volume.
    I have see the billboard cloud video in your youtube channel, will it available or release in future?
    Cause i really like the effect and need hand set position , i have test something like vdb volume cloud,
    it was too slow in high fill rate, particles or billboard may be the right way.
     
  12. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    259
    Hi, OverCloud is not really inteded to render single volumes. There will be a stamp feature where you can position individual clouds using "stamp" textures in the future, however it'll be a little while before I have the time to add this.
     
  13. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    937
    Thats great. I am half way reading your code and the linked papers and did not arrived at the depth projection for image effects part.

    Have a look on the second video.
    https://twitter.com/i/status/1047949604472291328

    This comes close to what i tried to describe for short distances. For far distances under clouds same visual clustering of rain "puffs".

    Its more clustering the particles for far distances and improving visual quality and give more variation at closer distances.
     
  14. inkostyakov

    inkostyakov

    Joined:
    Nov 14, 2016
    Posts:
    48
    Hi! Is the feature to change 3D cloud params in runtime available in new versions? In need some way to set custom params, not only preset.

    And how to use cloud offset correctly? In LateUpdate, FixedUpdate? I tried to use it but I see how it moves.
     
    Last edited: May 13, 2019
    dyox likes this.
  15. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    259
    I think you can get the result in the video by adding a second rain particle system which generates the "puffs" you refer to.
    For distant clouds, some ray-marching would have to be done to darken the areas below them. This is currently not supported out of the box but I will think about adding it in the future.

    Hi! It is scheduled for the next update. I had to push it back due to some issues I had with implementing it. It will most likely be out this week.
    Do you mean the floating origin offset? It should be called from Update and the result will be updated the next time the camera is rendered. It might be dependent on your floating origin implementation but ideally it shouldn't be. Let me know if you are having problems with this and I'll take a look.
     
  16. inkostyakov

    inkostyakov

    Joined:
    Nov 14, 2016
    Posts:
    48
    I'm using FixedUpdate to move my objects. But I tried also Update and LateUpdate. And after change offset always get one incorect cloud frame. After that it becomes normal and works with offset.
     
  17. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    259
    OK. Just to be clear, you are shifting your entire world every so often, and not every FixedUpdate? Are you using a publically available floating origin script? If so I could try and replicate it to find a fix.
     
  18. inkostyakov

    inkostyakov

    Joined:
    Nov 14, 2016
    Posts:
    48
    Sorry! My bad! I used OverCloud.currentOriginOffset=offset instead of OverCloud.MoveOrigin(offset). With MoveOrigin it works fine!
     
    Fewes likes this.
  19. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    259
    Alright, that's great to hear that you got it working! I'll take a look and see if I can't make it so that setting the offset directly also works.
    Let me know if further questions pop up :)
     
  20. Gerard_Slee

    Gerard_Slee

    Joined:
    Apr 3, 2017
    Posts:
    11
    This looks incredible. How did I miss this launch. Added to wishlist. Will integrate as soon as budget allows.
    Great job!
     
    Fewes likes this.
  21. buc

    buc

    Joined:
    Apr 22, 2015
    Posts:
    123
    Can someone please post some information about FPS with a low performance impact setting? The demo allows some settings, but this is not included.

    background: my currently used cloud-system has 3 cloud types:
    The first 2 types (volumetric and particle) can't be used in my game, because the FPS drops from 85 down to 35.
    But the 3rd type (it's called flat clouds) has almost no performance impact (stays around 80-85 FPS).
     
  22. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    259
    I have updated both demos on the website to include a "very low" quality setting, which renders the clouds as a 2D plane instead. Hope this helps!
     
    one_one and buc like this.
  23. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    259
    Version 1.04 has been submitted for review, here are the patch notes:

    • Added a slider which can be used to control the atmosphere density. This should be used with care, as values other than 1 will break the physically based result.
    • Added a slider which can be used to control the far clip plane fade.
    • Added some static delegates to the main component which can be used to execute code right before or after certain events. These are: beforeCameraUpdate, afterCameraUpdate, beforeRender, afterRender, beforeShaderParametersUpdate, afterShaderParametersUpdate.

    Edit:
    It has now been accepted!
     
    Last edited: May 20, 2019
    Flurgle and keeponshading like this.
  24. wwg

    wwg

    Joined:
    Apr 2, 2014
    Posts:
    130
    I just discovered this and it really looks amazing!!

    Does anybody know if this will render correctly with Lux Water and/or R.A.M. water systems?

    @Fewes, is the demo scene included? If so, consider mentioning that in the store page along with links to this forum and the documentation manual.

    Thanks!
     
    dyox likes this.
  25. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    259
    Probably not out of the box since I am assuming they are rendered as transparent surfaces. I have added some new shader functions to allow for easier support of ocean/water shaders (they are not documented yet however) but you will still need to modify their shaders for this to work. I have tested this with AQUAS and it seems to work perfectly fine, but it depends a little on when they render the transparent surfaces (need to be rendered after OverCloud renders the clouds, which is in the AfterLighting camera event on deferred and AfterForwardOpaque on forward). I am working on a compatibility page for the website, which will include step-for-step guides on how to add OverCloud support to various other assets, but it will take a little while longer before it goes live.

    If anyone reading this post wants to give the new ocean shader functions a go, here's how to do it:

    1. Include the file "OverCloudInclude.cginc" in your ocean/water shader. You will have to make the include path relative to the directory of the ocean shader, so it will probably look something like "#include "../../OverCloud/OverCloudInclude.cginc"".
    2. For alpha-blended shader passes (Blend SrcAlpha OneMinusSrcAlpha), at the end of the fragment shader, add "OVERCLOUD_OCEAN_BASE(color, screenUV, worldPos)". color is the in/out color of the fragment, screenUV is the perspective-divided screen-space texture coordinate and worldPos is the world position of the fragment.
    3. For additive shader passes (Blend Add Add), at the end of the fragment shader, add "OVERCLOUD_OCEAN_ADD(color, screenUV, worldPos)" instead.

    As always, I am available if you need help integrating OverCloud into your pipeline.

    It is! Good idea, I will update the store page with this info. Thanks!
     
    wwg likes this.
  26. wwg

    wwg

    Joined:
    Apr 2, 2014
    Posts:
    130
    @Fewes - I know questions about performance are hard to answer, but when I run the demo on my machine, the FPS is in the high 30s for all but the high quality setting (mid 20s). The demo appears simple compared to a full game - no terrain colliders, vegetation, player controller, AI, etc.). I'm afraid if I add OverCloud to my game, it will become unusable. Would you say the demo performance on my computer is pretty representative of what I'd see when using it in my game?

    Thanks!
     
    Last edited: May 21, 2019
  27. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    259
    It should be, yes. If you'd like to maximize the performance of the demo, make sure that real time reflection probes are toggled off (R is the hotkey I believe) and try using the preset with sparse cloud coverage, coupled with the 2D plane rendering method.
    The demo performance is almost entirely dependent on your GPU, and in particular, rendering volumetric elements consumes a lot of fill rate, so you'll need a GPU which can chew pixels fast enough.
     
  28. wwg

    wwg

    Joined:
    Apr 2, 2014
    Posts:
    130
    OK, thanks.

    How much of a performance hit is just the skybox and simple clouds, without volumetric lighting, fog, etc? I currently use Unistorm for clouds and weather (nothing volumetric) and the performance impact is negligible. Ideally, I'd be able to dial the OverCloud settings back to achieve performance comparable to Unistorm on low-end machines.

    A couple notes about my experience with the demo:
    1. Toggling reflection doesn't noticeably change FPS.
    2. Toggling the post processing doesn't appear to do anything.
    3. The pause <space> button doesn't work.
    4. There is no option to change (reduce) the resolution. I've noticed that my video card really slows down when I go full screen (1920x1080) - Alienware Alpha i7, 8 GB, NVIDIA GeForce GTX GPU.
    5. It might be valuable to toggle some other options that impact performance. Maybe even toggle OverCloud or terrain completely off.
    6. I'm getting some black flickering on the terrain.
     
    Last edited: May 22, 2019
  29. ryanvalentin

    ryanvalentin

    Joined:
    Jun 24, 2017
    Posts:
    5
    I had some similar questions about improving performance - my rig is using a GTX 1080 and through my Oculus Rift I sit around 50 FPS at best on the demo scene, even with volumetric clouds turned off. In fact nothing really seems to improve the framerate beyond turning Overcloud off entirely. Turning off VR output gets me to a nice 90-120 FPS though on a 2k resolution screen.

    I do love the way the environment looks, and the game is certainly quite playable at the Oculus ASW-downsampled 45 FPS, but I'm not sure how lower-spec VR graphics cards will do. I'm just wondering if there is any way to hit that 90 FPS target or if there might be something wrong or unexpected about my setup?
     
  30. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    259
    The performance impact is not negligible even without the volumetric clouds, but it should be far lower than with them. As for your questions:
    1. This most likely depends on your hardware, but the settings for the probe are quite "nice", meaning it's no surprise if it doesn't impact performance.
    2. This is a bug, thanks for letting me know!
    3. The pause button doesn't pause the game, but rather pauses the time of day automatically moving forward. I'll change the UI text so this is more clear.
    4. You can grab the window and resize it to do this, but I realized while trying that this is quite awkward due to the cursor lock state. I'm not sure why Unity skips the settings window it normally displays while running a project, I'll see about getting it to show so you can change the resolution properly.
    5. Good idea, I'll see about adding both these.
    6. This is because of the cascaded shadows and has nothing to do with OverCloud, but I'll see about changing the settings so it looks more visually appealing.
    Do you mean the VR demo, or running the included demo scene in VR? The latter will perform worse as it uses deferred rendering (most likely the cause of your poor performance) and renders things like 4x cascaded shadows and reflection probes, both which are not recommended for VR performance.
    I am always looking to improve the performance, especially for VR (since this is what I use it for myself), but it is worth keeping in mind that rendering volumetrics is expensive, especially in virtual reality, and unlike many other volumetric cloud solutions, OverCloud allows for the camera to move inside and above the cloud volume, which prevents many performance tricks from being used compared to when the camera is only ever positioned below it.
    If you are talking about the VR demo, you should be able to get better performance than that with a 1080 though. I use a 1070 and am able to reach 90 fps on all quality presets, with "high" dipping below that sometimes depending on the camera position. Let me know if this is not the case and I'll look into what might be the cause.

    The best way to reduce the performance impact of the volumetric clouds in VR (besides lowering the camera settings) is to reduce the density of the cloud particles. This can be done by either:
    1. Reduce the particle count.
    2. Increasing the cloud plane radius.
    3. Decreasing the cloud plane height.
    The first two of these are found under the Volumtric Clouds section, the third is a weather preset parameter.
     
  31. buc

    buc

    Joined:
    Apr 22, 2015
    Posts:
    123
    Finally a talk about performance.

    I've looked into the code to remove gc allocs, which causes the garbage collector to get active from time to time and produce some stuttering (in a full scene game). Now it has 0 bytes per frame.

    Still playing with the settings, but changing the Downsample Factor (the component on the camera, called OverCloudCamera) has the biggest impact (from 30FPS in my full game scene up to 65 FPS). Some values you do not even recognize any visual differences, but get higher FPS. But it comes to your personal taste.

    Some calculations in the code might be cached. They get calculated every frame which makes it comfortable to see value changes in the inspector affected immediatly and do not need a restart, but maybe decrease performance.

    Since some users compare OC to their little impact sky-system: I also wanted a little impact with a great looking atmosphere, even when this means to have no volumetric clouds.
    So in my cloud-system before, I had 3 modes. The first 2 were not usable because of the FPS drop down to around 35 FPS. But the 3rd mode gave an almost none impact with around 70 FPS.
    With OC it is around 65 FPS without volumetric clouds and 60 FPS with volumetric clouds (all low settings which I thought could have an impact).
    So I'm losing around 5-10 FPS (depending if you want fly through clouds or not) and even if my low settings do not produce that beautiful clouds seen in the demo (though not all settings tested in combination), OC looks a lot better due to a more realistic lighting. Also, to stay fair, it is hard to get the settings of 2 different assets comparable in look and performance.
     
    wwg likes this.
  32. wwg

    wwg

    Joined:
    Apr 2, 2014
    Posts:
    130
    @Fewes - Sorry for all the questions and thanks for your quick and thorough responses! I'm super interested in OverSky. It looks absolutely amazing and would be perfect in my flight game. Assuming I can strike a performance/quality balance, I will likely buy it soon.

    A few more questions:
    -Does the weather change automatically, based on seasonal odds?
    -Is there a temperature variable (changing during day/night and seasonally)?
    -Does it support snow, or is that something we need to add via custom weather effects?

    @buc - thanks for the information on performance and further optimization tweaks...very helpful!
     
    Last edited: May 22, 2019
  33. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    259
    No problem, I'm here to answer any question :)
    1. No, but you could fade between different weather presets based on your own seasonal system/settings. The position of the sun and moon is physically based however and will change based on the date.
    2. No, but there is a system for adding custom float values per-preset, which are interpolated along the default parameters. It is not possible to fade these based on time of day however.
    3. Not out of the box. Again, you could use the custom float system for this, or you could couple the precipitation value with your own temperature system to determine if it should snow or rain.
    I think if you would like a seasonal system, you are best off creating this separately, then based on your current season/temperature/weather select an appropriate, pre-defined weather preset for OverCloud. Additionally you can overwrite individual parameters if you would like with the new beforeShaderParametersUpdate event.
     
    Last edited: May 22, 2019
  34. ryanvalentin

    ryanvalentin

    Joined:
    Jun 24, 2017
    Posts:
    5
    Welp, that seems to have done the trick! I'm up to ~100 FPS even with volumetric clouds on, with a reduced particle count and higher radius. I did also have to turn off Post Processing effects so I'll have to tweak those or make it look good without it. Either way I have something to work with and the environment still looks great, thank you!

    FWIW I was referring to my main project, which is running in VR single-pass, forward rendering. I've also tried a new project/scene, the example scene included, and with a built version to remove any potential editor overhead and get roughly the same result. I'm just happy not to be banging my head on it too much anymore.
     
  35. wwg

    wwg

    Joined:
    Apr 2, 2014
    Posts:
    130
    @Fewes - I bought OverCloud yesterday. Wow...it really is amazing! Nice work!

    I'm still trying to figure out the settings and dial-in the performance, but so far, it's working quite well and performing better than I expected on my machine. I will have some questions about getting it working with Lux and R.A.M. water, but a few other issues/thoughts first:
    1. Is the star intensity constant? I would expect them to be bright at night and not visible during the day. Maybe a curve to change star intensity throughout the 24 day/night cycle.
    2. I'm a little confused by the time variable. I've set my lat/long (47,-116) and month to 5. I'd expect 0 to about 5 to be dark, 12 would be noon and sunset about 8. Instead, it's bright from 0 to 2, then dark from 2 to 12, then bright from 12 to 24.
     
    Last edited: May 25, 2019
    inkostyakov likes this.
  36. bob-abc

    bob-abc

    Joined:
    May 26, 2019
    Posts:
    1
    Seeing FPS drop when flying through the clouds especially facing horizontal. Is this a known issue? Is it because of too much overdraw? Just testing the built in demo scene, Windows 10x64 1080 TI, latest Unity 2018.4.
     
  37. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    259
    Glad you like it! Here are answers to your questions:
    1. Yes, just like in real life the intensity of the stars is constant. If you want them to appear brighter during the night, I recommend either making your night lighting darker and using an eye adaptation post effect (this would be the more realistic approach) or write a small companion script which sets the stars intensity based on the time of day.
    2. This should be the case I think, but there might be some sign wrong somewhere. When setting up the lat/long system I tested it with various locations and times in the world and it matched up, but I might have gotten lucky with the result so I'll have another look, thanks for bringing it to my attention.
    Yes, this is to be expected as more particles are drawn for every pixel when you are inside the clouds. To lessen the impact this has on performance, try reducing the particle density by either lowering the particle count, increasing the cloud plane radius or lowering the cloud plane height.
     
    wwg likes this.
  38. buc

    buc

    Joined:
    Apr 22, 2015
    Posts:
    123
    Short: Setting all values to the lowest and even additionally disabling them, doesn't result in better performance.

    Background: The idea was to setup OC in a way to have it run with good performance when flying through the sky (this part works) and disable a lot of features when walking on the ground.

    But for some reason I do not get better performance, when disable everything except rendering the atmosphere.There is no difference in FPS (35 with volume clouds and 35 FPS with only atmosphere). So as soon as the scripts are running the performance drops to 35 FPS.

    Can someone confirm this, or am I doing something wrong?
     
  39. benthroop

    benthroop

    Joined:
    Jan 5, 2007
    Posts:
    263
    Buc check to see if the reflection probe is updating every frame and how it is configured.
     
  40. benthroop

    benthroop

    Joined:
    Jan 5, 2007
    Posts:
    263
    Hi @Fewes - Your work on this is exceptional. Thank you for releasing it!

    What are your thoughts on getting planar reflections of fog and clouds going? This is for lakes, in particular.

    Most planar reflection systems make a second camera, and I'd presume we'd need a second Overcloud Camera component on it. Any reason why that would or would not work? Eager to hear your thoughts.
     
  41. benthroop

    benthroop

    Joined:
    Jan 5, 2007
    Posts:
    263
    Ok so just want to share progress here. We're using Lux and modifying their Planar Reflection component. I've got it rigged up so the reflection camera is exposed and put an Overcloud Camera component on it. The result is that Overcloud renders over the reflected world geometry. There are also some lighting inconsistencies but I'm not that concerned about it right now.

    Here it is with Overcloud on the reflection camera.

    upload_2019-6-15_8-39-43.png

    And here with no Overcloud on the reflection camera.

    upload_2019-6-15_8-42-52.png

    Issues:
    - Overcloud draws after everything else
    - Atmosphere does not render on geometry in the reflection

    We're going to be banging on this and would love a hand. This work could be rolled back into OC and/or Lux. DM me if you have time/can help. Cheers.
     
  42. benthroop

    benthroop

    Joined:
    Jan 5, 2007
    Posts:
    263
    Sorry to spam but now I'm looking through the OvercloudReflectionProbe.cs file and there seems to be a good amount of work in here to making reflections work. Thinking this could be adapted for a planar reflection mode...
     
  43. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    259
    Is the reflection camera rendering a depth buffer? OverCloud might overwrite the fragments if not. Check out how OverCloudCamera calls OverCloud.Render to do the actual rendering for the camera, you could probably pipe that into your reflection rendering!
     
  44. buc

    buc

    Joined:
    Apr 22, 2015
    Posts:
    123
    Thanks @benthroop The reflection probe is disabled.

    It looks like some parts get still calculated, even when they are "disabled" and at least not presented in the view.
    Example: I disable the volumetric clouds, but when I change the settings under the volumetric clouds register, for example the compositor resolution from 1024x1024 down to 256x256, this influences the performance, even with disabled volumetric clouds.
    Of course this could be because for certain reasons like maybe it's needed in another places. But without the developer answering, this will be hard to grasp.
     
  45. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    259
    You are correct in that the compositor texture is calculated, even if volumetric clouds are disabled in the camera. This is because the compositor is used globally for all camera instances and so it is independent of individual camera settings. Lowering the compositor resolution is a good way to reduce the performance impact.
     
  46. buc

    buc

    Joined:
    Apr 22, 2015
    Posts:
    123
    Maybe a solution would be that each OverCloudCamera script registers to the main OverCloud script. And if there is no usage of functionality x this can be disabled completly. A faster but not that generic solution would be a "disable globaly" flag.
     
  47. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    259
    Much code is skipped if a feature is turned off, but I hadn't anticipated skipping the compositor completely. I'll see about adding this based on the current cloud coverage values.
     
  48. benthroop

    benthroop

    Joined:
    Jan 5, 2007
    Posts:
    263
    Hi Felix, thanks for the thoughts on reflections. If I understand you correctly you're saying the OvercloudCamera call to Render could be pulled out of there and put into the correct place in our reflection script. That makes sense.

    Another question: Is there a reason that the 2D Clouds are not part of the Weather Presets? Do you plan on tying them in at some point? If not I might figure that out on our end. Also, any thoughts on making presets Scriptable Objects? The benefit there is that they could be edited at runtime and would easily persist.
     
  49. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    259
    Yes, but now that I think about it, the Render function always renders to the currently active camera. If you look at the end of the function, you will probably be able to inject whatever render texture you want there (if this is how your reflection setup works).

    The reason the 2D clouds are separate from the weather presets is because it would require a complex system since they are user-defineable, and I wanted to keep it as simple as possible. If you would like to control the 2D clouds through the presets, you could define a custom float parameter and then modify the shader code for the 2D clouds to make use of it (for example multiplying their opacity value with your preset-controlled float).

    In hindsight the presets should have probably been ScriptableObjects. I don't have any plans on making them so, but if you really want then you could disable the weather preset functionality, and instead overwrite the values of OverCloud.current with values from your own, ScriptableObject-based system.
     
  50. Hunter_Bobeck

    Hunter_Bobeck

    Joined:
    Dec 9, 2015
    Posts:
    4
    Overcloud looks great for rendering a sky in my VR projects.
    I tried the VR demo and noticed some artifacting.

    Let me know if this gets fixed.
    Thanks for your hard work, Felix.