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

Chronosphere Day/Night Management System [Updated!]

Discussion in 'Made With Unity' started by ReverendWolf, Apr 29, 2010.

  1. ReverendWolf

    ReverendWolf

    Joined:
    Mar 28, 2010
    Posts:
    47
    Hello, All. I've been working on something to help me manage day and night cycles in my game, and I've managed to get this far, thanks to iTween.

    The Chronosphere allows you to set up configurable days that last as long as you want them, and allows you to set up timed changes in the Sun, Moon, and Skies, as well as instantiate them from any hour in a 24 hour sequence.

    The newest version adds weather into the mix, drawing from a few weather elements and a list of configurable weather conditions that are selected randomly.

    Here is a web player to look at, and a Unitypackage to check it out for yourself.

    **NEW! 5-8-10, uploaded a new version that includes the previously invisible Daysphere, some basic limiters on variables, and other aesthetic improvements

    **NEW! 5-13-10, updated the Webplayer to include the newest version with weather, added a link to the .unitypackage file.

    Download:
    http://www.mediafire.com/?twqiyke0zm4

    Webplayer:
    http://reverendwolf.herobo.com/
     
  2. sebako

    sebako

    Joined:
    Jun 27, 2009
    Posts:
    301
    where is the webplayer?
     
    the_mr_matt likes this.
  3. Mixality_KrankyBoy

    Mixality_KrankyBoy

    Joined:
    Mar 27, 2009
    Posts:
    737
    Looks great - keep up the good work! I think many people could use this...
     
  4. mts2021

    mts2021

    Joined:
    Aug 4, 2007
    Posts:
    150
    I was just looking for something like this, how convenient.
    Great stuff... Will this be a free release or a paid bit?
    Def will want to check this out and be first in line! :)
    Keep up the good work!
     
  5. sebako

    sebako

    Joined:
    Jun 27, 2009
    Posts:
    301
    this is amazing! thanks man! :D
     
  6. ReverendWolf

    ReverendWolf

    Joined:
    Mar 28, 2010
    Posts:
    47
    Thanks, all, for the positive feedback :)

    I'm not looking to get any money from this. As much as I searched around I figured it would be a great tool for those of us like me who are new at Unity to get a head start into making interesting content.

    I'm still working on the weather component, once I get that part sorted out I'll be leaving some updates here!
     
  7. pixelplacement1

    pixelplacement1

    Joined:
    Aug 19, 2009
    Posts:
    674
    Just as a heads up, I'll be allowing the old colorTo to allow the changing of the color on lights instead of adding another method. Thanks for sending me that info!
     
  8. AgainstTime

    AgainstTime

    Joined:
    Apr 14, 2010
    Posts:
    84
    I didnt test it, but i was thinking if u put the weather depending on the hour on the user's computer system.datetime or something like that
     
  9. sebako

    sebako

    Joined:
    Jun 27, 2009
    Posts:
    301
    can anyone help me find out whats wrong?
    I've imported it via Assets->Importpackage, then I started looking around and dropped The Chronosphere Prefab into my scene, so far so good, but i cannot see the night or days skybox, just the standard blue.

    Any ideas whats wrong? What are the steps you set it up?

    any help appreciated

    thanks
     
  10. ReverendWolf

    ReverendWolf

    Joined:
    Mar 28, 2010
    Posts:
    47
    @ pixelplacement1:
    That's great! I look forward to the new release!

    @ AgainstTime:
    That's something I hadn't really considered, since I saw so many scripts that were devoted to setting the sun and such based on local information. I wanted to do something that had a life of it's own that you could control and specify. That would be an interesting toggle to add if I could figure out how to do it though :)

    @ zemog86:
    I have to confess, this is the first thing I've ever tried to export as a unitypackage. While I made sure to include everything I used for the Chronosphere in it's own separate folder, I wouldn't be surprised if something went wrong or I just didn't do it quite right. As a precaution, I did include the actual project folder itself, with *everything* that's in the webplayer.
     
  11. pixelplacement1

    pixelplacement1

    Joined:
    Aug 19, 2009
    Posts:
    674
    Just pushed up the new updates ;)
     
  12. shocka144

    shocka144

    Joined:
    May 2, 2010
    Posts:
    2
    i would personally stay clear of setting day/night on the time of the users system...because like MSR (Project Gotham racing, for example) some players will end up only playing the game at nightime.
     
  13. sebako

    sebako

    Joined:
    Jun 27, 2009
    Posts:
    301
    yes I have taken a look what might be different, but everything seems to be the same, I see the starsurface in the editor, but when press play it is the blue standard background.

    edit: hah now I got it, I've just setup the shifts wrong ;)
     
  14. AgainstTime

    AgainstTime

    Joined:
    Apr 14, 2010
    Posts:
    84
    You can always put editable settings in the options menu as well. ;) or change ur computer time :D
     
  15. eyebot117

    eyebot117

    Joined:
    Apr 11, 2010
    Posts:
    8
    So I can add my custom skyboxes with this thing? Can I make light maps if I try to use it with my terrain? I need to know because I'd like to make day/night cycles as well as other weather skies during the day and night.
     
  16. ReverendWolf

    ReverendWolf

    Joined:
    Mar 28, 2010
    Posts:
    47
    The current version that I have for download has two skyspheres. The daytime sphere has been accidentally turned off, so all that tweens in is a rotating nighttime sphere with a skymap on it. You could replace those textures to your liking, but know that the system uses spheres and not skyboxes. I'm working on a few fixes and will be uploading the newest "complete" version soon!
     
  17. ReverendWolf

    ReverendWolf

    Joined:
    Mar 28, 2010
    Posts:
    47
    Just posted the newest version, check it out! :)
     
  18. platonia96

    platonia96

    Joined:
    Mar 10, 2010
    Posts:
    225
    This is really amazing, except I keep getting this error randomly:

    !IsNormalized (ray.GetDirection ())
    UnityEditor.EditorGUIUtility:RenderGameViewCameras(Rect, Rect, Boolean, Boolean)
    UnityEditor.EditorGUIUtility:RenderGameViewCameras(Rect, Rect, Boolean, Boolean)
    UnityEditor.GameView:OnGUI()
    System.Reflection.MonoMethod:InternalInvoke(Object, Object[])
    System.Reflection.MonoMethod:InternalInvoke(Object, Object[])
    System.Reflection.MonoMethod:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo)
    System.Reflection.MethodBase:Invoke(Object, Object[])
    UnityEditor.HostView:Invoke(String)
    UnityEditor.DockArea:OnGUI()

    [/Users/build/builds/unity-26/unity-2.6.x/Projects/../Runtime/Dynamics/PhysicsManager.cpp line 1020]
     
  19. platonia96

    platonia96

    Joined:
    Mar 10, 2010
    Posts:
    225
    along with this error, it crashes. Any help?

    There seems to also be a missing script on the main camera. Don't know if this is anything important, though.
     
  20. SirLancelot

    SirLancelot

    Joined:
    Dec 30, 2009
    Posts:
    144
    @ReverendWolf

    How did you make this nice looking clouds texture (CloudsTest). I've tried several things in Photoshop and Paint.net but with no luck.

    I use a Sphere as Skydome and a separate clouds sphere but it looks horrible with my test clouds (with no alpha) because it isn't seamless and has no alpha channel by default.

    Can you explain how you did this clouds? And can I use your clouds (only) for my own projects? Thanks!

    I'm looking for a good way to make clouds/sky (sphere) textures for ages...
     
  21. Thomas GD

    Thomas GD

    Joined:
    Oct 23, 2009
    Posts:
    103
    Hey your system is cool. But how do you adjust the brightness of the sun? When I play it my game is just so bright when its day and in the night its as yours.
     
  22. platonia96

    platonia96

    Joined:
    Mar 10, 2010
    Posts:
    225
    Does anybody have the same problem as me?
     
  23. kylesmile

    kylesmile

    Joined:
    Apr 12, 2010
    Posts:
    12
    I'm using this for a project, and it is very good. I have a few comments and suggestions, though:
    • • There is no visual moon
      • Maybe you could add a fog effect
      • Some visible lightning bolts could improve the effects
     
  24. Merries

    Merries

    Joined:
    Feb 2, 2009
    Posts:
    262
    Thank you for doing this very nice.
     
  25. PolyMad

    PolyMad

    Joined:
    Mar 19, 2009
    Posts:
    2,350
  26. Merries

    Merries

    Joined:
    Feb 2, 2009
    Posts:
    262
    Forgive the question but I tried this out and when I ran the game the screen was very blurry, I'm thinking I placed the chronosphere on the wrong object in my scene.

    Do I need to set up a separate camera and place it on that? Do I put it on the characters camera?

    Thanks!
     
  27. The Ebb

    The Ebb

    Joined:
    Feb 15, 2010
    Posts:
    1
    Looks like the download on the latest version is bad. Any possibility of a new download location? I would love to see this in action.

    Cheers! :D
     
  28. kfrench16

    kfrench16

    Joined:
    Mar 22, 2009
    Posts:
    73
    I tried this out and I received an error. It was looking for an installed version of 3DStudio Max. Has anyone else received this error?
     
  29. SoDoomed

    SoDoomed

    Joined:
    May 28, 2010
    Posts:
    6
    This is great. For someone like me it saves a lot of time :)

    Can you alter the wind with this also? Like when it comes over stormy, have strong gusts of wind with the rain, or dry and dusty kind of thing.
     
  30. David-Lindsay

    David-Lindsay

    Joined:
    May 20, 2009
    Posts:
    121
    Hi,

    I have looked into the coding aspect of night and day cycles myself before and found that there are limitations on what properties of the terrain you can and can't access.

    I have a question: Are you able to change the tint of the grass during run-time? I found it to be locked...

    If you have found a way to access and change the tint colour, I'd love to know.
     
  31. platonia96

    platonia96

    Joined:
    Mar 10, 2010
    Posts:
    225
    Sorry to bump this, but im still getting the error above and it keeps stopping my game :(

    does anybody know why this is happening?
     
  32. ReverendWolf

    ReverendWolf

    Joined:
    Mar 28, 2010
    Posts:
    47
    Looking at the error, I have to say I have no idea where that would be coming from. The Chronosphere is really just a lot of iTweens and some custom set up arrays, none of them interface at all with GUI or physics or anything. In fact, there's no colliders at all. Nor is there any GUI script.

    Sorry friend, I've got no clue...
     
  33. Muckel

    Muckel

    Joined:
    Mar 26, 2009
    Posts:
    471
    Hello,
    well imported the package on a Mac and got 3dMax import Error....
    Can you maybe use FBX for the Modells ?
    many MAny thanxxx
    looking forward for a new package ---- Thank You
    :oops: kerstin
     
  34. gonzilla

    gonzilla

    Joined:
    Dec 29, 2009
    Posts:
    46
    Zemog86, don´t delete the FPS of the chronosphere.
     
  35. Grady Lorenzo

    Grady Lorenzo

    Joined:
    Jan 18, 2010
    Posts:
    407
    mediafire wont let me download it. even if I save it to my account, it wont let me download it...
     
  36. MarronedAmerican

    MarronedAmerican

    Joined:
    Jul 1, 2014
    Posts:
    3
    Thank You SO Much for this, THis is the best script ever :D
     
  37. ldvunity

    ldvunity

    Joined:
    Sep 30, 2014
    Posts:
    1
    Thanks a lot !!
     
  38. radjudy

    radjudy

    Joined:
    Oct 23, 2013
    Posts:
    13
    hi, i'm working on a MAC and it won't import .max files. it suggests .fbx, but i can't change this so missing things show up fuscha. do you have an alternate package with different extensions?
    thanks!
    -- judy
     
  39. Gooseman_1977

    Gooseman_1977

    Joined:
    Aug 15, 2013
    Posts:
    89
    hmm.. the webplayer link seems to be broken for me.
     
  40. DizzyJustin

    DizzyJustin

    Joined:
    Sep 2, 2014
    Posts:
    1
    i love this.... It makes me cry a little
     
  41. MrMonkeyMan

    MrMonkeyMan

    Joined:
    Jan 4, 2015
    Posts:
    1
    How do i scale it up without visual problems
     
  42. HonoraryBob

    HonoraryBob

    Joined:
    May 26, 2011
    Posts:
    1,214

    When I try to run the webplayer, it gives a "Data file is corrupt (not a Unity Web Player file)" error.
     
  43. m1a2x

    m1a2x

    Joined:
    Jan 5, 2015
    Posts:
    3
    So, as far as permissions go, if I make a game using this asset, can I publish the game as long as I give you credit?
     
  44. Sykoo

    Sykoo

    Joined:
    Jul 25, 2014
    Posts:
    1,394
    Such a great package for completely free! It's amazing, good job :)
     
  45. BraceForImpact

    BraceForImpact

    Joined:
    Jun 28, 2015
    Posts:
    1
    you are a legend
     
  46. perryperkins72

    perryperkins72

    Joined:
    Jul 21, 2015
    Posts:
    2
    can i sell this on asset store? it looks great.. i can make some money with this