Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Cloud System

Discussion in 'Assets and Asset Store' started by Dantus, Aug 16, 2011.

  1. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    OnWillRenderObject is the expensive operation in the Cloud System. That's where the mesh is generated, where the cloud particles are rotated towards the camera. The time used for this operation heavily depends on the number of cloud particles.

    How may cloud particles has your cloud?
     
  2. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    Yes it works, but you have to be very careful with the amount of cloud particles, because it easily destroys the performance. You can try it with Cloud System Free.
     
  3. cassius

    cassius

    Joined:
    Aug 5, 2012
    Posts:
    125
    Thanks for the follow-up.

    Well, there's quite a few. Right now there are 45 clouds consisting of about 150-250 particles each. Mind you, about half of those are off-screen in the distance at any given time. Do occluded clouds still generate the mesh realtime?

    If I understand you correctly, the meshes are being generated each frame, or any time there's enough camera movement to warrant it? If that's the case, is there any way for me to just generate the cloud meshes once and use that? My game is linear so I don't really need them having the particle rotations updated.

    $Cloud-System.jpg
     
  4. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    The meshes are only updated if they are visible: OnWillRenderObject. In the case that they are visible it is checked using some flags whether the cloud data was updated and if any relevant transform was changed. Those are e.g. the camera transform and the sun transform if the cloud renderer takes the sun position into account. If the camera was rotated, the cloud mesh will be updated.
    For your scenario, there is a straight forward solution. Make sure that the clouds are rendered once by the camera, such that the cloud particles have the correct rotation. Afterwards, deactivate all those CS_Cloud components. This will prevent any further further call to OnWillRenderObject.

    Hope this helps

    PS Awesome screenshot!
     
  5. cassius

    cassius

    Joined:
    Aug 5, 2012
    Posts:
    125
    Thanks a bunch, Dantus. This will kind of work. My camera does rotate, so I assume clouds out of the current/initial view aren't set up correctly until the camera faces them.

    I should add that this is crashing Unity a lot (sometimes for every change I make). The number of clouds doesn't seem to matter. Does the source code come with the paid version? I'm really liking this.
     
    Last edited: Jul 27, 2013
  6. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    Do you have anything, such that I can reproduce the crash? This should really not happen!

    I am glad you like it! Yes, you get source code with the paid version, which is contained in a Unity package.
     
  7. cassius

    cassius

    Joined:
    Aug 5, 2012
    Posts:
    125
    Unfortunately I don't really. It's not reporting any errors or anything from the build - Unity (4.1.5f1) simply closes.

    Glad to hear that we get the source code! I'm off to buy this right now. If it crashes on the paid version, I'll see if I can dig into the code and maybe figure out what's happening.

    Thanks again for all your help, and for the great plugin!
     
    Last edited: Jul 28, 2013
  8. Enno

    Enno

    Joined:
    May 26, 2013
    Posts:
    4
    Hi,

    your cloud system free crashes on my windows pc with unity 4.2.0f4 too. I have added one LightningCloud01 to my scene. Added a "moon-light" prefab as the sun-light just like you have done in your demo scene. Renderer: Simple Custom, Rendering Method: Shading Group. And whenever I hit the play button in the Unity Editor, unity.exe crashes.
    If I deactivate the LightningCloud01 before hitting play, everything runs perfectly stable. Only the "Simple Custom" Renderer crashes for me. Shuriken has a strange issue, where the cloud only shows when I'm looking directly at it. Legacy seems to work fine.

    Here's the crash-report/log bundle that unity generated https://dl.dropboxusercontent.com/u/24363935/crash_c4db664b39b57c4e979dbdadce7a6ed3.zip
     
    Last edited: Aug 9, 2013
  9. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    Thanks a lot for you report! I was able to reproduce the issue and I am going to investigate it over the weekend.
     
  10. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
  11. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    Found a workaround for the bug. Cloud System (Free) 1.8 was submitted. Thanks again Enno for reporting the bug!
     
  12. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    The new versions for Cloud System and Cloud System Pro are now available in the Asset Store.
     
  13. cassius

    cassius

    Joined:
    Aug 5, 2012
    Posts:
    125
    Great, thanks Dantus!

    I tried downloading it to see if it also fixes the crashes that I mentioned previously. However, I'm guessing since I installed the demo first, purchased it after and am now installing the "pro" edition over top, there's some problems with duplicate imported types. Here's the list of errors I'm getting... Maybe you know which files I need to remove or change? I had this same problem the previous time I installed Pro over the free version.

    These are all located in: Assets/Plugins/Editor/Cloud System/Scripts/

     
    Last edited: Aug 22, 2013
  14. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    @cassius, you need to delete the Cloud System folders before you import the new version, as described here:
    http://www.edelweissinteractive.com/products/cloud-system-free/update-guide/

    Let me know if that solved your issue!
     
  15. incendy

    incendy

    Joined:
    Aug 23, 2013
    Posts:
    8
    Does this work with the free version of Unity?

    Never mind, it does! Awesome work, this is phenomenal.
     
    Last edited: Aug 28, 2013
  16. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    Thanks :)
     
  17. cassius

    cassius

    Joined:
    Aug 5, 2012
    Posts:
    125
    Dantus,

    Just wanted to let you know that the latest version takes care of the crashing issue I was having as well (likely the same problem as Enno was having). Thanks for doing that update! Everything is running smoothly :)

    Also, your last suggestion worked perfectly.
     
  18. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    Thanks a lot for the confirmation!

    Anyone who likes the Cloud System (Free) is very welcome to write a review :)
     
  19. sparticle

    sparticle

    Joined:
    Nov 29, 2012
    Posts:
    4
    just felt the urge to post this:
    based on the "free clouds" example, but with a better sprite that was slightly colored with blue and sandbrown
    to fake ambient-light and a new shader which fades out particles as they get nearer to the camera.
    it looks even better with "Sorted Billboards" on, but takes a bit more performance.

    $clouds.jpg

    DEMO 1 : http://www.sheep.ch/unity/clouds (Billboards)
    DEMO 2 : http://www.sheep.ch/unity/clouds2 (Sorted Billboards)

    cheers!
     
  20. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    Well done!
    I really like the look. Thanks for sharing.
     
  21. golani79

    golani79

    Joined:
    Oct 9, 2013
    Posts:
    8
    Hey there - can anyone tell me if there is a documentation for the free version of the cloud system?

    I´d like to test it out for a project of ours but I´m kinda new to the whole Unity Engine and therefore it would be nice to have a documentation so I could look some things up.
     
    Last edited: Oct 9, 2013
  22. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    Welcome to the forum!

    You find the documentation in the Plugins/Cloud System/Documentation folder. The two pdf files are the required ones. Further there is are two videos on YouTube:
    http://www.youtube.com/playlist?list=PLE191400D14CFC713

    Hope this helps
     
  23. golani79

    golani79

    Joined:
    Oct 9, 2013
    Posts:
    8
    Thanks for the welcome and the information where I can find the documentation - this definitely will help :)
     
  24. cassius

    cassius

    Joined:
    Aug 5, 2012
    Posts:
    125
    I just wanted to share this video showing some of the results I've gotten using Dantus' cloud system.
     
  25. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    @cassius: That looks great! Though, I couldn't really spot where you are using the Cloud System and how.
     
  26. cassius

    cassius

    Joined:
    Aug 5, 2012
    Posts:
    125
    Thanks!

    It's all using the cloud system. For what I need, I generate the clouds then disable the cloud scripts (too much going on) that perform the real-time updates, so many of the clouds may not appear 3D. However, during the actual gameplay which immediately follows this scene, the cloud scripts are re-enabled allowing for a more 3D look to the clouds. The results in the above video are directly from your cloud system :)
     
  27. deantzy01

    deantzy01

    Joined:
    Oct 23, 2013
    Posts:
    11

    +1 this is too much - -
     
  28. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    The actual price was changed to $80 before anyone bought it.
     
  29. Airborn-Studios

    Airborn-Studios

    Joined:
    Oct 31, 2012
    Posts:
    30
    even then it would not be too much, it's a great tool which delivers good results. Of course it could be better, aber anyone claiming he could do the same for 150$ underestimates the time needed or the worth of his work.
     
  30. golani79

    golani79

    Joined:
    Oct 9, 2013
    Posts:
    8
    I came up with two more questions regarding the cloud system:
    Is it possible to animate the clouds and would the cloud system also be suited to create fog?
     
  31. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    Animating by modifying the position of each cloud particle is not possible at the moment. You could code it on your own, but it is fairly complex to get something useful.
    Other than that, you can rotate and move the cloud as you wish, change the transparency and there is also a fade slider. Those are the options that exist at the moment.

    It is up to you to decide whether it is feasible to create fog using the Cloud System. You have to decide whether it works visually for you!
     
  32. ChrisForrester

    ChrisForrester

    Joined:
    Nov 1, 2013
    Posts:
    1
    Hi there :) I'm trying to get this system working with cloud objects passing in front of the camera. They appear to be clipping, I was wondering if there is a clipping flag anywhere I could set to make this work properly? The whole cloud is clipping when it's middle is past the edges of the viewport.

    Also, I was wondering how to go about setting up normals on the cloud meshes? I want to apply some shaders but they all complain about normals missing.. I've tried getting the mesh from the gameobject and doing a RecalculateNormals, but this isn't working.

    I'm using the Pro version of the cloud system, with my company Interaxon.


    Thanks,
    Chris.
     
  33. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    Hi Chris, welcome to the forum!

    Can you send me a reproduction of that? That sounds like a bug. I assume you are using one of the custom renderers.

    You are right, there are no normals. The lightning cloud shader computes its own faked normals that are pointing away from the origin of the cloud. If that would be sufficient for you, I may help you to achieve the same.
    If you need another solution, please explain a little bit more detailed what you would like to achieve and how the normals should be.
     
  34. golani79

    golani79

    Joined:
    Oct 9, 2013
    Posts:
    8
    Thanks for the reply!
    I´ll do some further testing and speak to our programmers but I´m pretty sure that we will end up with the pro version of the cloud system :)
     
  35. stuckon3d

    stuckon3d

    Joined:
    Nov 9, 2013
    Posts:
    7
    hello everyone, i just got the plugin the other day. I'm having some weird pops on the clouds when i look up and down from my fps cam . Half way between up and down the clouds change look, is there a way to lock the clouds cards to y up.

    thanks in advanced.
     
  36. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    Which renderer are you using?

    Edit: Could you share some screenshots?
     
    Last edited: Nov 28, 2013
  37. tomato_comet

    tomato_comet

    Joined:
    Oct 17, 2013
    Posts:
    18
    I have a similar question about moving clouds. Can I simply make a cloud move across the sky without needing complex scripting for each "sub-mesh" (not sure of the term, I'm new)? In other words, a cloud is considered a single object even though it is made up of multiple smaller meshes?

    Not animating its shape, just changing it's position.

    Thank you very much.
     
  38. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    Yes, you can do that! Even if a cloud may consist of several shapes, it is technically just one mesh or particle system. That's why you can them as any other game object.
     
  39. golani79

    golani79

    Joined:
    Oct 9, 2013
    Posts:
    8
  40. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    The effect as shown in the picture can be achieved with the SunShaft post processor from Unity. As it is a post effect, you need Unity Pro for it. Otherwise you can only achieve it with lens flare. You need to check what works best for you. But this effect can't be produced automatically by the clouds. At least I am not aware of reliable techniques for that with billboard clouds.

    Clouds can't receive shadows. Though, you can fake it. You need a script that computes which clouds should receive shadow and then darken the clouds or change the shading groups colors or move the center of the shading groups up. Let me know if you need more information.
     
  41. golani79

    golani79

    Joined:
    Oct 9, 2013
    Posts:
    8
    Thanks a lot for the information - gonna talk things through with our guys and if I need any further information I´ll let you know.
     
  42. Shmaba

    Shmaba

    Joined:
    Sep 28, 2011
    Posts:
    6
    This is a really useful product and I like it a lot but I've run into a visual issue with the cloud particles. I'm allowing my camera to spin on it's z axis and when facing the clouds they also spin with the camera's z axis which can create a very disorienting effect when there are many clouds. Here's an animated image to demonstrate the issue of a few cloud particles moving when I spin the camera only on the z axis : http://oi43.tinypic.com/2rrvyif.jpg
    I'm not sure if there is any way for me to restrict the particle rotation on z axis, would like to know what anyone thinks
     
    Last edited: Jan 27, 2014
  43. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    Welcome to the forum!
    This effect is present in almost every billboard based particle system. For that reason, it also exists in the Cloud System. You can only minimize this effect by using rounded cloud particle pictures. If you have a look at the demo scenes, you'll see that most of the clouds are using almost rounded particle textures to avoid this effect.
     
  44. 2rusbekov

    2rusbekov

    Joined:
    Jul 12, 2013
    Posts:
    43
    Hi, Dantus! Very impressive clouds! But I have a problem. Cloud disappears when pivot point of cloud out of bounds of screen. How to fix it?
    And How to make 2 and more different clouds ?
     
    Last edited: Jan 29, 2014
  45. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    Welcome to the forum!

    Which cloud renderer and rendering are you using? This should certainly not happen.

    For each new cloud with a unique shape, you have to either copy an existing cloud in the project tab, or create a new one from scratch using GameObject -> Create Other -> Cloud. This will create a new cloud in the Project Tab.

    Just in case you are not yet aware of it, there is a tutorial video on YouTube:
    http://www.youtube.com/watch?v=2VNMOS557W8&list=PLE191400D14CFC713

    There is also a pdf with pretty detailed information that comes with the Cloud System.

    Hope this helps!
     
  46. 2rusbekov

    2rusbekov

    Joined:
    Jul 12, 2013
    Posts:
    43
    1st promblem in shuriken renderer. With simple costum works fine. Thank you for solution!
    2d: If cloud was added by "GameObject -> Create Other -> Cloud" works fine. But if i duplicate an existing cloud and modify it, in game mode copied clouds becomes identical to last modified cloud.
     
  47. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    1) I'll have a closer look at Shuriken, thanks for the information.
    2) Make sure that you copy the cloud in the project tab and not in the hierarchy tab. Then place the copied cloud in the scene.
    You have to think of clouds as if they were a material. The actual file with the cloud information is visible in the project tab. If you modify a cloud, it will modify the original file, like it happens with materials. In order to get another one, you need to copy the original file in the project tab, just like you need to work with materials.
     
  48. 2rusbekov

    2rusbekov

    Joined:
    Jul 12, 2013
    Posts:
    43
    Thanks for quick reply. I have no more questions!
     
  49. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
  50. rsoneriu

    rsoneriu

    Joined:
    Jan 31, 2014
    Posts:
    7
    Hello, one quick question if i may,
    I see that the cloud system free clouds dont have that much customization options. Actually they have highlights and tint, but it doesnt work.
    Is this something related to the free version? Could I have the clouds show a contour of some sort (using highlights and tint i mean)? I want them to look somehow cartoonish, like in the image that you provide for the platformer.
    How can i achieve that? Is it something related to the shaders? (this is what i mean: http://unityassetreview.com/demos/5700/cloud-system-free-25d-platformer-demo).
    But the link does say cloud system free so im really puzzled. Besides, is there some thorough documentation for each option on the cloud system? As what im doing now is trial and error. Would love to buy your product, but first i have to be sure that it is working and i can achieve my design with it.
    Many thanks in advance. A contact email would be also helpful, so i dont spam this thread like a madman :)
    Best regards to all fellow unity developers!