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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Time of Day - Dynamic Sky Dome

Discussion in 'Assets and Asset Store' started by andererandre, Mar 4, 2013.

  1. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,013
    I am about as inept as it gets when it comes to this part of the process, but I'm trying to learn it. So, I actually have no clue what you mean. What should I be using? I have the Colorful FX asset, which can do a lot of post processing, so maybe there is something there?

    EDIT: I did some research and I see what you mean. Something like ToneMapping, right? I didn't have anything actually, but now that I know it is needed, I'll be adding it. Thanks. Any other tips are welcome.
     
    Last edited: Feb 18, 2016
  2. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,628
    Unity will be adding tonemapping soon, I believe.

    (In Unity 5.4, due March 16.)
     
  3. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,013
    It's already in 5.3. I added it to my camera and played with the different settings. I read about Adaptive Reinhard, which is a very cool effect for going from indoors to outdoors and vice-versa. Unfortunately, it seems impossible to get working right. lol
     
  4. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    Yes tone mapping of one sort or another. I don't know enough about it to advise. I only really knew to use it myself because otherwise plenty of stuff in Unity in HDR mode gets blown out to horrible white straight away, including Time Of Day under certain conditions, and especially when noticeable when certain other effects like bloom are in use.

    There is already Tonemapping effect built into unity standard assets but they are writing a new version thats better. You don't have to wait for 5.4 to try the new one - like some other new effects they are working on (SSR, better DoF, better anti-aliasing) this stuff is available from Unity separately for free in pre-release form:

    http://forum.unity3d.com/threads/cinematic-image-effects-pre-release-package.372562/
     
    hopeful likes this.
  5. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,013
    Thanks for the information. I'll have to give that a try as well. Hopefully, I can finally get the lighting look that I've been striving for.
     
  6. BackwoodsGaming

    BackwoodsGaming

    Joined:
    Jan 2, 2014
    Posts:
    2,229
    I had a similar experience when I first started using ToD and I came to find out the unity lighting window baking lightmaps prior to ToD seemed to be causing the issues. I deleted the lightmaps and everything seems to be working fine now. Since then, the first thing I do when I create a scene is go into the Lighting window and uncheck the auto lightmap build crap.. I wish there was a way to make that a default in unity.. lol

    But that would be what I would try. Disable the auto Build in the lighting window and delete whatever lightmap has been deleted. Unity places it in the same folder as your terrain file.
     
  7. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,013
    I don't have any "issues" per se. I'm just trying to figure out how to get the best possible lighting look for my game. For my outdoor scenes I'm doing all realtime lighting and there is no baked data. Although, I am experimenting with precomputed realtime GI as well. I'm starting to get closer to the look I want by utilizing some of the tips I've gotten in various forums.
     
  8. daeuk

    daeuk

    Joined:
    Mar 3, 2013
    Posts:
    67
    any chance weather system be added? if not, what weather system works best with TOD?
     
  9. davidkrings

    davidkrings

    Joined:
    Feb 15, 2016
    Posts:
    12
    +1 for this

    I didn't go through the whole thread, but is there a web build of this so we can see the TOD and clouds animating? That would be great!
     
  10. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,628
    Tethys and BackwoodsGaming like this.
  11. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,013
  12. mm_ASH

    mm_ASH

    Joined:
    Nov 15, 2013
    Posts:
    358
    Hi. Maybe it is stupid question, but I just didn`t found simple way to do it: how can I create custom 2-3 satellites to replace moon?
     
  13. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,628
    Only by doing your own stuff. The system is set up for earth's moon.
     
  14. mm_ASH

    mm_ASH

    Joined:
    Nov 15, 2013
    Posts:
    358
    Ok, thank you for answer.
     
  15. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    @plzdiekthxbye In TOD is there currently an feature or could you possibly add a feature for a game object to be switched on/off between times, by day,random etc I want to apply physical forces to objects but wind zones don't work for them so I have to use a third party physics system.
     
  16. Chuckalicious

    Chuckalicious

    Joined:
    Jul 28, 2012
    Posts:
    51
    I have the same question as kerrmedia above regarding shadows blocks. Turn the camera away a little and they go away. Turn back towards a shadow and huge blocks pop back in again.

    Question 2, I get black/white dithering around the landscape terrain mountain edges. Disable TOD_Scattering and the black/white dithered edges go away.
     
  17. andererandre

    andererandre

    Joined:
    Dec 17, 2010
    Posts:
    683
    Does it disappear when you adjust the dome scale factor on the TOD_Camera component? Does it disappear when you add the TOD_Scattering image effect to your camera?

    If you want to cover all of these cases then I'd recommend writing your own script for it. To get you started there are scripts that toggle certain components for day / night in the example folder.

    Which Unity version are you guys on? Does this happen in a minimal test project as well?

    This sounds like the known issue in forward rendering which I'll have to look into - are you using forward rendering and is switching to deferred an option for you?
     
  18. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,013
    Are there any plans to improve performance of the TOD_Scattering? I like the effect, but I get a 10 fps drop in performance when I switch the effect on when running on the Wii U.
     
  19. timsk

    timsk

    Joined:
    May 27, 2011
    Posts:
    177
    We bought the package and it's working great.

    We have a requirement that I'm struggling to get working with this solution. Our view is from an aircraft, the sky looks great but we need to put clouds at the bottom of the screen (as we are viewing from cruise altitude).

    We tried duplicating the cloud layer, flipping it upside down. We also tried creating an entirely seperate skydome. Your package doesn't seem to support either of these options.

    We also tried using the billboarded clouds, but it seems impossible to get them moving nicely (as the normal clouds do).

    Could you provide any suggestions?
     
    hopeful likes this.
  20. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    @plzdiekthxbye I'm no programmer this is why I bought your asset. I understand you probably have too much on your list or maybe not interested adding the feature. I was hoping that you might be able to in the least is to add a script on the day/night audio script that could turn on/wake game objects.
     
  21. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    I'd recommend this https://www.assetstore.unity3d.com/en/#!/content/49858
    I've experimented with having two layers of clouds, one above my head and another below.. it's an post effect that you attach to a camera and in VR looks awesome.
     
  22. timsk

    timsk

    Joined:
    May 27, 2011
    Posts:
    177
    Thanks for the suggestion Ascensi. Unfortunately I think it will look a bit strange if the lighting does not match between the upper and lower clouds.

    Edit: It seems it would work great if we could just have 2 cloud "spheres". One at the bottom and one at the top. If we could set different textures and cloud settings to each of these, we could tweak it to get it how we want. Editing the package to support this seems like a lot of work tho!
     
    Last edited: Feb 25, 2016
  23. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    It has a feature to take on/absorb a light object (sun, moon, lightening etc). Unless you're using a night and day cycle using lightening object will illuminate the clouds when it goes off, just have to lower the brightness of the clouds to match the scene. Two component layers would cause performance issues I believe so I've made a suggestion to the developer that he might be able set it to mirror itself and offset the mirrored part. It's pretty fantastic just using one. Anyway I'm not trying to sell anything - good luck :)
     
  24. timsk

    timsk

    Joined:
    May 27, 2011
    Posts:
    177
    We are indeed using a day/night cycle. It's quite a simple scene running on a desktop computer (configured by us) so we aren't too concerned with performance as we will be kitting it out with the best hardware.

    We really do need the lighting to match, one of the main reasons we went for this package was for the impressive lighting features on the clouds. But not being able to render clouds at the bottom of the screen is a huge limitation for us.

    Is this asset still supported? I was hoping to hear thoughts from the creator on how to achieve what we want.
     
  25. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,628
    Being able to add cloud shells (an array?) sounds like a great idea. I know the dev here has been working on improving clouds since day one. Possibly this could be an easy new feature to add.

    As for support, the dev responded to a number of queries in this thread just yesterday.
     
  26. timsk

    timsk

    Joined:
    May 27, 2011
    Posts:
    177
    I've managed to hack the package to support multiple cloud shells. But it needs a lot more work.

    The shaders seem to be designed to be viewed from "underneath". All of the shading and such needs to be modified to be viewed from the top. The perspective also seems a bit off, the horizon currently meets at the middle of the sphere. Which looks very strange when the top and bottom cloud layers sort of "meet" in the center. I'll keep working at it, but am really hoping for any help here.
     
  27. DivergenceOnline

    DivergenceOnline

    Joined:
    Apr 19, 2015
    Posts:
    244
    I just now realized the cause of an issue that i've been noticing for the last several months as to why any object with a high reflective surface appears too damn bright on its underside. It's ToD. More specifically, it's because the reflection probe (and thus the skybox) being created by ToD is totally white from the horizon down. Therefore it doesn't matter whether you're standing on a totally black surface or not, the reflection coming up from below is 100% pure bright white.

    So how do you change that?
     
    Tinjaw and hopeful like this.
  28. timsk

    timsk

    Joined:
    May 27, 2011
    Posts:
    177
    @DivergenceOnline: That sounds strange. I just quickly setup reflections in my scene (and removed my modifications to the package) and the cubemap generated looks fine. I have all the time of day objects set to the "Sky" layer (with it's own dedicated camera, rendering just that layer), I then set the reflection culling mask to just render the "Sky" layer.

    Bit of progress on the multiple clouds: I have it setup nicely now, safely supporting 2 cloud layer. Next step is to make the clouds at the bottom look different!

    Could someone explain what the different channels in the cloud_layers texture do? I've tried reading the shaders but couldn't make much sense of it
     
    hopeful likes this.
  29. Rodolfo-Rubens

    Rodolfo-Rubens

    Joined:
    Nov 17, 2012
    Posts:
    1,196
    Hi, can I have a look at some images from these updates:
    - Revamped cloud density tracing for much more realistic, semi-volumetric clouds
    - Revamped cloud shading using a physically based backend
    - Replaced cloud shadow projector with the new TOD_Shadows image effect

    I didn't buy yet, I'm really unsure which day/night cycle system to buy...

    Thanks.
     
  30. DivergenceOnline

    DivergenceOnline

    Joined:
    Apr 19, 2015
    Posts:
    244
    Is the bottom half of your cubemap completely white during the day or not.
    Screenshot-2016-02-27-12.45.37.png
     
    Last edited: Mar 1, 2016
  31. timsk

    timsk

    Joined:
    May 27, 2011
    Posts:
    177
    Hmm, no. Something is definitely wrong with your setup.

    Could you post a screenshot of your "Reflection" section of your skydome inspector?
     
  32. nubdev

    nubdev

    Joined:
    Mar 30, 2013
    Posts:
    85
    Hey, great asset - glad to have bought.

    I have a question regarding the sun and moon... I am using the lat/long and UTC values of
    Latitude: -33.8678500
    Longitude: 151.2073200
    UTC: +10

    and I never seem to see the sun or moon. I have located the moon and it is transparent, raising brightness or adjusting any other values at run time does nothing. What influences the moon and suns visibility?

    Thanks for any assistance you can offer, again great asset.
     
  33. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    Play with the date?
     
  34. nubdev

    nubdev

    Joined:
    Mar 30, 2013
    Posts:
    85
    It may have been something in another asset as now the moon is visible without changing any settings, also the sun.. though the sun flare is visible at night also now.
     
  35. timsk

    timsk

    Joined:
    May 27, 2011
    Posts:
    177
    Could really use some help with this. I've made something that looks different, but without knowing how the texture was made / what each of the channels do it's hard to create what we want.

    From our experiments it seems:
    R/G = Coverage and edge fade
    B = Shading (used in attenuation and such)
    A = Seems to define something similar to transparency. Or rather, how light travels through the clouds (rather than opacity of the cloud itself).
     
  36. DivergenceOnline

    DivergenceOnline

    Joined:
    Apr 19, 2015
    Posts:
    244
    This is the default setup. It's been this way, always. If yours looks different, you've done something different to it my man.

    Need a response from plzthankxbyeetc

    https://gyazo.com/0ebad1f8257492db1f30aa34e601f5c5

     
  37. timsk

    timsk

    Joined:
    May 27, 2011
    Posts:
    177
    You need to change your culling mask. It's currently not reflecting anything as it's set to "Nothing".
     
    hopeful likes this.
  38. jplebre

    jplebre

    Joined:
    May 8, 2014
    Posts:
    14
    Hi there,
    I'm loving the asset but I'm having far too many problems.
    I think it's mainly due to the version of Unity I'm using.

    Issues include (but not limited to): Unity Log warning about shader errors, shaders failing to load, open or import. Fog script not working properly (making the whole scene go dark), TOD scattering does not turn on (the tick box simply does nothing), etc.
    I'm on Unity3d v5.3.3p1

    I'm probably asking this again, but I'd just like to have an updated answer as to what is the recommended best version of Unity for ToD v3.1.0?

    Thanks in advance
     
  39. jplebre

    jplebre

    Joined:
    May 8, 2014
    Posts:
    14
    Downgrading to 5.3.2 helped! I just have the stupid error from emissionRate.

    I seem to struggle with a "Bloom" and over brightness of sorts with
    Camera:
    HDR enabled,
    Deffered,
    Linear colours

    SkyBox
    Linear
    HDR

    Disabling HDR on the box seems to help a moderate amount. With LDR looks just about right, except the sun, which now looks like a blob of a material of sorts.

    The moon also looks overexposed with the above settings.

    Am I missing something?
     
  40. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    As far as I know the emission rate is a warning, not an error.

    If you are using HDR on your camera then you need something at/near the end of the camera effects chain which converts the HDR back to a nice viewable range of colours. For example a Tonemapping effect, or some other colour correction/exposure control effect. The Unity Standard Asset Effects includes Tonemapping, and the new Cinematic Image effects that are available as a frequently-updated preview release from Unity includes a completely rewritten alternative Tonemapping effect ( http://forum.unity3d.com/threads/cinematic-image-effects-pre-release-package.372562/ )
     
  41. jplebre

    jplebre

    Joined:
    May 8, 2014
    Posts:
    14
    Ah-HA! Actually i just made it to the end of the thread and realised you answered a similar convo above.
    The included unity Tonemapper seemed to do nothing for me :S

    Downloading these previews asset, will give them a spin!
    THanks!
     
  42. DivergenceOnline

    DivergenceOnline

    Joined:
    Apr 19, 2015
    Posts:
    244
    What are you taking about dude.

    That's the default setup, like i've already pointed out. Are you actually trying to say that your skydome reflection probe should have something other than the sky in it? Have you ever tried that?
     
  43. timsk

    timsk

    Joined:
    May 27, 2011
    Posts:
    177
    The default setup has reflections disabled. Your reflections are not currently set to render anything. I suggest you read up on reflection probes (they work very similarly to cameras): Reflection Probes.

    Could someone give me some help with the cloud textures? Perhaps plzdiekthxbye is around? We are still struggling to create the textures in the correct format
     
  44. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    I'm not convinced that reflection probe advice is correct - it's controlled by a Time Of Day script and works fine for me out of the box without messing with its settings. The lower half of the probe is grey for me though, not white.
     
  45. timsk

    timsk

    Joined:
    May 27, 2011
    Posts:
    177
    It's not controlled by the scripts at all, it's just a normal reflection probe. The TOD scripts just create one at start-up based on the settings you provide in the "Reflections" part of the TOD_Sky component.

    You could turn it off and create the probe yourself, it would be no different.
     
  46. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    I know what you mean, but the manual is very clear to be careful about adding other objects to that reflection probe. Mostly because this probe re-renders based on the interval settings you use, and that can get expensive when you add more objects to that probe. I'd rather use other probes for other stuff in the scene because I can bake them, place them more appropriately etc.

    Perhaps if I just quote from the Time Of Day manual it will help clear up these misconceptions and hopefully offer DivergenceOnline a solution to their problem, even though they seem to be a dismissive to those other than the asset author who are trying to help!

     
    hopeful likes this.
  47. DivergenceOnline

    DivergenceOnline

    Joined:
    Apr 19, 2015
    Posts:
    244
    I'm sorry, but you're 100% wrong. It is absolutely controlled by ToD scripts.
    https://gyazo.com/9081613084b8450430625cd5bddd4981

    I'm not dismissive to otherS, i'm dismissing the completely incorrect statement of one person who is, again, wrong about the subject matter, yet telling me that i've done something wrong when he doesn't even know how the product functions by default. He's first saying the problem is i have the exact settings that the documentation you just quoted explicitly states i should have. Then again with the whole "it doesn't use scripting" which is again, completely wrong.

    plzthanksdiewhatever hasn't pushed an update to ToD in over eight months so it's not like he's too busy doing righteous work for all of us to respond, and so yes, i really don't think it's too much to ask for him to help on this thread instead of spending all day every day posting random stuff on his twitter.
     
  48. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    So did you learn anything from that section of the documentation? For me it indicates that you should be playing with ToD ambient light settings to fix your problem.
     
  49. timsk

    timsk

    Joined:
    May 27, 2011
    Posts:
    177
    The manual is just telling you general advice about reflection probes. None of it is specific to this package. The probe is updated on line 586 in TOD_SKY+API.cs. It does nothing but update the probe as you normally would from code.

    Actually, I'm slightly wrong. TOD does define an update timer for the probe. But that won't change what is being rendered, just how often. This is the only reason it's done in code at all.
     
  50. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    How often its done is the reason for the advice about not putting too much stuff in that probe.