Search Unity

[Released] True Clouds - volumetric clouds for Mobiles & PC

Discussion in 'Assets and Asset Store' started by marserMD, Jan 18, 2018.

  1. marserMD

    marserMD

    Joined:
    Aug 29, 2014
    Posts:
    191
    True Clouds is a plugin for rendering volumetric artist-driven clouds, targeted on mobile devices.

    It works as a post-effect, making the performance cost independent from clouds count and volume.
    It is fast.

    Workflow is as simple as it gets:
    1. Add a component to the camera.
    2. Place cloud meshes on scene
    3. Play with settings
    Features
    • Volumetric clouds rendering
    • Full artistic control (any mesh can be rendered as a cloud. Even skinned animations are possible)
    • Noise generator included (various options to get a variety of noises. Developed specially for clouds)
    • Customisable quality/performance balance
    • And yes, it's fast.

    Asset Store | Documentation | Android Demo | PC Demo


    Mountain.jpg Cloud.jpg
     
    Gametyme, Neviah and Hikiko66 like this.
  2. marserMD

    marserMD

    Joined:
    Aug 29, 2014
    Posts:
    191
    Russian speaking fellas, I've made a post describing the algorithm behind the "True Clouds" on Pikabu.

    Dear Reddit users, which subthread should I use to make a similar post? Can I add a link to the asset? Should I go in-depth with every tiny detail, or keep it more entertaining in an overview manner?
     
  3. marserMD

    marserMD

    Joined:
    Aug 29, 2014
    Posts:
    191
    Already working on the first update:
    • spell check errors
    • bugfix: perceptual blur distance depends on the screen ratio.
     
  4. brisingre

    brisingre

    Joined:
    Nov 8, 2009
    Posts:
    277
    Looking good!
     
    marserMD likes this.
  5. ChezDoodles

    ChezDoodles

    Joined:
    Sep 13, 2007
    Posts:
    107
    Smoke

    As I commented on the product page on the Asset Store, I find True Clouds very interesting for generating and animating smoke - in my use case, for steam locomotives and steamboats. Even the top train simulators have very dull smoke - most are using animated alpha billboards. I have tried to find a solution on the Asset Store for a very long time - but with no luck. Have also implemented a number of solutions myself - but they have all failed either because they did not look good enough or because of performance issues - or both. Lit normal mapped animated billboards, metaballs, voxels, sliced layered textures with clever post-processing, ray marching cubes, dx11 volumetric stuff, etc.

    BUT - this solution actually works! On ALL devices - very nice :)

    However, I have one problem - when you zoom out - away from the trains, only the fluffy parts remain. It looks like the fluffy "border" area have the same size no matter how far away. Would it be possible to scale the necessary values by distance from camera?

    So that a smoke-trail would still keep its overall shape even if it is far away from camera. Right now, it all blurs out and disappears... Any ideas?
     
  6. ChezDoodles

    ChezDoodles

    Joined:
    Sep 13, 2007
    Posts:
    107
    Would it be possible to tint the color by vertex-colors in the models...?
     
  7. marserMD

    marserMD

    Joined:
    Aug 29, 2014
    Posts:
    191
    I have thought about automatically reducing blur size depending on the distance to the pixel. But it would mean that at some distance blur size might become less than the downsampled pixel size, leading to horrible aliasing.

    Despite of that, I believe that it's worth trying out, I'll send you a development build once something reasonable is achieved.

    If you can't wait, there is something you could try out now:
    Since you have a top-down game, you can decrease BlurRadius as the camera goes up and increase it as the camera goes down.
     
  8. marserMD

    marserMD

    Joined:
    Aug 29, 2014
    Posts:
    191
    Something like that is highly unlikely to be achieved without a serious (1.4x) performance impact on the cloud system, and I wouldn't like that.

    I do believe that it would increase the value of "True Clouds", so I will think about it and maybe come up with something clever:)
     
  9. marserMD

    marserMD

    Joined:
    Aug 29, 2014
    Posts:
    191
  10. ChezDoodles

    ChezDoodles

    Joined:
    Sep 13, 2007
    Posts:
    107
    I would not mind a 1.4x performance drop ... seriously that is not a problem. If it is an option, it would not affect anyone but those who enable it...

    I agree. There are quite a few cloud solutions already. Yours is very good for what it does - but this would broaden the audience to any kind of rocket propelled weapons (1st person, 3rd person, rts), flight sims (smoke trails), race cars (just look at the smoke trails in the demo video for one of the most popular racing solutions on the asset store) and basically anything where high quality smoke and trails are important :)
     
  11. marserMD

    marserMD

    Joined:
    Aug 29, 2014
    Posts:
    191
    Hacked up following demo:

    There obviously are clouds at different distances and they keep their overall shape, as desired.
    You can notice though, some artifacts:
    upload_2018-1-22_0-33-6.png

    Despite of that, it looks promising. I will keep the work to see what can be done to address those artifacts.
    I obviously don't want to make an overly complex asset or to get a performance hit even if some feature is not used. So It will take some time before this feature reaches a point where I'm satisfied with it.
     
    coverpage and brisingre like this.
  12. marserMD

    marserMD

    Joined:
    Aug 29, 2014
    Posts:
    191
    That might be the case for you, but not for the mobile devs.

    Regarding optional tinting: I still have to make a graphics pipeline which incorporates this feature, which is far from trivial in this case.

    As I said, I'll think about it, but no other promises yet.
     
  13. ChezDoodles

    ChezDoodles

    Joined:
    Sep 13, 2007
    Posts:
    107
    I see the artifacts - BUT - for the use case I describe they will be hard to notice. Smoke and trails are usually very fast moving (a smoke "blob" will typically complete its full animation cycle and disappear in 1 to 2 seconds).
     
  14. marserMD

    marserMD

    Joined:
    Aug 29, 2014
    Posts:
    191
    Good.

    As I said, I'll send you a development build as soon as I incorporate this hack into my system.

    And it will take some time before it's production-ready.
     
  15. marserMD

    marserMD

    Joined:
    Aug 29, 2014
    Posts:
    191
    For those who are following on this one: I have some pretty good progress, almost no artifacts are visible. Although this result will require some tweaking of values in the editor.



    ChezDoodles, you can expect to have your build tomorrow.
     
  16. marserMD

    marserMD

    Joined:
    Aug 29, 2014
    Posts:
    191
  17. marserMD

    marserMD

    Joined:
    Aug 29, 2014
    Posts:
    191
    VR testers found:)
     
  18. clagrens

    clagrens

    Joined:
    May 19, 2017
    Posts:
    96
    Hello ?I want to ask does it support "fly thourgh the cloud"?

    I making a flight game..thansk
     
  19. clagrens

    clagrens

    Joined:
    May 19, 2017
    Posts:
    96
    And does it support transparent? For example , addtive particles
     
  20. marserMD

    marserMD

    Joined:
    Aug 29, 2014
    Posts:
    191
    Hi! No, "True Clouds" currently don't support rendering from inside the cloud. There is a research planned on that topic but can't promise any results.

    Yes, it does support transparent objects, but only if they are in front of the clouds (transparent objects hidden behind the clouds are still rendered).
    Cutout objects are fully supported: both in front and behind the clouds.

    There is a workaround for fly through, which may or may not be acceptable depending on your gameplay.
    You could disable clouds rendering on entering cloud's trigger and enable a dense fog.
     
  21. marserMD

    marserMD

    Joined:
    Aug 29, 2014
    Posts:
    191
    As promised, sent you a development build.


    There is one new slider in the Blur section.
    upload_2018-1-23_20-43-45.png

    I would recommend a value between 0.4 and 0.6, although mathematically correct value would be 1. Please tell me what you think so that I could adjust the default values.

    Also with Depth Filtering enabled I'd recommend
    Blur/Threshold minimum of 0.4
    Blur/Power minimum of 1.5
    Please refer to the docs if you struggle to understand what they mean.

    But basically, these values will help you avoid hard edges.
    Screenshot.png
     
  22. marserMD

    marserMD

    Joined:
    Aug 29, 2014
    Posts:
    191
    BTW, when you change the Depth Filtering Power, obviously some clouds will become less blurry and some other -- more. The "focus point" of this blurring is General/Approximate Distance: all clouds located near that position stay as blurred as they were.
     
  23. marserMD

    marserMD

    Joined:
    Aug 29, 2014
    Posts:
    191
    I was thinking about something else -- about having multiple point lights or something like that. And I realized that something deferred lightning for clouds is possible since I already have all the data: albedo, normals, depth. That means as well that various effects are possible including volumes of light/shadows.
    Would you be able to make what you want given that this technique is implemented?
     
  24. ChezDoodles

    ChezDoodles

    Joined:
    Sep 13, 2007
    Posts:
    107
    Wonderful! This is REALLY useful. Now smoke-trails look good even in the distance.
    Personally - for smoke-like behavior in the supplied mobile-demo-scene, I prefer "Depth Filtering Power" set to 1, in combination with "Power" above 2, "Threshold" around 0.6 and "Radius" 30.
     
    Last edited: Jan 23, 2018
  25. marserMD

    marserMD

    Joined:
    Aug 29, 2014
    Posts:
    191
    Glad to hear that:)
    Will wrap up an official update within a few days.
     
  26. marserMD

    marserMD

    Joined:
    Aug 29, 2014
    Posts:
    191
    Have released an article on a Russian IT resource about rendering technique of my volumetric clouds.
    Got in top trending in no time!

    I'm going to make an article on Reddit as well, but don't know what is the best way to create an illustrated tutorial.
     
  27. marserMD

    marserMD

    Joined:
    Aug 29, 2014
    Posts:
    191
    Good news:
    • My teaser on Reddit got a bit viral!
    • An update is coming up featuring depth filtering for blur!
    Bad news:
    • I got scammed into giving away a voucher. And I don't want to give him any updates, so we'll have to wait for his promo code to be blocked:(
     
  28. marserMD

    marserMD

    Joined:
    Aug 29, 2014
    Posts:
    191
    Peter77 likes this.
  29. marserMD

    marserMD

    Joined:
    Aug 29, 2014
    Posts:
    191
    True Clouds v1.1 featuring Distance Blur Filtering will be out soon!
     
    TooManySugar likes this.
  30. marserMD

    marserMD

    Joined:
    Aug 29, 2014
    Posts:
    191
    While waiting for the update to be reviewed, I'm already working on the next one. Today I have implemented optional higher precision for the depth map:

    Medium precision(current setting), far plane at 20 km:
    High precision(newly implemented), far plane at 200 km:

    I think that it doesn't get any better:) Have not tested the performance yet, but it shouldn't change much.
     
    Peter77 likes this.
  31. marserMD

    marserMD

    Joined:
    Aug 29, 2014
    Posts:
    191
    True Clouds v1.1 is released!
    Now including Depth Blur Filtering!
     
  32. marserMD

    marserMD

    Joined:
    Aug 29, 2014
    Posts:
    191
    The status of this task has changed from "research" to "feature"
    Do you know what that means? That means, that you will be able to tint your clouds as you wish! (using something similar to deferred shading). Will post soon a WIP.
     
  33. marserMD

    marserMD

    Joined:
    Aug 29, 2014
    Posts:
    191
    Deferred tint/light/etc for True Clouds is in progress! And I can already tell that it will be both efficient and beautiful.
     
  34. marserMD

    marserMD

    Joined:
    Aug 29, 2014
    Posts:
    191
    Gruguir and Peter77 like this.
  35. marserMD

    marserMD

    Joined:
    Aug 29, 2014
    Posts:
    191
    Question for you, my dear readers:
    My GF is sleeping and It's late at night. What am I doing in the meanwhile?
    Scanning the clouds, of course!
     
    coverpage and brisingre like this.
  36. marserMD

    marserMD

    Joined:
    Aug 29, 2014
    Posts:
    191
    Last night was a great drunk night with my friends:) But today I'm back in business.
    I've added the first version of point lights for True Clouds. It's a deferred rendering technique executed ultra-fast in a downsampled buffer.
     
    brisingre likes this.
  37. marserMD

    marserMD

    Joined:
    Aug 29, 2014
    Posts:
    191
    Hey there, mr. smoke guy! Check it out!

    Once again during this project, I suffer from not being an artist and not being able to show off my asset properly.
    But I still think that it looks god damn cool!
    This can be done using deferred clouds rendering on a mobile phone.
    Moreover, it took me 1 hour to hack it up. Setting up clouds was 2 minutes. The rest was color picking and playing with unity particle system:)

    This is still WIP, but getting close to release:)
     
    tapawafo and Peter77 like this.
  38. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,618
    Looks good! You should make those videos a little longer, 5 seconds is just too short in my opinion. 30 seconds would work better for me.
     
  39. marserMD

    marserMD

    Joined:
    Aug 29, 2014
    Posts:
    191
    Thanks for the feedback:)

    These videos are pretty repetetive and uploading them takes some time, so I prefer to keep them small. You can check out/subscribe to my reddit (marsermd), I post gifs there so you can see the same contwnt indefinetly:)
     
  40. marserMD

    marserMD

    Joined:
    Aug 29, 2014
    Posts:
    191
    Give me some smoke you said... I have some:)

    Deferred negative lighting use case. This will definitely go in the next trailer!
     
    VIC20, Peter77 and brisingre like this.
  41. marserMD

    marserMD

    Joined:
    Aug 29, 2014
    Posts:
    191
    Two news.
    1. A bug
    True Clouds currently breaks motion vectors and normals in some cases.
    Hotfix before the next update:
    Add at CloudCamera.cs, after _tempCamera.renderingPath = RenderingPath.Forward; following line:
    Code (csharp):
    1. _tempCamera.depthTextureMode = DepthTextureMode.Depth;
    2.A collaboration
    There will be a collaborative demo which will make use of True Clouds and Mega Cache. I expect it to be legendary! Just imagine: truly simulated smoke + truly rendered smoke! It can't get better then that!
     
    tapawafo likes this.
  42. marserMD

    marserMD

    Joined:
    Aug 29, 2014
    Posts:
    191
    Last edited: Feb 13, 2018
  43. marserMD

    marserMD

    Joined:
    Aug 29, 2014
    Posts:
    191
    First results posted on Reddit!
     
  44. MikeUpchat

    MikeUpchat

    Joined:
    Sep 24, 2010
    Posts:
    1,056
    I see in your Train scene the smoke casts shadows, so would I be correct in assuming True Clouds can cast shadows?
    Nice demo scene, that is some great looking smoke.
     
  45. marserMD

    marserMD

    Joined:
    Aug 29, 2014
    Posts:
    191
    Well, It is not so much a built-in feature, but more of a hack. I have the same particle system which casts regular real-time solid shadows. So I just use Unity's shadows:)

    But it does the trick and game dev is all about illusions:)
     
  46. marserMD

    marserMD

    Joined:
    Aug 29, 2014
    Posts:
    191
  47. Abacadabad

    Abacadabad

    Joined:
    Jan 29, 2015
    Posts:
    2
    Hi @marserMD, thanks for your great asset, love how fast this runs. Just a couple of questions;

    a) Is there a quick fix to solve the depth issue with the Standard Transparency Fade shader? At the moment the transparent objects show up through the clouds (Transparent Cutout works fine, however).

    b) Is there a way to allow clouds to be affected by fog/haze?

    Looking forward to the next update – good job!
     

    Attached Files:

  48. marserMD

    marserMD

    Joined:
    Aug 29, 2014
    Posts:
    191
    a) Sorry, there is no quick fix for transparent objects. As True Clouds is a post effect, it is rendered directly before transparents.
    Cutout should work though.

    Could you tell me please if you are targeting mobile or pc?

    b) no, there currently is no way for doing so. I'll take it into consideration though.
     
  49. Abacadabad

    Abacadabad

    Joined:
    Jan 29, 2015
    Posts:
    2
    Hi @marserMD, thanks for your reply - I'm targeting mobile, so this asset is really useful.
     
  50. marserMD

    marserMD

    Joined:
    Aug 29, 2014
    Posts:
    191
    In that case, there is currently no way to have transparent objects occluded by the clouds:(
    It might change though, but you'd have to use my custom shader for transparent objects.