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
    Please have a look at this site to get an idea of the available features in Cloud System Free:
    http://www.edelweissinteractive.com/products/cloud-system-free/

    You have tint and shading groups as the available coloring elements. Take care to use the provided "Cloud/Cloud" shader to get the correct results. You should be able to get results that are relatively close to the ones shown in the platformer demo, but they won't have such smooth color blending as that is only available in the paid version. The demo uses all the available options and you can't reproduce it with the free version. You need to try it out and make experiments with the shading groups especially.
    Unity Asset Review is not an official site and I don't have the control what is shown there. I wasn't even aware that they are showing the demos. It is clearly misleading that the demos are shown with the free version as well. The only official site is that one: https://www.assetstore.unity3d.com/#/content/3594
    If you download the Cloud System Free, you have a reference manual at Assets/Plugins/Cloud System/Documentation/Reference.pdf where you find a detailed description of every available option. Just ask if you need more detailed information.
    The contact information are in Assets/Plugins/Cloud System/Readme.txt. Beside that you also find them in the actual Unity Asset Store. But I prefer it if you spam the thread, as others may find the information useful too.

    Just in case you haven't seen the video yet, it may be helpful to get a better idea:
    http://www.youtube.com/watch?v=tEflbzPw644
     
  2. rsoneriu

    rsoneriu

    Joined:
    Jan 31, 2014
    Posts:
    7
    Many thanks for your quick reply!
    Great work that you're doing with this.
    Yeh I did see the tutorial (ofc on my end i dont get the same results, but must be something that i'm doing). Will go look on the documentation and post back here if i need further info.
    The reason why i asked about the cloud shape and border (contour) was that i want to do something that looks like this
    http://www.mrdoob.com/lab/javascript/webgl/clouds/
    but not using fading bilboards or textures, but actual particle clouds (and your system looks quite resource friendly). Do you see how the clouds have contours? Do you think i an achieve something like that with your cloud system (the paid one, or roughly something similar with the free one?). All this would need is some contrast on the cloud outer edges, to make it look like it has a shape.
    Many thanks and great great work!
     
  3. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    You can already achieve that with the free version. Just use your own texture atlas with the shapes and the contrast you want.
     
  4. valyard

    valyard

    Unity Technologies

    Joined:
    Jun 4, 2010
    Posts:
    291
    Hi.

    I'm testing the free version and I found that in editor it lags A LOT.
    I attached profiler screenshot which shows what's going on.

    Unity Pro 4.3.4.

    In builds there are not noticeable lags.
     

    Attached Files:

  5. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    There are many factors that influence the performance in the editor. First it depends on the amount of open Scene and Game views. How many of them do you have? There is also an Accelerate setting that influences the performance. Is it enabled? Do you have any scripts running that modify the clouds?
    Which Renderer and which Rendering Method are you using? How many particles does the cloud have? Does the performance change if you use Legacy or Shuriken as Renderer?
     
  6. valyard

    valyard

    Unity Technologies

    Joined:
    Jun 4, 2010
    Posts:
    291
    I got 25 clouds 150-250 particles each.
    I've been using "Simple Custom" renderer. Switched to Shuriken and this particular lag disappeared.
    I'm not running any scripts, the clouds are static. Accelerate is enabled.

    With Shuriken it looks like clouds are turned off when their centers are outside of main camera which results in big jumps when I move the camera )8
     
  7. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    That is rather unexpected. Can you send me a reproduction? I made several experiments but was not able to get the same results.

    That happens due to a Shuriken bug. You may vote for it here:
    http://issuetracker.unity3d.com/issues/shuriken-is-culling-particles-when-were-using-setparticles
     
  8. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
    i read somewhere unity can merge shuriken sun ! it's can be nice update for mobile
     
  9. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    Sorry, I am not sure what you mean. Do you mean I should make an update or Unity?
     
  10. golani79

    golani79

    Joined:
    Oct 9, 2013
    Posts:
    8
    Is it possible to bake the lighting information into the cloud system?
     
  11. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    Which lighting information would you like to bake? And what is your use case?
     
  12. golani79

    golani79

    Joined:
    Oct 9, 2013
    Posts:
    8
    We´ve got a cloud system (Vertical Color With Shading Group) and a directional light as sunlight linked to it.

    As we are baking the lighting information into our textures the question came up if it would also be possible to bake the lighting information from the directional light (sun) into the clouds themselves and if this could improve performance.
     
  13. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    You could bake the lighting for one specific camera rotation. If the rotation is changed, the lighting needs to be calculated again. In general, that's not recommended.
    You may do that for clouds that are very far away. But in that case there is a simpler solution. You may render the cloud from a position where the camera is supposed to stay and then just deactivate the cloud script. This means the cloud will not anymore be updated and you will just have a mesh that is being displayed. This require the (simple) custom renderer option.

    There may be other solution we could consider. But I would need more information about how you intend to use it.
     
  14. rsoneriu

    rsoneriu

    Joined:
    Jan 31, 2014
    Posts:
    7
    Hello Dantus,

    It seems when I choose iOS as the build setting, the clouds start showing their borders. When I run it on the test device, they also show borders and look kinda strange. Ill attach an iPhone screenshot so you could understand better what I mean.
    I am on the cloud system free. Do you think its something related to this? Or is this related to unity? Would the cloud system pro solve this problem?
    Many thanks!

    $IMG_2270.PNG
     
  15. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    This is a shader or texture issue and Cloud System Pro won't have an impact on that. Which shader are you using?
     
  16. rsoneriu

    rsoneriu

    Joined:
    Jan 31, 2014
    Posts:
    7
    Well pretty much I've tried all of them (to see if the issue goes away).
    I am currently using the cloud shader.
    I found that the only texture that looks ok is the one at uv index 7. Also, if you lower the alpha on other textures, depending on the texture, the lines are less visible.
    There is another issue also: i made a script that adds clouds after the current cloud object (to give the impression that you're flying through them). However, in 3/5 cases, something strange happens with the added clouds, they get flattened somehow and I have to delete the prefab and to re-create it. If I wont mess with it they will be alright, if I change things (as I'm experimenting the shades, tints, sizes, particles...so a lot of things are modified on the prefab), they will again get flattened, and each new instance is flatter than the previous.
    EDIT: hmm it seems it has something to do with the scene viewing angle. I think they align to it and not to the game object camera.
     
    Last edited: Mar 30, 2014
  17. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    I am going to have a closer look at this topic and I will try to reproduce the issue.
     
  18. rsoneriu

    rsoneriu

    Joined:
    Jan 31, 2014
    Posts:
    7
    I can confirm their "flattening" being related with the scene viewing camera. If you look at your scene perfectly aligned with the centre (you can only see the front side of the square in the upper right corner, the one that has the x-y-z axes) the clouds will look good - that is if your game camera is aligned with only one axe. If you see more than one side (so your scene viewing angle covers more axes), the clouds will align to it, thus in the game camera window they will appear flattened. So your camera viewing angle has to be aligned with the scene viewing angle, else the clouds will look strange.
    I can't say anything about the little lines. I managed to make it look somewhat better (almost nothing shows on my mac) but on the iPhone there are still lines. A lot dimmer, but they are. Also, the transparency looks a bit strange on iOS (it has a blur or something, as you can see from the screenshots).
    Thanks for looking up into this!
     
  19. rsoneriu

    rsoneriu

    Joined:
    Jan 31, 2014
    Posts:
    7
    Did you find the time to have a look at this issue?
    Many thanks!
     
  20. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    Yes, I looked into the issue. I could reproduce it, but was unable to resolve it yet.
     
  21. gian-reto-alig

    gian-reto-alig

    Joined:
    Apr 30, 2013
    Posts:
    756
    Hi Dantus

    I bought your Cloud System as it is the first really convincing volumetric cloud soluation I've seen in the asset store. I am trying to build a cloud layer system with animated clouds with it. But I am stuck on two things:

    - The clouds seem to be not animated even though they seem to be particle systems. Is there a technical reason for that? Or is it possible to animate the particles in the cloud?
    - Duplicating the cloud does not really work. The duplicated cloud is then closely linked to the original, all changes on either of them transfers over to the other. Any suggestions on how to duplicate the cloud without this behaviour, or how to generate a new cloud with the same settings and colors but a different shape?


    Thanks for any help.


    Regards

    Gian-Reto
     
  22. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    What kind of animation do you have in mind? At the moment, you can fade the clouds in and out in the inspector. Besides that you can modify the particles with custom scripts.

    You have to duplicate the cloud prefab and work with that one. The actual data about the cloud is stored within the prefab and if you place it in the scene, it simply visualizes it and modifications are applied to the internal data within the prefab. You may compare it e.g. to materials, just a little more complex, but the principle is the same. This is also mentioned in the documentation.
     
  23. gian-reto-alig

    gian-reto-alig

    Joined:
    Apr 30, 2013
    Posts:
    756
    Well, nothing too fancy, just something to make the cloud look more alive. Rotations and Translations of the particles at a slow speed.
    I guess the usual particle system practice of generating and destroying particles is kind of a waste of resources for something like a cloud...

    Is the shader capable of applying the vertical colors in global space to the rotated particles (so that the vertical colors don't rotate with the particle)?


    Ah, that explains it. Well, that shouldn't be to hard to do I guess. I think I have read that in the documentation now that you mentioned it, I just... somehow... forgot about it.


    Regards

    Gian-Reto
     
  24. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    Yes, it is absolutely possible to move and rotate particles. You find a simple code example here: http://forum.unity3d.com/threads/100808-Cloud-System/page8?p=1027362&viewfull=1#post1027362
    In the example, the color is changed per particle, but the position and rotation can be handled in the same way.

    Destroying particles is not allowed due to performance issues. But you may instead use the particle color to hide individual particles to achieve the same effect.

    There is no shader to handle vertical colors. Could you show me, why this is relevant for you? I don't understand how this could be useful.
     
  25. gian-reto-alig

    gian-reto-alig

    Joined:
    Apr 30, 2013
    Posts:
    756
    Okay, that sound doable. So I could rotate, translate and scale the particles with a script? Any forecast about the performance cost of doing that?

    I will test it as soon as my current lightmap bake finishes.


    Most probably a misunderstanding... I meant if the shader would be independent of the rotation of the particles (which I guess it is, just wanted to be sure)

    I use the Vertical Colors to fake the lighting, which come from above and from below in a nighttime scene.
     
  26. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    You have to try it out. It mostly depends on the number of particles.


    Sorry, the misunderstanding was caused by me. Whenever you rotate or move a particle, the shading for it will be updated automatically. There shouldn't be an issue.
     
  27. rxmarccall

    rxmarccall

    Joined:
    Oct 13, 2011
    Posts:
    353
    Hello,
    I wanted to ask if the free version of the cloud system is allowed to be used in commercial products? I can't seem to find any documentation with the package that clarifies on this point.

    thanks
     
  28. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    You are allowed to use the free version in commercial applications or games. That is an asset store requirement.
    I assume you want to use it in an application or game and your goal is not to redistribute it?
     
  29. rxmarccall

    rxmarccall

    Joined:
    Oct 13, 2011
    Posts:
    353
    Ok thats good to know. yes it would simply be used in a game, not to redistribute.
     
  30. gian-reto-alig

    gian-reto-alig

    Joined:
    Apr 30, 2013
    Posts:
    756
    Hi Dantus

    Finally got some time again to look into the clous system. I stil struggle with the fact that I cannot create multiple clouds with different shapes.

    I think I might be completly doing it wrong. I just use the provided prefabs to create the first cloud (sky cloud prefab). then I tweak the look of the first cloud.

    I then try to somehow "break" the prefab connection by saving it as a new prefab.

    I create the second cloud again from the provided sky cloud prefab. But when I start tweaking shapes, and switch to the first cloud, the shape of the first cloud changes to the shape of the second.

    What am I doing wrong? I guess its something stupid, most probably I have to really break the prefab connection, but it seems I cannot get it to work.


    Thanks for the help.

    Gian-Reto
     
  31. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    Whenever you modify a cloud, you directly modify the data in the prefab. If you want to create a variant of a cloud, you need to first duplicate the prefab, create an instance of it and then modify that one.
     
  32. WhoRainZone1

    WhoRainZone1

    Joined:
    Oct 6, 2013
    Posts:
    15
    Hello Dantus,

    First of all, I'm pretty astouned by your clouds, as they provide a good look&feel with good performance. Only thing I'm trying to get a workaround for is the lack of shadows casted onto terrain/other meshes as seen in this picture.



    Since transparency shadow's are not possible with unity yet, I could use projectors that get the shadows texture from a topdown view of the clouds only, where I invert and adjust those colors accordingly. The only problem I am not sure this would look like I expect it to look, also this is going to be an aweful lot of tweaking since I've got a rotating sun.

    To come to my question, do you have any experience in trying to accomplish this? Maybe even some better approaches?

    Edit:
    Another idea could include perlin noise that's used as a base to cast a ray from the cloud in the direction of the sun and project the clouds shadow to that point. That actually sounds quite promising to me, so I'll just try it as a concept without using perlin noise until I get it working.. i'll report back!


    Cheers, WRZ
     
    Last edited: Jul 20, 2014
  33. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    Unfortunately, I am not aware of a good solution. You mentioned the possibilities with the pros and cons already. Those are the techniques I am aware of that are used by Cloud System users.
     
  34. WhoRainZone1

    WhoRainZone1

    Joined:
    Oct 6, 2013
    Posts:
    15
    Thanks for your reply, that led me to just trying out that Idea, and I got it working by with the raycasts!

    For anyone who wanna do this too here's the quickguide:
    1. Create an empty gameobject , name it "CloudShadow" and add a projector component to it.
    2. Rotate the gameobject by 90° on the x-axis to point down.
    3. Change the projector to "Orthographic" and a high enough "Far Clipping Plane".
    4. Set your material - I've used the "Shadow Material" from the standard assets for the picture.
    5. Create a C# script called "CloudShadow" and add it to your "CloudShadow" gameobjec.
    6. Insert code in the pastebin link below (seems like the forums don't have any codetags?)
    http://pastebin.com/wx8eFF2W

    I've also managed to get up a little video! It's pretty nice that you have no performance hit as far as I can tell, and it's easily set up.

    https://www.dropbox.com/s/jd5dx7vnxuiajy7/Unity 2014-07-21 05-48-24-44.avi
    (sorry for the sound, was watching Malcolm in the middle.. ^^)

    Edit: Ok, after a little testing I've seen that they tend to have some impact on performance.. something to do with culling. I'll edit this post again when I find a solution for that.
    Cheers, WRZ
     
    Last edited: Jul 21, 2014
  35. gian-reto-alig

    gian-reto-alig

    Joined:
    Apr 30, 2013
    Posts:
    756
    Okay, got it to work. Strange that the option is only visible in the Edit menu but not the context menu...

    Now I get a different kind of problem though. I have mountains in the far Background that are basically flat polygon strips with a transparent shader. Also, I have a Moon as a polygon object in the sky with an additional atmosphere object with transparent shader.

    If the clouds happen to be displayed before this transparent objects, they get transparent (like transparency of the clouds is falling to half the value it should be)... now I am pretty sure that this might be a sorting issue in the transparent queue, but I am not enough of a shader pro to sort it out myself.

    Any idea what I could do so the behaviour of the clouds is consisten no matter what they are drawn in front of?


    About the cloud shadows: Somebody on the net gave the idea to use Cookies for the directonal light and moving the light itself. I have not tried it out myself, but if I do, I will post my findings.


    EDIT: Wow, that worked well! I have now moving cloud shadows, with minimal FPS impact.

    What I did:

    - Create a cloud texture in Gimp, adjust brightness and contrast until it looks nice. MAKE SURE IT TILES NICELY!
    - Wrap the directional light in an additional game object that is not rotated (for easy translations)
    - Add a script to the additional game object that moves it slowly in one direction and resets to 0 as soon as the max (2048 in my example) is reached.
    - Add the cookie to the light, adjust the size.
    - Hit play and enjoy!

    I still need to tweak the strength of the shadows, they seem to dark. But this is a 1 minute job in Gimp.

    Also, of course the shadows and the clouds at the moment do not match. I might change that later on by creating a helper plane projecting the cloud shadow texture to the cloud height to get a rough guideline how the clouds should be layed out.

    But as in my case the player does not have the option to look straight up, it might not even be too noticable as long as its not total off (big clouds and small shadows).
     
    Last edited: Jul 21, 2014
  36. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    Really good ideas about shadows! It just came to my mind that the light cookie idea was already mentioned once.

    @gian-reta alig, there are a few possibilities. The simplest possibility would be use a different shader for the other objects, like a cutout shader instead of a transparent one. But in general there shouldn't be a problem if they are also being rendered in the transparent queue. Like that you get the usual back to front rendering you would expect.
    Which queue are the shaders for the moon and mountains using?
     
  37. gian-reto-alig

    gian-reto-alig

    Joined:
    Apr 30, 2013
    Posts:
    756
    Sadly cannot check it hands on, but from memory:

    Mountains use standart unity cutout unlit soft shader, the planets atmosphere uses a custom transparent shader from the unity space asset package.

    What I forgot to mention though is that before the mountains I use a poly strip with a fog texture which uses a unity transparent shader (maybe particle)...

    I think I will check the shader code to see if there is anything suspicious, and maybe switch off the fog layer to see if the problem is only with transparent shaders or also cutout.
     
  38. WhoRainZone1

    WhoRainZone1

    Joined:
    Oct 6, 2013
    Posts:
    15
    Hey, unfortunately I don't have any clue about the transparency bug either.. shaders are still black magic to me somehow!

    But that cookie shadow on the sunlight will probably fit well in my projector system , so the shadows look a bit more realistic as you blur out the shapes of the single cloud shadows itself. Could improve that a lot. For your "problem" of shadows that are aligned to the cloud/sunrotation - my solution up here does exactly this, in case you want accurate shadows.

    Oh and Dantus, do you know a problem where recalculating the shapes/creating particles does hang up everything (unity needs to get killed via the task manager)? Unfortunately I don't have any more info on when this happens or what is influencing this, as it happend very randomly, but as said only when "Create Particles" is pressed. I'm using the Pro as a trailversion at the moment in case this info is crucial.
     
  39. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    If you would like to have actual help from me, it would be most productive if you could send me a reproduction. Otherwise it is really hard to understand what is actually going on.
     
  40. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    I am not aware of that kind of bugs at the moment. I may be able to find the cause if you could send me the editor log.
    http://docs.unity3d.com/Manual/LogFiles.html
     
  41. WhoRainZone1

    WhoRainZone1

    Joined:
    Oct 6, 2013
    Posts:
    15
    Ah ok, I'll add that as soon as I can but as I avoided doing so since encountering this, my logfile is pretty cluttered. Let's see, I'll make some new cloud prefabs then :D
     
  42. gian-reto-alig

    gian-reto-alig

    Joined:
    Apr 30, 2013
    Posts:
    756
    Did some more testing, and had a look at the shaders involved... it looks like this problem happens if the camera is far away from the clouds. As soon as you zoom in in the editor window, the cloud becomes opaque.

    I'm now more confused than before :)

    Shaders involved are the unlit soft cutout unity shader, and a custom particle shader. All have ZWrite Off, but of course I cannot turn this on (as then the transparent/cutout shader behind it gets overwritten).

    Heres an image that shows the transparency bug and how the cloud looks closer up (without the bug):


    Any idea why this bug only appears for clouds in the distance?

    It will gonna be hard to send you my main project as this is incredibly large (yes, I need to clean it up urgently). If you really need it I can create a small test project to show you the bug this weekend.
     

    Attached Files:

  43. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    If you want me to have a look at the issue, a reproduction is needed.
     
  44. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    I would like to inform everyone, that the Cloud System Free will disappear. Everyone who is interested should get it as long as it is still available.
     
  45. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    Funny. Yesterday i was thinking about combine your free system and this new tool. Maybe you have thought about this futur...'danger'. :p
     
  46. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    Absolutely not! I really appreciate it if the tools are used.
    But I am everything but happy regarding freely available packages in the asset store. As there is no possibility for me to improve it, this is the only consequence that is left.
     
  47. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    Thank for the reply.
     
  48. gian-reto-alig

    gian-reto-alig

    Joined:
    Apr 30, 2013
    Posts:
    756
    I will prepare a test scene on friday and send it to you ASAP.
     
  49. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    The removal of the Cloud System Free from the asset store is going to take place within the next few days.
     
  50. gian-reto-alig

    gian-reto-alig

    Joined:
    Apr 30, 2013
    Posts:
    756
    I reproduced the problem. Now it is clear what is causing it.

    Its the transparent shader of atmosphere and fog layers. All transparent shaders seem to create the same problem.

    When you open the project, all you need to do is to move the camera so that the cloud aligns with the mountain and the atmosphere layer. You will see the problem where the mountain layer and the atmosphere layer meet.

    Here you can download the package with the test project:

    EDIT: Oooops, the package was missing the scene! Now with scene:
    http://ubuntuone.com/5LYCPlgzwFCjSaIDkvnE8B

    Any idea what I could do to solve this issue?
     
    Last edited: Jul 25, 2014