Search Unity

  1. We've closed the job boards. If you're looking for work, or looking to hire check out Unity Connect. You can see more information here.
    Dismiss Notice
  2. We're running great holiday deals on subscriptions, swag and Asset Store packages! Take a peek at this blog for more information!
    Dismiss Notice
  3. Check out our Unite Austin 2017 YouTube playlist to catch up on what you missed. More videos coming soon.
    Dismiss Notice
  4. Unity 2017.2 is now released.
    Dismiss Notice
  5. The Unity Gear Store is here to help you look great at your next meetup, user group or conference. With all new Unity apparel, stickers and more!
    Dismiss Notice
  6. Introducing the Unity Essentials Packs! Find out more.
    Dismiss Notice
  7. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice
  8. Unity 2017.3 beta is now available for download.
    Dismiss Notice

ats Snow Suite

Discussion in 'Assets and Asset Store' started by larsbertram1, Aug 15, 2012.

  1. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    3,773
    the ats snow suite provides a bunch of shaders giving you procedural generated snow on terrains, trees (including billboards), grass and foliage and any game object – fully controllable via script.

    Released!

    get it from the asset store for free: http://u3d.as/content/forst/ats-snow-suite/3fq


    $atssnow_02.jpg

    $atssnow_03.jpg

    watch the demo: http://bit.ly/MYksrU

    feedback is welcome.


    Donate

    just in case you would like to support further development, go and get one of my tree packages: http://u3d.as/publisher/forst/1Lf ;-)



    lars
     
    Last edited: Aug 16, 2012
  2. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    3,773
    And another screenshoot showing different values of "snow amount" applied:

    $ats_snow_beforeafter.jpg

    Features

    the overall distribution of snow is controlled by 2 global variables "SnowAmount" and "SnowStartHeight" – which determine whether there shall be snow at a given height in the scene and how much.

    snow on terrains
    next to the snowStartHeight-parameter you can control the snow distribution via a distribution map:

    $snowdistribution_billboards.jpg

    please note: there is now snow neither under the trees nor under the bridge – at least not if the snow amount parameter is below 1.
    the screenshoot also shows the support of billboarded trees having fully dynamically added snow.
    unfortunately snow is just shown in the foreground. the terrain’s basemap is not effected by any snow. so either you have to set the basmap distance to a very high value or hide it by fog.

    snow on grass and tree leaves
    snow on grass and tree leaves is procedurally added depending on the amount of snow and the given height from which snow shall be rendered (both fully scriptable, but snowStartHeight does not affect trees due to the fact that when rendering the billboards there is no individual height parameter available – so if you want to have trees below the snowStartHeight not having any snow added those have to use another shader (the standard one…)).

    snow on regular game objects
    The shader "snowShaderBumpedDiffuse" can be used on any regular game object and will fully react to both "SnowAmount" and "SnowStartHeight" – although i would not suggest to use it one objects of which you know that they will be never effected by snow, because it is more expensive to render than a standard bumped diffuse shader.
    As far as other shader are concerned (e.g. alpha cutout): the provided shader is a pretty simple surface shader and should be easy to tweak to your needs.

    lars
     
    Last edited: Aug 15, 2012
  3. elias_t

    elias_t

    Joined:
    Sep 17, 2010
    Posts:
    1,022
    This is looking awesome!!!

    Will it be included in unistorm also? (Because I saw you posting there also the images also)
     
  4. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    3,773
    the discussion there about snow shaders was the initial starting point for my work.
    and as the package ships for free i guess bhs will include it in the next release of unistorm.

    lars
     
  5. sleglik

    sleglik

    Joined:
    Jun 29, 2011
    Posts:
    682
    lars how difficult is implementation to the scene?
     
  6. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    3,773
    hi sleglik,

    * import the package (this will replace the built in terrain and grass shaders).
    * assign the script to the terrain
    * assign proper textures and values to the script
    * hit "play"
    ---> now you have snow on the terrain an grass.

    * copy your tree prefab
    * create 2 new materials
    * add the new shaders to them
    * add all textures the the materials
    * add those materials to the copy of your tree prefab
    * add this new tree to your terrain (or replace the old one)
    ---> now you have snow on trees

    * simply add the snow shader to your game model’s material
    ---> now you have snow on any game model (only bumped diffuse at the moment)

    all together: about 5 min.

    tweaking everything of course can take you much more time… like finding the right snow power for each terrain texture, creating a snow shadow mask and things like this.

    but the package comes with the demo terrain, so you simply have to click play…



    lars
     
    Last edited: Aug 15, 2012
  7. Mauri

    Mauri

    Joined:
    Dec 9, 2010
    Posts:
    968
    Hey lars,

    first off: nice shader, really! It's cool to hear that it will be free though.
    Just wondering: Why are you giving out these things for free mostly? Other people would sell them for 10$ or more...


    - Mauri
     
  8. Gherid_lacksGPS

    Gherid_lacksGPS

    Joined:
    Dec 3, 2011
    Posts:
    111
    Mauri!!

    [​IMG]

    :D

    Lars, you're fricken awesome.
     
  9. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    3,773
    hi mauri,

    thanks for your kind words.
    and as far as your question is concerned: first i would like to give as many people as possible the chance to benefit from the shaders in order to really get the best out of unity – and even a low price at around 10$ seems to prevent most people from getting them (just thinking of my foliage shader / foliage package, which i spent weeks and weeks of work on giving you the most advanced foliage rendering in unity i am aware of…).
    next: i won’t do a whole weather system, in fact the snow suite doesn’t even come with a snow particle effect. it’s just a first step und needs more shaders and may be some optimization here and there. as it is free you might find in in the next version of unistorm or any other weather system and i hope the community will help to improve it over time:
    i would like to find a way to support several tiling terrains, streaming, rain with puddles… things like that.

    btw.: it has been realeased on the asset store: [ur]http://u3d.as/content/forst/ats-snow-suite/3fq[/url]

    lars
     
  10. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    3,773


    thanks.
     
  11. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    4,837
    Really amazing work, thanks!

    I wonder if this shader could do some other awesome flexible things with some adjustments... like adding dirt/muck/grunge to areas, buildings or whatever. Can you use the areas that the snow lands as a template location for procedural mesh population? For instance using it to create procedural vines and populating overgrowth plant life meshes or moss or grass or something onto it.

    Just thinking out loud with ideas here. Not sure how feasible that would actually be.
     
  12. BigB

    BigB

    Joined:
    Oct 16, 2008
    Posts:
    616
    Hey Lars,

    I gave it a go, but something is very wrong on my machine with this shader. (windows 7, unity 3.5.5f2, ATI Radeon HD 6850M.

    I imported your project into my project folder (I have other terrains in it), opened your test level, and I can see the terrain in the distance, but everything near me is completely culled, it's not rendering the terrain at all (I see a floating bridge, some floating rocks, no snow effect on them either).
    So, I assumed it wasn't work, and just opened one of my terrains, and now I experience the same problem in my terrains. My next step was delete the ats folder from my project, and once I did that, all my terrains now work again.
    Any idea what could be wrong ?
     
  13. janpec

    janpec

    Joined:
    Jul 16, 2010
    Posts:
    3,489
    Hm i am just guessing here, but maybe it could be problem with windows - mac issue like before on color terrain shader you did Lars.
     
  14. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    3,773

    mud and dirt easily can be done – just change the texture!
    procedural mesh generation is nothing i am into but – hey this is a shader!

    lars
     
    Last edited: Aug 18, 2012
  15. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    3,773
    hmm, does the demo link work for you?
    then the shaders theoretically works on your hardware. if not…
    have you tried to restart unity after import? have you hit "play"? have you tested it within a a completely empty project?

    anybody else having that kind of problem?

    lars
     
  16. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    3,773
    well, this time it is definitely not a general windows problem as i have already seen it working ;-)
     
  17. Mauri

    Mauri

    Joined:
    Dec 9, 2010
    Posts:
    968
    @larsbertram1 Gherid_lacksGPS

    i'm so sorry if the question sounded a bit harsh. That was not intended! I just wonder...
    However, it's a nice switch from you that you giving out such an awesome shaderpack for free, like you always do :)


    Friendly greetings and have a nice day!
     
  18. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    3,773
    hi mauri,

    your question was absolutely ok – i did not take it harsh in any way.
    have you tested it already? and can you confirm the problems reported by BigB?

    hopefully not,

    lars
     
  19. Mauri

    Mauri

    Joined:
    Dec 9, 2010
    Posts:
    968
    Unfortunately not, but i will do it right now! :)

    -Maurice


    Edit
    I can't confirm this, sadly. (Windows7 / Unity 3.5.5f2 / NVidia GT 555M) But there are some graphical glitches for me. These are happening in the editor and the play-state and appears, when i completely remove the snow (via "1") and add some then (via "2"). Weird thing: This happens only on trees. The terrain itself is free from this glitch!

    [​IMG]
     
    Last edited: Aug 17, 2012
  20. I am da bawss

    I am da bawss

    Joined:
    Jun 2, 2011
    Posts:
    2,578
    larsbertram1, AMAZING work!
    Awesome as always! Thanks so much for giving so much to the community!
     
  21. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    3,773
    i am glad that you can’t confirm the problem of bigb…
    as far as the glitches on the tree bark is concerned: i can’t reproduce this (os x, nvidia gefore 9400m): for me everything looks alright as long as i keep the snow amount value between 0.0 and 1.0.
    you can tweak the snow amount right in the editor and you will get a live update. so please test if there is a value from which on these glitches are rendered and if they disappear at some other value.

    lars
     
    Last edited: Aug 18, 2012
  22. Legacy

    Legacy

    Joined:
    Oct 11, 2011
    Posts:
    651
    Hmm not able to increase or decrease snow for some reason, also could we get that stone texture you used in the demo thats on the unistorm thread? :)
     
  23. Legacy

    Legacy

    Joined:
    Oct 11, 2011
    Posts:
    651
    figured out what it was, you didnt change the name of the script to CustomTerrainScriptAtsV3Snow you left it as the v2 name and it overwrote the v2 stuff you released so if you have the ats v2 package delete it then import this one.
     
  24. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    3,015
    Those of you who are wondering if this snow shader will be used in UniStorm, yes it will be. It will allow realistic snow fall on the terrain and all terrain objects as well as all models that use the snow shader. With UniStorm's new and improved weather randomizing algorithm storms will be generated more realistically. Snow build up will be based on how powerful the storm is and how long it lasts. The weather could be light snow showers, a powerful blizzard, or anything in between, it's truly dynamic. Those of you who want to know more just go to the UniStorm thread, I don't want to distract from lars' thread.
     
  25. sebrk

    sebrk

    Joined:
    Mar 20, 2012
    Posts:
    12
    Is this possible to use on mobile devices as well? If so, how is it working performance wise?
     
  26. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    3,773
    usually you won’t use neither unity’s built in terrain not its trees on mobile devices. therefore the snow shaders for these 2 do not make much sense on mobile devices (next to the fact that the terrain shader uses shader model 3…).
    but there is a snow shader for regular meshes included that probalbly will work even on mobile devices – although of course it is more complex than a standard bumped diffuse shader.

    lars
     
  27. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    3,773
    hi there,

    i have one report of the snow terrain shader not working correctly under windows in forward lighting mode.
    can anybody confirm this?

    lars
     
  28. elias_t

    elias_t

    Joined:
    Sep 17, 2010
    Posts:
    1,022
    Yes I can confirm that. In forward rendering path it cuts out the near parts of the terrain.

    Here a shot:
     

    Attached Files:

  29. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    3,773
    f*ck,

    what is your hardware?
    vendor, gpu?
    the first report came from an asus laptop...

    it would be great to get your specs.

    and does it work for you in deferred rendering mode?
    does the demo work for you? http://bit.ly/MYksrU – well, it’s in deferred mode anyway.

    lars
     
    Last edited: Oct 2, 2012
  30. elias_t

    elias_t

    Joined:
    Sep 17, 2010
    Posts:
    1,022
    Alright.

    OS: Windows xp sp3
    cpu: intel q6600
    gpu: ati amd 5870 (latest catalyst drivers)
    unity 3.5.6

    Yes the demo and the deffered rendering path work for me.

    I hope you sort it out.
     
    Last edited: Oct 2, 2012
  31. Pathelion

    Pathelion

    Joined:
    May 11, 2012
    Posts:
    209
    Is it possible with little effort to use this snow shader as bumped diffuse transparent?
     
  32. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    3,773
    on the terrain? i have never tried but it should be possible…
    on regular geometry: yes. it is a surface shader, so it is pretty easy to change it to your needs.

    lars
     
  33. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,214
    Hey larsbertram, now that Unity 4 natively supports bump mapped terrain, do you have any plans to update this and your other shaders to not need the bump maps selected in the scripts?
     
  34. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    3,773
    i think i will update the shaders as soon as unity 4 is published.

    lars
     
  35. Pathelion

    Pathelion

    Joined:
    May 11, 2012
    Posts:
    209
    Yes I meant on meshes. Then I should take a look :)
     
  36. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    3,773
    do so, should be pretty easy to implement.

    lars
     
  37. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    1,251
    Does this snow suite work with the Ultra color map shader?
     
  38. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    3,773
    nope – those are two different terrain shader – you would have to make them one.
     
  39. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    1,251
    I'm afraid I don't know how to do that, :cool: maybe good for an update in a future version, I would pay for that.
     
  40. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    3,773
    hi lars,

    snow might become a future feature of the ats color map Ultra terrain shader, we will see: both shaders are pretty heavy work for the gpu already but my hardware is not really what you would call decent…

    lars
     
  41. SevenBits

    SevenBits

    Joined:
    Dec 26, 2011
    Posts:
    1,956
    It is theoretically possible to uncouple the shaders from the terrain, allowing them to be merged by scene, but it is worth noting this is a complicated process.

    FYI, I'm all for one grand unified shader, so to speak. You could always allow specific elements to be toggled on and off via script able shader properties. Then you could have all the shaders combined and still get good performance by turning off specific elements on older or less powerful machines. I would do it myself, but I haven't go time, so I'd pay for such a feature for sure.
     
  42. markfrancombe

    markfrancombe

    Joined:
    May 26, 2009
    Posts:
    149
    Loving the look of this, but just wondering if I have missed some documentation of the exact use of the editable properties in the script? Im wondering about the Bump slots and the Snow Power tex.

    Also I have a weird bug where sometimes it works great, sometimes I actually have to turn it off and it works, I cant quite comprehend what is happening. Note I am using UniStorm too, so maybe there is a connection here? Does Unistorm have some control over whether or not there is snow, dependant on the temperature (as it does with its snowfall effect?).

    I must say that adding normal maps of my terrain textures does make my NORMAL, non snowy terrain look much better! (Except that Im using more than 4 textures for my terrain and soe there are some missing patches of snow...
     
  43. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    3,773
    hi there,

    i do not now anything about unistorm at all – but using just the script/shader combination works perfectly and i can’t imagine any reason why it should not for the shader can’t be broken by script ;-)

    as far as the prpperties of the script are concerned, here is the part of the docu which deals with those you have auestions about:

    Snow Accumulation
    The overall distribution of snow in your scene is controlled by 2 global variables "SnowAmount" and "SnowStartHeight" – which determine whether there shall be snow at a given height in your scene and how much.
    The detail distribution of snow is calculated per pixel usually taking the surface normal in worldspace, the detail normal coming from the normal map and some kind of heightmap (usually genereted from the blue value of the main texture) into account, accumulating snow primary at deep (heightmap = dark pixel) parts of the surfaces.

    Limits and Problems
    Due to the fact that we don’t have any accurate heightmap you might notice some artifacts or even "bugs":
    1.) bright textures will get less snow than dark textures (see "soil_sand_1024" texture on the demo terrain).
    2.) textures in which dark pixels do not mark deep areas will get a reverse snow accumulation (see "sand 512" texture on the demo terrain).

    Solutions:
    1.) At least on the terrain you have the possibility to specify a "SnowPower" factor for each texture to minimize this effect. All other shaders do not offer this possibility.
    2.) no solution provided yet

    To get rid of both 1.) and 2.) you would have to add a "real" heightmap (e.g. in the texture’s alpha channel) but that would raise the shader’s complexity and needed texture memory even more.

    Snow Power Tex 0 – 3: when using pretty different textures on the terrain use this to harmonize the snow distribution (see "Limits and Problems"): < 1.0 = less snow on the givven texture / > 1.0 more snow on the given texture


    lars
     
  44. eStudent

    eStudent

    Joined:
    Dec 19, 2012
    Posts:
    4
    Hi Lars,

    do you know the Real Nature Pack 3: Winter package? Will your Tree snow shaders work with these trees? The trees in this package look like they were created with the Unity Tree Creator, but I'm not sure. I would actually just have tried it myself, but here is the next problem I can't figure out:

    I can't assign the "TreeCreatorBarkOptimizedSnow" shader, because it seems like it isn't a material file but rather a shader file, i.e. there is no ball icon to the left of the name in the Projekt window. I tried applying the shader to various trees, but Unity wouldn't allow this file to be applied as a material. Please have a look at the screenshot I attached. The shader also doesn't show up in the shader drop-down list when creating a new material. Only the "snowShader Bumped Diffuse" shows up there.

    Sorry if this is a newbish question, but I just started with Unity.

    Btw, I am using Unity Pro 3.5.6.f4. Will your snowsuite also with with the new Unity 4?

    Your help is much appreciated :) Thanks!

    Rob
     

    Attached Files:

    Last edited: Dec 24, 2012
  45. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    3,773
    the trees in that package are modeld using the builtin tree creator, so they are supported by the snow shader suite. but as they have already snow baked to their textures you don’t either need the shader (which would add snow even on green trees) or don’t need this package (take the summer package instead).

    first: it is no material but a shader. so you first have to create a new material, then drag the shader onto the material within the project tab.
    aftrewards you should be able to assign the new material to the trees. just have a look at the trees shipping with the demo.
    (btw. the shader is named: "hidden/nature/tree…" therefore you can’t see it in the dropdown list.

    i haven’t tested it in unity 4 but i am pretty sure that it works.
    nevertheless, unity 4 allows material assigned to the terrain so most of the parameters pushes by the script as global vars could just be part of the material setup which would make it easier to handle the shader.
    so when using it in unity 4 it might be a good idea to adjust at least the terrain shader.

    lars
     
  46. eStudent

    eStudent

    Joined:
    Dec 19, 2012
    Posts:
    4
    Thank you Lars. In the meantime I managed to assign the shader by removing the "hidden/nature/" from the .shader file so that it now shows in the drop-down list. Is that a problem?
     
  47. Farlas

    Farlas

    Joined:
    Sep 20, 2012
    Posts:
    9
    With unity 4 when i import this asset the script folder still empty can't get the "CustomTerrainScriptATSV3Snow.cs"

    i try on new project but script still missing everytime i try import.
     
  48. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    3,773
    very strange:
    $Bildschirmfoto 2013-01-22 um 21.48.09.png
     
  49. markfrancombe

    markfrancombe

    Joined:
    May 26, 2009
    Posts:
    149
    Hi,

    Im having a problem with Rocks!
    Now I dont want to put all the blame on this package, I am also using the ats path shader package, and Im not sure if my probelm is even related to your wonderful things or not.. but. I hope you can help nevertheless?

    When I add a roc by hand, it looks fine, but when I add a rock as a detail, using the terrain editor, the texture kind of gets all messed up like the UVs are not working properly..
    Heres a screen shot of 2 rocks, one added by hand one added by terrain detail.

    Can you say what caused this and how I should fix it?
     

    Attached Files:

  50. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    3,773
    hi, as the ats snow suite does not come with a shader that replaces the built in vertexLit shader that you usually would use when placing rocks as details the problem should not be caused by this package.
    may be you have imported some other shaders as well?

    quick tip: do not place rocks as detail meshes – especially not if they are of that size: no colliders and pretty ugly lighting. place them manually on a layer which gets culled at around 60 meters and combine them.

    lars