Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

UniSky v1.2 - Procedural Weather Update

Discussion in 'Made With Unity' started by Chris Morris, Feb 13, 2011.

  1. Chris Morris

    Chris Morris

    Joined:
    Dec 19, 2009
    Posts:
    259

    Hey guys, The UniSky v1.2 update is now available on the Asset Store!

    New features include procedural, real-time weather and atmospheric effects, as well as a few minor bug patches. To watch a preview of the new features, check out the video:

    http://www.youtube.com/watch?v=ClWJT-eGCVQ

    1.) Offscreen particle rendering allows for many large, alpha blended particles on screen without the performance drop!
    2.) Water droplet image effect simulates rain hitting the camera.
    3.) Parameterized storm probablity, duration, thunder frequency, and more.
    4.) Includes all rain textures and sound effects needed for a realistic storm.

    The new features require Unity Pro (Render Textures) and as before, an SM 3.0 capable graphics card.

    With new features comes a new setup routine and tutorial. A video will be available soon, meanwhile check out the written tutorial on the website for instructions on how to set up UniSky to work with weather.

    http://www.sixtimesnothing.com/unisky/

    Thanks! :)
     
    Last edited: Mar 11, 2011
    URPian likes this.
  2. helmers

    helmers

    Joined:
    Aug 28, 2010
    Posts:
    48
    Wow,

    Especially the soundeffects brings this scene to live.
    I only missed a bird starting to chirp after the storm :)
    Will the soundeffects be included?

    How much performance does your sky system eat up?
    I have a lot of other things going on in my game and would be willing to spend max 5% on the sky system.
    That is on Quad 3.25GHz and Nvidia 9800GTX.
    Could you please provide some performance data from your system?
     
  3. Chris Morris

    Chris Morris

    Joined:
    Dec 19, 2009
    Posts:
    259
    Thanks! Yes, the sound effects will be included.

    The video in the link above was running on my system:

    Dual 2.66ghz with an NVidia 8800gtx

    At peak downpour, I saw frame times of around 2.5ms and FPS around 400. This is with a large terrain @ 1025x1025 resolution and no Umbra occlusion culling. This is also at full settings - I'm rendering the particles to a variable size off-screen buffer so the alpha blending doesn't kill the frame rate. This means you can change the quality and settings to whatever you need to maintain good performance.
     
    Last edited: Feb 13, 2011
  4. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,602
    Very cool video :)
    Looking forward to the update to experiment even more with the atmosphere created by the lighting etc
     
  5. PeterB

    PeterB

    Joined:
    Nov 3, 2010
    Posts:
    365
    This looks fantastic. Would your system support sand storms, too?
     
  6. Chris Morris

    Chris Morris

    Joined:
    Dec 19, 2009
    Posts:
    259
    @PeterB - This first update is just rainstorms. The next update will probably be some user-requested features and snow. We are ultimately building this system for our in-production game, Dawn of the Tyrant, so if it calls for sand storms then you will see sand storms in a future update :) At this point though, I cannot say for sure what other features we will be implementing in the future.
     
  7. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,435
    I was most impressed by the "water running down the lens" effect, first time I've seen that in a Unity demo.
     
  8. UnleadedGames

    UnleadedGames

    Joined:
    Feb 17, 2008
    Posts:
    242
    Best 100 bucks spent on a plug in ever. EVER.
     
  9. sh0v0r

    sh0v0r

    Joined:
    Nov 29, 2010
    Posts:
    295
    Amazing work Chris!

    When the storms is at its peak it feels really intense!

    One observation though was that the grass doesn't seam to be as turbulent as the trees.

    And having dynamic light flashes synced with thunder would be icing on the cake.

    Quite possibly the best real time heavy storm I've seen, looking forward to seeing your game with systems like this.
     
  10. granada

    granada

    Joined:
    Oct 31, 2010
    Posts:
    135
    I think this is one of the best things i have seen in unity so far :D.

    Dave
     
  11. RoyS

    RoyS

    Joined:
    Jan 12, 2009
    Posts:
    663
    This is what I've been waiting for. I've been watching the Unisky threads. Once the weather system is completed, then I'll purchase Unisky.

    Just curious as to whether the weather patterns (rain, clear, overcast, etc) is random or in a certain pattern. Also, can you set an area to have mainly a few weather patterns (snowy areas won't get rain and some areas get a lot of thunderstorms). Can you set the duration of each of the weather patterns (when rainstorms hit they are brief, or you get more sun than rain).
     
    Last edited: Feb 13, 2011
  12. U2

    U2

    Joined:
    Aug 12, 2008
    Posts:
    215
    The water running down the lens blew me away, I totally did not expect that. This has quickly become one of the staple plug-ins available on the asset store. A must have.
     
  13. andererandre

    andererandre

    Joined:
    Dec 17, 2010
    Posts:
    681
    Brilliant atmosphere, brilliant sound effects and brilliant water effects! It's just awesome to see what some people are able to do with Unity.
     
  14. HolBol

    HolBol

    Joined:
    Feb 9, 2010
    Posts:
    2,884
    If i had the money, this is no2 on my list of things to buy.
    Reason?
    Unity pro is no.1.
    Great work, I loved the video, and the rain on the camera was fantastic. And the amazing price tag= wow. Really cool!
     
  15. Chris Morris

    Chris Morris

    Joined:
    Dec 19, 2009
    Posts:
    259
    Thanks guys, I really do appreciate it. I think the storms we get here in the southern U.S. gave me some good inspiration :)

    @Sh0v0r - Good eye! I didn't change the grass wind settings, I only set a wind zone. I'll add that to the to-do list. Also, lightning is one of the few things left to do. Gotta have that before release.

    @RoyS - The weather patterns are random, and are controlled by a few parameters like storm frequency, strength, and length. Our game is going to call for some more detailed weather constraints, such as snow-only regions etc., so future updates are likely to go into more detail with these parameters.
     
  16. rosor

    rosor

    Joined:
    Nov 15, 2009
    Posts:
    3,795
    @chris Morris : this looks really good but here for the moment i'm still hesitating between the 2 different skies that are available. The reason : As many other users, i'm an artist, not a technical one, and much less a coder so i don't want to access your variables by code. I want these to be predefined in a seperate script that would list all different weathers states and then trigger them in different ways ( random or in a certain order etc...) If you do that you've got all the place ( well, to my mind ). I've already thrown " a message in a bottle" like that far earlier ( as i was really expecting this asset, even though at a less affordable price). never answered back.... But i'm still looking at it with a great desire ( but for me it's like gazing at a beautiful girl who don't want me, unless you do what i say)
     
  17. SirLancelot

    SirLancelot

    Joined:
    Dec 30, 2009
    Posts:
    144
    Looks absolutely fantastic!! Really good work! But I have a question... Any ETA for the snow update? So it is not included in 1.2, right? But will also be a free update for current buyers? Thanks!
     
  18. Chris Morris

    Chris Morris

    Joined:
    Dec 19, 2009
    Posts:
    259
    @rosor - The tool is very parameterized, you actually don't need to touch any code unless you want to do something very specific. UniSky is setup so that you immediately get a functional sky, and with this update you also get immediate dynamic weather, all controlled by a simple interface. If you haven't seen it yet, check out the tutorial video, which shows what I mean: http://www.youtube.com/watch?v=rjHJBwNs2pw

    @SirLancelot - The 1.2 update does not include snow, just rain. The next update will have snow, and will be free to UniSky licensees.
     
  19. rosor

    rosor

    Joined:
    Nov 15, 2009
    Posts:
    3,795
    @Chris: you know it's a while since i've seen this video, i follow this thread really often. and i know that there are some customers or potential one who desire a thing that i mentionned. i mean what happen at run time ??? if i want my weather to transition between shinny weather to stormy weather. how can i achieve that with your unisky editor. if there are no coding skills needed i would definitely be your next customer. But the video only shows how to customize "one" sky and then it plays with these defined parameters. ( well, it's the way i understand this awesome feature ( i repeat !!). how about animating the skies at run time ( with different states) ?? In the way i understand your feature, that's the point i really want to be clarified before i purchase. Thanks for taking time to answer back.
    regards
    (well, i already know the first answer to come would be : " learn how to code !!!" .... if it's the case that would unfortunately be a dead end for me)
    AWESOME FEATURE I REPEAT !!!
    edit : what happens if i'm under a roof and it's raining ??????? are there some detection collision test or i don't know ????
     
    Last edited: Feb 14, 2011
  20. thegreyman1

    thegreyman1

    Joined:
    Jun 10, 2010
    Posts:
    164
    Pretty F***ing awesome.... you know with all the talent on this site, if the right people here got together and made one big heave-ho towards the right idea something spectacular is bound to happen.... I vote for a new section- the community project area!! or something similar :)
     
    Last edited: Feb 14, 2011
  21. chaos1986

    chaos1986

    Joined:
    Mar 29, 2009
    Posts:
    230
    I'm glad i convinced my project manager to get this, can we use the sound effects and stuff in a commercial release?
     
  22. Chris Morris

    Chris Morris

    Joined:
    Dec 19, 2009
    Posts:
    259
    @rosor - D'accord, je comprends maintenant. Au fait, je viens de commencer l'apprentissage la langue :)

    The weather update automates the transitions from sunny to stormy based on some parameters like "storm frequency" and "storm length". However, if you want to be able to tell UniSky to get cloudy or stormy on command, you will have to use some code. In our next update, v1.3, we will be making this very easy. Something like:

    uniSky.TransitionToPreset("Sunny", 30);

    Would transition from the current state to a predefined sunny state over 30 seconds. This way people can have more control over what happens and when it happens, so as to not be so procedural.

    @chaos1986 - Yes, the same license applied to UniSky applies to all included assets. Once you are a licensee, you can use anything commercially.
     
    Last edited: Feb 14, 2011
  23. ZachGriffin

    ZachGriffin

    Joined:
    Apr 1, 2010
    Posts:
    49
    Hi Chris,

    Love the new update mate! Really nice atmosphere. One question I have is about the clouds and their reaction to the sunlight - Could you include cloud shading similar to the other non-procedural sky in the asset store in the update? One that highlights the leading edge of the cloud with the sunlight color and darkens the trailing edge?
     
  24. rosor

    rosor

    Joined:
    Nov 15, 2009
    Posts:
    3,795
    @Chris : well chris, i think i'm convinced ( your sky is a little bit less " realistic" than the other but its really the most realistic according to what life is. ( if i have enough money i'll purchase both skies, because their purposes are quite different and could fit different projects. But about the rain, again. if i'm in a cavern and the stormy weather is triggered, will it rains inside the cavern or will you give the same ease as your transition state example to shut off only the rain and let only play the ambiance outside or something like that??.
    If i understand the right way your:
    uniSky.TransitionToPreset("Sunny", 30);
    i could integrate a delay time then uniSky.TransitionToPreset("snowy", 125); delay(1200) etc ...

    if i can write a really small function like that which looks like a play list and be looped ( well i can't do better for the moment but it would fit my need and purpose in a rather good way) i think i will really use it. Thanks for your answer. But i'm still waiting for the other one ( sorry i'm a bit : " tatillon"


    PS : pas mal du tout pour un début ! mais tu as oublié le "de" ( apprentissage DE la langue ). Why are you learnig french ??? i don't think it's a must have skill for game development. But for sure if you go in Paris send a PM i would be pleased to thank you for giving to the community such a tool and have a drink !!! Cheaper than hotel, but i think you gonna become millionaire with such a feature. you'd rather sleep at the Georges 5 palace hotel ....
     
  25. chaos1986

    chaos1986

    Joined:
    Mar 29, 2009
    Posts:
    230
    I got a few small criticisms, the main one is the stars, it appears that they are on a plain and they scroll, they should be stationary to give a better effect.

    Might be fixed now but the skydome model you used was quite strangly put together and didn't have a base, I made my own in 3dsMax and pulled it in, and it looked better, the low poly one you used did show artifacts in the atmosphere and also the moon disappeared when it was at the edge of the screen, and if you look directly up at it and turn, the moon turns as well.

    The default sunrise was exactly the same as the sunset and both sunrise and sunset didn't have enough green (it was too red/orange, even on the opposite side from the sun), the ambient light never changes which can make it to bright at night or to dark in the day, if you had the ambient light go up and directional light go down (and the shadow strength also go up/down) it would look killer for say a foggy day or something and i second Zach, it would be nice to have some extra shading in the clouds (maybe a normal map?). But as I said so far it's REALLY good work
     
  26. PeterB

    PeterB

    Joined:
    Nov 3, 2010
    Posts:
    365
    Thanks for the info! Looks as if I'll purchase this, especially since you're going to develop it further. I'm implementing something where an accurate weather pattern and day/night cycle is necessary. Does you plugin calculate the day/night cycle from latitude/longitude information, or will I be able to plugin in my existing code for this?
     
  27. Yusuf-AKDAG

    Yusuf-AKDAG

    Joined:
    May 13, 2009
    Posts:
    280
    Can you add "save/load configuration" functionality too?
     
  28. Chris Morris

    Chris Morris

    Joined:
    Dec 19, 2009
    Posts:
    259
    @chaos - thanks for the critique, the stars scrolling is unrealistic I agree - I'll be taking that out. As for the skydome, I didn't create a bottom to it because it doesn't need one. Below a certain point under the horizon, the sky shader turns black. No point in keeping that in the mesh and it saves tris. You could use a higher polygon mesh like you pointed out, but I figured it was smart for a general purpose tool to find a good performance/look ratio, and I felt the tris in the mesh were decent in that regard.

    The moon disappearing at the edge of the screen also needs to be fixed. Unity culls objects when it "thinks" the object is out of view, and I haven't been able to find a way to keep objects from being culled that way. In this sense, I might have to rethink how the moon is rendered to keep this from happening. Another reason to change it is the billboarding - it causes the moon to rotate with the camera like you said. Certainly going to need to fix that.

    The weather update automates sun intensity and ambient levels, which you can kind of tell in the video. It gets much darker when those storm clouds move in. The cloud shading might change as updates progress as well, because I agree they can always look better.

    @PeterB - Yes, the sun position is calculated using latitude/longitude/juliandate etc. However, the moon and stars are not physically accurate to this, just the sun. The stars are a texture, and the moon position is loosely derived from the sun position.

    @yakdag - In our next version, v1.3, we will be implementing a preset system where you can save "presets" such as cloudy, overcast, dark storm, bright sun, and bypass the automation so that you can transition between these presets in code. So you can't in this version, 1.2, but the next version will have save/load preset functionality.

    Thanks for the feedback everyone!
     
    Last edited: Feb 15, 2011
  29. rosor

    rosor

    Joined:
    Nov 15, 2009
    Posts:
    3,795
    Yeppah !!!! will be a v1.3 owner !!!! So glad !!!! " de la bombe !!! je vais enfin devenir l'heureux possesseur de la version 1.3 !!!!!"
     
  30. U2

    U2

    Joined:
    Aug 12, 2008
    Posts:
    215
    I wonder if you made the moon a smaller image with mostly alpha around it that Unity wouldn't clip it so soon. i.e. the plan the image is on would be bigger with maybe the moon image offset to the top of the image or something... or scroll the moon's uv from bottom to top as it goes from rise to setting as a clipping work around...
     
  31. Chris Morris

    Chris Morris

    Joined:
    Dec 19, 2009
    Posts:
    259
    @rutecht - I think the problem is I'm billboarding in the vertex shader, so the CPU thinks all the vertices are in the middle, so when the middle can't be seen, the whole image gets culled. Simple fix would be to billboard in the CPU, at the expense of a little performance :\
     
  32. Codster

    Codster

    Joined:
    Apr 27, 2010
    Posts:
    440
    Sheez that looks good, no really GREAT job.
     
  33. U2

    U2

    Joined:
    Aug 12, 2008
    Posts:
    215
    Yeah that is what I was trying to allude to in my last post. I'll try and re-explain my proposed solution.

    Make a larger plane for your billboard with the image of the moon offset u,v, position so that the moon is visible on the top of the plane during moon rise. As the moon travels through the sky scroll it's uv's down so that the image sets before the middle of the billboard hits the horizon. the moon image would have to be like 70% alpha so that when it's scrolled on the u,v that it doesn't repeat. Actually depending on how the bill board turns to face the camera etc.. you may not even have to scroll the u,v but simply make the moon image offset from the center of the image.. Would have to experiment to see if it works.
     
  34. Chris Morris

    Chris Morris

    Joined:
    Dec 19, 2009
    Posts:
    259
    Quick update for those keeping up - looking at submitting to the update to the Asset Store on Monday. I just put lightning in and will be wrapping up everything else over the weekend. Keep an eye out :)
     
  35. xandeck

    xandeck

    Joined:
    Apr 2, 2009
    Posts:
    563
    Great video... item is now in my list :p
     
  36. chaos1986

    chaos1986

    Joined:
    Mar 29, 2009
    Posts:
    230
    Ohh nice!, can't wait to try this out :D
     
  37. U2

    U2

    Joined:
    Aug 12, 2008
    Posts:
    215
    Yay! * Does the little fat guy dance *
     
  38. Vinícius Sanctus

    Vinícius Sanctus

    Joined:
    Dec 14, 2009
    Posts:
    282
    Omg! Im under stun effects right now! Really awesome, how much does it cost? It requires shaders 3.0 or higher right? Thx a lot keep up this thing is hugely well done!

    Hugs!
     
  39. grfxman

    grfxman

    Joined:
    May 28, 2009
    Posts:
    309
    Is there a web player out for V1.2 yet we can test? And is this going to be in the asset store this week still?

    Thanks
     
  40. DukeOfDesmo

    DukeOfDesmo

    Joined:
    Oct 29, 2008
    Posts:
    67
    How much will this cost in terms of additional web-player file size?
     
  41. Shardz

    Shardz

    Joined:
    Dec 30, 2010
    Posts:
    42
    This reminds me of one time (and one time only) when I was playing Oblivion and was messing around with the real weather mods. Somehow I completely fouled things up by editing things I shouldn't have and ended up running two simultaneous random weather simulations in the game. Well, one night I strolled outside one of the castles after gaining a quest and both weather systems dialed up storm settings which were pounding the game world with gale force. I remember having to go out in that mess at night in the wilderness to obtain an item and it was one really amazing atmosphere and game experience. Since that day, I haven't seen anything match that type of simulation until now. Great work on this project overall.
     
  42. Chris Morris

    Chris Morris

    Joined:
    Dec 19, 2009
    Posts:
    259
    @grfxman - Yes, the update should go live on the asset store this week. Also, I may build a webplayer when it is released so people can get a better feel for it, but I will be making a tutorial video that goes over the new features which should give a good idea of what all is new in the update.

    @DukeOfDesmo - Around 2MB. There are three compressed sound files and a few textures added to the package.*

    @Shardz - I love Oblivion! I remember some of those mods were really great looking. Thanks very much for the comment, I really appreciate it.

    [B*]EDIT: @DukeOfDesmo - Well Unity seems to have trouble looping compressed sounds without hiccuping, so the package now has to use uncompressed sounds which adds a considerable about to the size. However, the interface allows you to easily swap in your own sounds so really the additional size is up to you.[/B]
     
    Last edited: Mar 3, 2011
  43. grfxman

    grfxman

    Joined:
    May 28, 2009
    Posts:
    309
    Are you planning any tutorials on how to use this in a multi-player set up? I'm interested in how to tie this in so that players see the same time of day and weather patterns.
     
  44. Chris Morris

    Chris Morris

    Joined:
    Dec 19, 2009
    Posts:
    259
    @grfxman - Everything runs on numbers, so as long as those variables are the same across all clients, all clients will see the same thing. As of right now, UniSky doesn't explicitly make this easy - I think that would be a good addition in a future update. For right now though, you're going to have to sync up the variables yourself.

    Our in-development game Dawn of the Tyrant is going to use a master script that runs on the server and executes all of the clients' numbers for them, but I don't know if I'm going to be able to release it since it will also be tied in with proprietary gameplay mechanics etc.

    PS - I just finished the update (a couple of days later than I expected), sending it to the Asset Store ASAP! :)
     
  45. grfxman

    grfxman

    Joined:
    May 28, 2009
    Posts:
    309
    Even if the times are controlled by variables, doesn't players starting at different times of day affect this.

    If a player A starts at noon and player B starts at 2 PM wont there be a 2 hour time difference in the weather. Maybe I could find a way for the clients to only grab weather variables from the server.

    I'm asking because I was totally impressed by your rain video. I stop all work on my own system when I saw it.

    Some time ago on the Realm Crafter forum a gentleman had made some excellent cloud/sky shaders for Directx. He posted them for public use. I was going to spend some time to port them to Unity. I added them as attachment here.
    Maybe you'll find them interesting.

    I think you guys could do much more with them then I ever could :)
     

    Attached Files:

  46. OutCyder

    OutCyder

    Joined:
    Mar 19, 2009
    Posts:
    2,178
    Damn astonishing!!!
     
  47. Chris Morris

    Chris Morris

    Joined:
    Dec 19, 2009
    Posts:
    259
    @grfxman - The goal is to use the server to keep the time, as you mentioned. That way all users, no matter when they log in or play, will be grabbing the time as the server keeps it, as well as all the other weather variables. Even if two users log in 2 hours apart, if the server says it is 12p.m. in the game world, that time is sent to both clients, and so they are synced.

    I took a look over the shaders and from what I can tell they are somewhat rudimentary - precalculated perlin noise with a simple color interpolation for the sky - but there are some interesting tricks that would be interesting to see how it looks.

    @megmaltese - Thanks! :)
     
  48. U2

    U2

    Joined:
    Aug 12, 2008
    Posts:
    215
    <- is barely hanging on to the edge of his seat waiting for 1.2 >.>
     
  49. chadchat

    chadchat

    Joined:
    Apr 5, 2008
    Posts:
    154
     ditto
     
  50. Chris Morris

    Chris Morris

    Joined:
    Dec 19, 2009
    Posts:
    259
    Ahhh sorry guys - as these things usually go, we found a visual bug at the last moment when we tested it on an ATI card. I apologize for the delay, but it really shouldn't be much longer. I'm working out the bug today and will probably be submitting it this weekend.

    Just got to get these bugs worked out so you don't have to deal with them :)
     
unityunity