Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

[Released] Dynamic Snow System for Unity

Discussion in 'Assets and Asset Store' started by schultzz, Jan 21, 2017.

  1. schultzz

    schultzz

    Joined:
    Jan 25, 2014
    Posts:
    11
    Hi everyone,

    I would like to introduce you to my first asset store contribution, its a dynamic snow system for unity,



    with this you can create deformable patches of snow that can react dynamically to characters and objects on your scene.


    Here's a sample scene for you to try out the effect.

    the setup is pretty simple you just need to import the package add the snow blocks to your scene and characters/models and you're basically done.

    you can customize it to create different shapes on the snow and even configure the rate the snow fills up again.
    this package uses a combination of cameras particles and custom shaders to create the effect i hope it can help people on their game creating journeys.





    you can but it on the asset store here. or download the Demo.
     
    Last edited: Jan 21, 2017
    Arkade likes this.
  2. Arkade

    Arkade

    Joined:
    Oct 11, 2012
    Posts:
    653
    Nice and at that price I bought it on basis of the video.
    3 questions:
    1. Can one disable the back fill?
    2. Can one get info about snow contacted by the character?
    3. How to pre-set initial levels (e.g. drifts)?

    Good luck!
     
  3. schultzz

    schultzz

    Joined:
    Jan 25, 2014
    Posts:
    11
    thanks, as for your questions.

    1. Can one disable the back fill?
    currently you cannot disable the backfill since the system uses particles to paint the heigthmap, but you can modify the duration or life of the particles to make the backfill take longer, will research a way to prevent this behavior.

    2. Can one get info about snow contacted by the character?
    what kind of information? like point of contact, yes you can, the emitter uses a trigger and colliders to figure if its currently touching snow, you can just call for the position and contact point.

    in the case of unity chan you can get the information of each indiviual feet.

    3. How to pre-set initial levels (e.g. drifts)?
    im not sure i understand this question, do you mean the initial height of the snow? or the strength of the effect?

    for the initial height you can just scale the geometry on the y axis and everything will still work, on the second case you can just turn up the opacity on the particle system.

    I hope this helps, if I didn't understand correctly feel free to tell im here to help.

    thanks again for the purchase,
     
  4. MikeUpchat

    MikeUpchat

    Joined:
    Sep 24, 2010
    Posts:
    1,055
    Looks cool, how well would this work on a large level or is it only for small areas. And how about mobile?
     
  5. schultzz

    schultzz

    Joined:
    Jan 25, 2014
    Posts:
    11
    the package includes an area of snow of up to 50 unity units (50 meters) but you can use multiple of these as long as you create different textures for the heigthmap, those can be the resolution you want depending on the detail level you need. you could also scale the 50 meter zone but tesselation would only go so far when adding geometry so it will eventually become blocky/ polygonal and not smooth.

    also sadly since it uses DX11 tesselation it does not support mobile, im am looking into a different approach so mobile games can get a similar effect but nothing to show currently.
     
  6. MaazBaig

    MaazBaig

    Joined:
    May 17, 2013
    Posts:
    38
    Hey most definitely will end up buying this, but before i do, quick question: What geometry shapes can i apply this affect to? like for example can i apply this to terrain? or like a custom mesh? and for example if i apply this to a cube? what would happen? would the snow be on the Top plane only (perfectly).
     
  7. schultzz

    schultzz

    Joined:
    Jan 25, 2014
    Posts:
    11
    Hi Maaz

    really sorry for the late reply was all week in LA for the E3 expo, anyway this can be applied to all geometry shapes the shape the snow will deform is dictated by a particle effect that you can change the texture to anything you want or even include the geometry you want as a mask but the later option is expensive in rendering.

    you cannot use this shader on a unity terrain since it uses its own shader and its not editable but on custom meshes you can assign the sahder but it will not necessary work since it depends on a lot of external factors, a future update of the system will include a shader for snow on top so you can assign it to any object and rotate at will the snow will always be on top.

    hope this answered your questions.
     
  8. MaazBaig

    MaazBaig

    Joined:
    May 17, 2013
    Posts:
    38
    So, would it be possible for me to create a terrain in Blender and then bring it to unity and apply this shader? would that work?
     
  9. schultzz

    schultzz

    Joined:
    Jan 25, 2014
    Posts:
    11
    yes, but it may or may not work depending on the way the geometry is created and/or exported to be honest I dont know why certain objects work and certain wont. that is why there's prefabs of already defined sizes with predefined geometry that is guaranteed to work.

    if you're going to use custom terrain meshes i would advise not using this shader since the way unity aplies the heigth map and tesselation can change depending on the mesh and import/export settings and I cant guaranteed it will work.

    but you can use a default unity terrain, and add on top the snow system prefab as a separate gameobject then just use a texture mast to create the shape you need to cover.
     
  10. insanity-interactive

    insanity-interactive

    Joined:
    Mar 11, 2015
    Posts:
    2
    I buy this asset but I need a flat plane with this snow effect. (not this landscape)
    If I use a Unity Plane or a FBX Plane it doesn't work :(
     
  11. schultzz

    schultzz

    Joined:
    Jan 25, 2014
    Posts:
    11
    Hi, im sorry you're having trouble with the asset, but I believe we can fix it, does the sample scene work on your computer?
     
  12. Pandur1982

    Pandur1982

    Joined:
    Jun 16, 2015
    Posts:
    275
    Hello nice asset.The demoscene works good for me but i have a littel probelm can you say me the seetings for the Playercontroller in the demo with the footsteps?I have take 2 Capsule Collider on the FootBone of my PlayerChar with Ridgidbody,i have chage the size from the collider to became a good result but i looks not so good by me,in the demo you have 2 lines from the footstep when you walk.My Player have a Bighole when he walk or run.
     
  13. schultzz

    schultzz

    Joined:
    Jan 25, 2014
    Posts:
    11
    of course i can help, also sorry for the late response I am still on holiday vacations so i dont check to often the forum.

    im assuming you're using the newest update of the asset rigth? in this update the system was cahnged to a collider based paintmap instead of a particle effect to create the heigthmap, so depending on the version you're working on the aproach will be different.

    You can read the documentation I'm working on for the current unity version to see if it helps, if not feel free to post again and we can fix the issue.
    Documentation
    https://drive.google.com/open?id=1-b0sLBHLHqawOBzj6Kb6MZnI9u8oN1Zq
     
  14. Pandur1982

    Pandur1982

    Joined:
    Jun 16, 2015
    Posts:
    275
    thx for the answer, i use the newest Version from the asset store , i have test it out but i become not so good footsteps in the snow, i have test it out with sphere collider , capsule collider and sphere collider on the the foot bones on my char with a rigidbody.i have see i can change the splashtexture on the ground but will it not better when every player or npc have a seperate splashtexture?here a exampel i have a mechsuit for a player that suit is bigger as a normal human solider.so the mechsuit make biger footsteps and more splash as a human soldier and by the way can i change the high of the snow?
     
  15. schultzz

    schultzz

    Joined:
    Jan 25, 2014
    Posts:
    11
    as you say, that is actually an update im currently working on, to have the ability to change the splash texture per collider, the script is almost done i just need time to work out some kinks, like the splash texture not being painted in the correct orientation or rotation.

    once its on a more usable state i will push it to the asset store so you can download it.
     
    Pandur1982 likes this.
  16. BraveFactor

    BraveFactor

    Joined:
    Jun 30, 2017
    Posts:
    2
    I seem to be having issues getting this to work. I am quite new to unity and I tried to follow the instructions but I seem to be making some mistakes. I guess I have a couple questions.

    In your sample you apply the snow to "ground" but I am applying this to "terrain". Can I do it this way? You have a "snow shader" attached to your "ground" but I can't seem to do that nor can I find anything online that describes how to do this. Am I missing the obvious?

    Another issue is I cannot see if your demo scene works because there is no controller for me to look in the correct direction in game mode and I cannot add one for some reason.

    I am really glad that you added the documentation in this link but there are areas that I am totally lost and cannot even seem to figure out what to google to figure out what the description means. For example this is very confusing to me:

    "3.- next you need to assign the shader to the material, after creating the material and assigning
    it to the mesh, just select the shader from the drop down menu and then just add your textures
    to the material".

    I'm not sure what "the material" is and I'm confused with where things are assigned. Would you be able to create some screen shots for this process?


    I am very excited to get this up and running. So far I have about four hours in it and I just am not sure what I'm doing wrong! I'm very new to unity but I hope that I can figure this out, thank you.
     
  17. schultzz

    schultzz

    Joined:
    Jan 25, 2014
    Posts:
    11
    Hi braveFactor, sadly there's no support for unity terrain since they way it works in unity prevents it from using custom shaders in the terrain, but you can create custom geometry and use it alongside unity terrain to create the effect.

    i made a small video tutorial to better show the setup of the system i hope it helps.

    any other questions feel free to ask away.
     
  18. BraveFactor

    BraveFactor

    Joined:
    Jun 30, 2017
    Posts:
    2
    Thank you!!!


    schultzz this was super helpful!! I was trying to put this on terrain and that was my main issue, but you also answered a lot of questions for me. A couple notes:

    • Snow system works so good work!
    • My snow normal did not come in correctly to be able to use.
    • I would strongly suggest a slowed down tutorial that covers everything from A to Z with no steps skipped for newbies like me and mid level people who just want to know exactly what to do immediately.
    • Include your tutorial in the original import. I had to search the web for the steps.
    • I cannot seem to set the buffer fill time to zero, as in I do not want the snow to fill in...did I make a mistake?
    • Tell everyone right up front that this does not work with terrain. That is obvious to some but not me that ONE SENTENCE would have saved me about four hours of work!!
    • Your response with this video in the same day was awesome!! You get props for customer service!!!
    • Okay last big important question!!! Do you think that I will be able to use a first person controller to make snow angles!!!!???? I bought it for this purpose and have yet to figure this out but do you think this will even be possible???
    Thank you!!!

    braveFactor


     
  19. ansjuan

    ansjuan

    Joined:
    May 15, 2018
    Posts:
    15
    Hey! I bought your asset on the store a couple of weeks ago, and I've been testing it during this afternoon, is there a way to make it work using colliders without rigidbodies? Do you plan to release such functionality?
     
  20. schultzz

    schultzz

    Joined:
    Jan 25, 2014
    Posts:
    11
    Hi, ansjuan sorry for the late response its been a while since i checked these forums
    to answer your question the scripts uses collisions and the OnCollisionEnter() method so a rigid body is nessesary I can try and test tomorrow and see if I could enable the method to react collisions tagged as triggers but I think this mettod wont give me the UV coordinate to paint on the height map.

    one thing you might want to try is ussing a rigidbody without the is kinematic option so you can have more direct control on the collider.

    I've been working on updating this since its quite old but work and other chores are keeping me from going full time on this but i hope to be able to update it this year.

    hope this helps :)
     
    ansjuan likes this.