Search Unity

Volumetric Clouds

Discussion in 'Assets and Asset Store' started by Eideren, Oct 20, 2014.

  1. MitchL

    MitchL

    Joined:
    Aug 22, 2013
    Posts:
    5
    Haha, yeah, this seems like a pretty damn rough problem.

    For the workarounds - no go in my main project; I'm still seeing the same problem and the errors.

    That said, I started a clean project, imported VClouds, then Horiz0n, got the errors, and then reimported the shaders. That did fix the "o" error. So there is something to the workaround, it just doesn't work in my main project.

    I'm wondering if it's some specific project setting that could be the problem? Because in that same project, I imported UFPS and the workaround ceased to work. UFPS includes a bunch of project settings, though I have no clue what specific settings it'd be that could cause the problem.
     
  2. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    I don't really know either, this error is too deep into the engine for me to comment on.
    So this error shows up now because I need to use the position from the vertex shadow mapping to map the dithering correctly but doing that for some reason randomly duplicates the POSITION/SV_POSITION input when unity compiles the shader which makes that error come up, so either I remove the dithering or I recreate the mapping myself.

    I am doing the later but some strange artifacts shows up with the 3D texture so you'll probably have to give me a bit more time to work around this really strange error.

    @ledbetterman
    See above.
    I am sorry, I'll have to ask you to be a bit more patient while I fix this whole thing.
     
  3. led_bet

    led_bet

    Joined:
    May 5, 2015
    Posts:
    83
    Hey, I really appreciate you keeping us all up to date. Sucks there's a discrepancy between how the editor and final compilation handles the shader code. I know that's not easy to filter through (bless you for even doing shading programming... even with a CS degree, it still looks a bit like voodoo to me :) )

    Take your time; I look forward to the shader updates when they're ready.

    PS- I'm sure you've already considered it, but I've heard in the past that the Unity devs are responsive to this sort of issue with the engine. It would be worth their time knowing this duplication error is happening so they can push a fix in a future update.
     
  4. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    @ledbetterman & @MitchL
    Okay, looks like my fix is working ! I'll be uploading it today. As always, Unity has to review it before uploading it to the store so it won't be online until a few more days.

    If you really need it ASAP, send me a pm.
     
  5. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    Version 1.4b finally online, here's the very short changelog :
    Version 1.4b :
    Bug Correction
    • Fixed compile error on builds.
    • Fixed missing GI inputs.
    [\SPOILER]
     
    ThunderTruck likes this.
  6. led_bet

    led_bet

    Joined:
    May 5, 2015
    Posts:
    83
    Great, thanks!
     
  7. Project-Mysh

    Project-Mysh

    Joined:
    Nov 3, 2013
    Posts:
    223
    For what version of unity you fixed it? Because for me on version 5.1.1 im still getting compiler errors.
    Like this:
    Code (CSharp):
    1. MaterialEditor: Could not create custom UI from the CustomEditor:  '' of the shader. Does the class name include its namespace? And does the class either derive from ShaderGUI or MaterialEditor?
    2. UnityEditor.AssetPreviewUpdater:CreatePreviewForAsset(Object, Object[], String)
    And I have shadow bugs, even if I disable the shadow caster (seems that the shadows bugs with shadow caster disabled only appears on editor)
    upload_2015-7-24_10-11-54.png

    As you can imagine, this shadows have no sense. And this happens only when I use your cloud system on the scene.
     

    Attached Files:

  8. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    Could you reimport the script folder inside the main folder ? (Right click on the folder -> Reimport)
    Did you press the button "Generate Slices" after turning off the "Cast Shadow" variable on the sliced volume script ? It doesn't disable itself by pressing the toggle since it has to clean the shadow casting mesh and that's done by re-generating the whole thing to save performances.

    The error code you posted doesn't even make any sense, it isn't related directly to the assets and doesn't even reference any graphics related error ...
    I'll look into fixing the unity "AssetPreviewUpdater" error if it still comes up after unity rolls out proper support for dithered shadows.
     
  9. TreborJones

    TreborJones

    Joined:
    Feb 5, 2015
    Posts:
    18
    Hi there, I had a quick look but couldn't see any info, should this work on mobile devices? Specifically ios?

    I've bought and been playing around with it in editor on mac and it's pretty great. Building to iOs doesn't seem to work but appreciate it may not be setup for that platform. Cheers, Bob.
     
  10. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    Someone reported that it worked on Android devices so I don't see why it wouldn't work on ios.
    You could maybe try to comment out the glsl pragma, I am not entirely sure as to how it interacts with ios. To do that, open the file Clouds.shader inside VolumetricClouds/Scripts with a text editor, go to line 58 and put two "/" before the line, that's what you should end up with :
    Code (csharp):
    1. ...
    2. #pragma multi_compile_fwdbase
    3. #pragma target 3.0
    4. //#pragma glsl
    5.          
    6. //Unity GI
    7. ...
    Don't expect it to perform well though, alpha blending eats a lot of power.
     
  11. TeamGotham

    TeamGotham

    Joined:
    May 19, 2015
    Posts:
    4
    Hey!

    I just bought the asset. Looks pretty cool but I'm having a little issue here..

    When I'm setting up my clouds and I hit the "Curved" option they just dissappear.

    I get tons of errors on the console saying "Invalid AABB":

    "Invalid AABB aabb
    UnityEditorInternal.InternalEditorUtility:CalculateSelectionBounds(Boolean, Boolean)
    UnityEditor.DockArea:OnGUI()"

    I tried everything but I have no clue of waht's happening here.

    Any help?

    Thanks!
     
  12. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    Hi !
    That error shouldn't happen and it might be caused by a whole bunch of stuff. The error only happens exactly when you hit the curved tickbox right ? If so, it might come from unity editor's UI alignment, save your current window layout and switch to the default one, does it still happen ? If it doesn't then you can rearrange the windows as you wish and you are done.

    If the above doesn't fix anything, you could move somewhere else the two scripts inside VolumetricClouds/Scripts/Editor.

    And if that still doesn't solve it, could you try out different situations to see when it happens precisely ? For example, use them in a new scene or new project.

    (Remember to clear the errors each time you try out a new method)
     
  13. TeamGotham

    TeamGotham

    Joined:
    May 19, 2015
    Posts:
    4
    Hey Eideren!

    Moving the scripts to the main Editor folder fixed the issue :)

    Thanks a lot man!
     
  14. bakanekofr

    bakanekofr

    Joined:
    Feb 28, 2014
    Posts:
    122
    Hello!

    I've purchased your asset today and like it a lot!

    I have just one question: Is it possible to set the X offset of the material "Cloud/Standard" by script?
    I can't find the name of the float to set in the shader.

    Thanks!
     
  15. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    Hi !
    Yep, the offset is actually part of the texture data, you can modify it like so :
    yourMaterial.SetTextureOffset("_PerlinNormalMap", vectorTwoOffset);

    I just found out that offsets won't work if speed is equal to zero, I'll roll a fix for that asap. If you need that fix and can't really wait for unity's review process to accept it, pm me.

    Have a nice day !
     
  16. bakanekofr

    bakanekofr

    Joined:
    Feb 28, 2014
    Posts:
    122
    I see. Thanks!
     
  17. Zigomar

    Zigomar

    Joined:
    Nov 5, 2015
    Posts:
    4
    Hi guys!

    I've just purchased your asset, seems really cool!
    Do you know if it works in VR projects, with a stereo camera?
    Thanks
     
  18. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    Thanks !
    Two people reported that it does work, I don't own a VR device so i can't really try it out.
     
  19. Zigomar

    Zigomar

    Joined:
    Nov 5, 2015
    Posts:
    4
    Thank you Eideren for your reply !
    Actually, I'm testing some different settings, you did a great job on this asset, well done !
    I share with you a big difference of render between two scenes below, the light and clouds settings are the same in each

    Thanks for your help
     

    Attached Files:

  20. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    By settings you mean materials, right ? Are you emulating mobile VR ? Could you verify that the variable on the material called "alpha cut" is set to 0 and "alpha" something above 0.1 ?
     
  21. Zigomar

    Zigomar

    Joined:
    Nov 5, 2015
    Posts:
    4
    Hi Eideren,
    By settings I mean materials and the clouds slice scripts
    This project aims to be a classical VR experience on deskstop engine: Oculus or other headsets, no mobile actually

    For the alpha things, I have these values too !
    Thanks, I keep continue the researches, I'll post the key solution here if I find it :)
     
  22. Zigomar

    Zigomar

    Joined:
    Nov 5, 2015
    Posts:
    4
    Hey Eideren !
    Just a quick feedback : my issue is fixed, it was a bad light setup
    Your asset work very well on my VR project :)
    Thank you very much
     
  23. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    Alright, thanks for passing by !
     
  24. kaaJ

    kaaJ

    Joined:
    Mar 21, 2007
    Posts:
    150
    Hi Eideren,

    Great work with this plugin...
    But I've got one problem:
    My build does not show the clouds... Any render settings that I should take care of?

    Dev-build output:
    WARNING: Shader Unsupported: 'Cloud/Standard' - Pass 'FORWARDBASE' has no vertex shader
    WARNING: Shader Unsupported: 'Cloud/Standard' - Pass 'FORWARD_DELTA' has no vertex shader
    WARNING: Shader Unsupported: 'Cloud/Standard' - All passes removed

    EDIT: The ShaderForge shader works, also in the final build, but it does not have the same featured (f.e. complex lighting)


    Cheers,
    Dirk
     
    Last edited: Nov 15, 2015
  25. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    Hello, what's the platform you are targeting ? This thread already talks about it and it looks like a compile bug,
    it might come from the data I receive from unity's GI which is part of the complex lighting option.

    To avoid it untill unity fixes it I would have to disable GI and that's more or less the same thing as using the Shader Forge one so for the moment I can't give you a proper solution.

    The ShaderForge one doesn't have those features simply because you can't actually do those in SF, we don't have access to GI data at all.
     
  26. kaaJ

    kaaJ

    Joined:
    Mar 21, 2007
    Posts:
    150
    Hi Eideren,

    Thanks for your reply. Right now the platform is just set to Win/Mac/Linux...
    It's not urgent, since I can use the SF shader for now.

    Cheers,
    Dirk
     
  27. led_bet

    led_bet

    Joined:
    May 5, 2015
    Posts:
    83
    Hey Eideren,

    I'm running into a bug using Unity 5.2.3f
    In the editor, the clouds look fantastic, but when I build & run, I get big black square/lens in the sky:
    cloudBug.png

    Issue definitely has something to do with baking lightmaps.,The only lighting scheme that currently renders clouds is direct lighting. No combination of GI works with this asset in the current build of Unity, for me at least.

    Here is the shader log errors from output_log.txt when the scene is built and run:


    WARNING: Shader Unsupported: 'Cloud/Standard' - Pass 'FORWARDBASE' has no vertex shader
    WARNING: Shader Unsupported: 'Cloud/Standard' - Pass 'FORWARD_DELTA' has no vertex shader
    WARNING: Shader Unsupported: 'Cloud/Standard' - All passes removed

    Here are the errors I'm receiving when looking at the imported shaders:

    cloudErrors.PNG

    Here is an error received when viewing the shadow caster shader:

    shadowCasterErrors.PNG

    Any help is greatly appreciated. I have a demo due to MAGFest at the end of the weekend, and I'd really like to include this asset with that build.
     
    Last edited: Nov 27, 2015
  28. TigraPolosatiy

    TigraPolosatiy

    Joined:
    Dec 24, 2013
    Posts:
    3
    This is gorgeous!!!
    This is what I needed for the project. And excellent price ^O^
     
  29. LightenFor

    LightenFor

    Joined:
    Dec 26, 2013
    Posts:
    26
    Hi Eideren, amazing asset!! Looks cool! But I have a problem, when I look to clouds from the ground I can see it, but from the space above the clouds can't. I changed some parameters like wind direction and then I can't see from the ground, but ok from space... How to see it from all directions?!
     
  30. led_bet

    led_bet

    Joined:
    May 5, 2015
    Posts:
    83
    The nature of the clouds prevent you from looking at the clouds from above if the clouds are using the "curved" option when generating cloud cover. Deselect that and you ought to be able to see clouds from above as well as below.
     
  31. LightenFor

    LightenFor

    Joined:
    Dec 26, 2013
    Posts:
    26
    There is no "Curved" option checked.
     
  32. LightenFor

    LightenFor

    Joined:
    Dec 26, 2013
    Posts:
    26
    The problem solved by making material Two-Sided
     
  33. noahcharris1992

    noahcharris1992

    Joined:
    Jan 3, 2015
    Posts:
    1
    Hey I'm getting a weird blue flicker and yellow tint, also sometimes the whole plane flickers. Has anyone else been having problems?
     
  34. barker_s

    barker_s

    Joined:
    Jul 17, 2012
    Posts:
    29
    Hi there!

    I've just recently bought your asset and, unfortunately, I'm having problems with it. I have created an empty project, imported your asset and put the prefab in the scene. When I hit play nothing happens, there are no clouds. I checked the shader in the inspector, compiled it and following errors showed up:

    variable 'o' used without having been completely initialized
    Compiling Vertex program with DIRECTIONAL SHADOWS_SCREEN LIGHTMAP_OFF DIRLIGHTMAP_OFF DYNAMICLIGHTMAP_OFF CV_LIGHTING_ON
    Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING

    Output value 'vert' is not completely initialized
    Compiling Vertex program with DIRECTIONAL SHADOWS_OFF LIGHTMAP_OFF DIRLIGHTMAP_OFF DYNAMICLIGHTMAP_OFF CV_LIGHTING_ON
    Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_TEXTURE_ALPHASPLIT_ALLOWED

    Any idea what went wrong and how can I fix it? I'm using Unity 5.3.1f1.


    Edit:

    Nevermind, please disregard that, I missed that you had to click 'Generate Slices' to be able to see the clouds.
     
    Last edited: Jan 6, 2016
  35. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    Wow, that's a lot of stuff, don't really know what happened but Unity didn't send me any emails about these posts, I'll see if it changed my settings, sorry about that guys ...

    Alright another guy contacted me about the same bug that @kaaJ and @ledbetterman have so I sent him a possible work around and I'll see with him if it fixed the problem.

    It's a common error since 5.1 probably related to the shader compiler so you could roll back to an earlier version of unity if you really need to fix it or you could send a ticket to unity's support.

    @noahcharris1992 You might want to check your light probes, if you are using light probes in a scene and switch to another without probes, it'll keep the last light probe data, that might be why.
    The range on your camera's clipping planes might might interfere too, a range of 0.1->1000 should be safe.

    @LightenFor what ledbetterman said was right, the editor is just a bit laggy that's why when you changed variables the clouds showed up, it shouldn't be as laggy in game ; once your main camera goes above the clouds they should be oriented correctly as long as they aren't curved.
     
    led_bet likes this.
  36. led_bet

    led_bet

    Joined:
    May 5, 2015
    Posts:
    83
    Glad to hear you're still around :) Your asset is gorgeous and the main cloud cover solution for my project. I can't find anything on the store that looks as good, but I really would like to support GI in my game.

    Anyway, thanks for looking into the compilation issues.
     
  37. gameDevi

    gameDevi

    Joined:
    Oct 14, 2015
    Posts:
    155
    clouds are pink :(

    Using Unity 5.3.1p4

    Any help please
     
  38. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    Well, I could if you gave me more information.
    Does the console report anything ? Is it in build, in editor, in play mode ? Did you try to re-import the files ? Did you try to use them Inside a new project ? What OS are you running on ? Your graphics card manufacturer ?
     
  39. gameDevi

    gameDevi

    Joined:
    Oct 14, 2015
    Posts:
    155
    Not to worry.. it's project related. Both shaders are fine in new project.. Something in my current project is causing problems with the standard cloud shader.
    It's fine with shaderforge cloud shader in current project though.

    Anyhow to answer your question.

    In editor and game play mode.
    No errors in console.
    Haven't tested in build mode.
    reimported a few times
    Windows PC
    Deferred mode
    Linear.

    GTX970

    I don't expect you to solve this issue as it's project related. However if you have any ideas whats causing this let me know please.
     
  40. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    Do you have another shader which has a lot of customization or perhaps a lot of different custom shaders ? You might have hit the maximum amount of keywords if that's the case.
    Basically there's a maximum of 128 keywords, those defines what the shader should do or skip based on variables we gave him, for example, my shader use one of these to toggle between simple and complex lighting. Mine uses 3 of them in total and Unity already uses a bunch more for stuff like rendering shadows and lightmaps.
    You can read more about that here : Making multiple shader program variants

    You could move your other shaders out of your project and restart unity to find out if that's actually what's happening here.
     
  41. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    Good news everyone, well maybe ...
    I think I finally figured out how to work around that problem, I could probably fix it by inserting my code inside a proxy of Unity's standard shader.
    Its going to take me a lot of time to do the conversion and it might break if Unity decides to change their SS but it should work.

    I might contact some of you, once I'm done with the conversion, to verify that it fixed your problem before sending it to the asset store. If you are willing to go through that, please send me a PM and I'll reply back with that fix.
     
    led_bet likes this.
  42. cleverweek

    cleverweek

    Joined:
    Nov 17, 2014
    Posts:
    32
    Hello Eideren,
    Pre-purchase question: Is it possible to have clouds below the horizon? I want the player to be surrounded by clouds.
     
  43. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    It is but it's not optimal, if the camera goes through them then the player will probably notice each layers.
    Example at 0.26
     
  44. cleverweek

    cleverweek

    Joined:
    Nov 17, 2014
    Posts:
    32
    The camera will not go through clouds, this is going to be a first-person game. So I guess it will be fine?
     
  45. zelmund

    zelmund

    Joined:
    Mar 2, 2012
    Posts:
    437
    if your character will not jump to the sky, personaly its ok for me =)
     
  46. Superflat

    Superflat

    Joined:
    Mar 19, 2009
    Posts:
    354
    Hi,

    Unity 5.3.1
    Standalone

    On import i get the following error
    Following the steps next i setup the component and hit create slices. Nothing shows up. I have disabled GI and added the SF materials according to other people posting to no avail. Moving the editor camera around i notice the horizontal layers and see some dark fog typed scrolling happening on the planes.

    I assume i maybe doing something wrong.
     
  47. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    Hello,
    When shaders don't compile properly sometimes it zeroes out the material's variable to their default values, you might have to reset the material and fill the texture map input back, it'll render entirely transparent without a texture. The compiler might also not have initiated the keywords properly, you could try to "right click > Reimport" on the folder.

    I answered back to your MP with two different builds, if the above still didn't solve the problem, you could try those out.
     
  48. faak92

    faak92

    Joined:
    Apr 2, 2014
    Posts:
    1
    Hello Eideren!

    Love the asset but I have the same problem as ledbetterman. In editor all looks fine but when I export the game the clouds turn black like in his picture. Did you get any feedback from the work around you sent out? Would love to get it to work with baked lightmaps.
    Thanks in advance and keep up the good work!
     
  49. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    Hi !
    I'm still working on it with him but you might have a different situation. I could send you a build if the forum allowed me to PM you ... ?
    Baked lightmaps are coming in the next update alongside that fix.
     
  50. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
    look good