Search Unity

TENKOKU - Dynamic Sky

Discussion in 'Assets and Asset Store' started by chingwa, Apr 12, 2015.

  1. Bagnol

    Bagnol

    Joined:
    Sep 5, 2013
    Posts:
    169
    @DarkXess That definitely looks like a fog issue to me. I tried to reproduce in 1.0.9c but I wasn't able to achieve that same look. Are you using the "Tenkoku Sky Fog" image effect or Unity's Global Fog effect? I'm not familiar with Gaia's Tenkoku integration so I'm not sure whether it does that for you or not.
     
    chingwa and DarkXess like this.
  2. DarkXess

    DarkXess

    Joined:
    Sep 30, 2014
    Posts:
    136
    Yea sorry, meant to update my post here, I disabled the "global fog" and now it's working fine, it seems that the global fog doesn't go well with the tenkoku fog - maybe should be mentioned in the manual :p
     
    Bagnol likes this.
  3. Bagnol

    Bagnol

    Joined:
    Sep 5, 2013
    Posts:
    169
    Glad to hear you managed to get it working :)
     
    chingwa and DarkXess like this.
  4. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    @DarkXess It looks like you have another fog effect on your camera... like global fog perhaps?

    EDIT: oops, just saw the new replies above. Global fog does not tie into the Tenkoku lighting info (actually, it doesn't even tie into standard Unity light info either.) If you really need to use global fog for your scene then it can be edited a bit so that it does accept Tenkoku lighting, send me an email or a PM and I can talk you through the editing process.
     
    DarkXess likes this.
  5. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    @awrightmgt Just an FYI, I've converted the String comparisons to simple int comparisons in the calculations function as you noted. The skyfog function has also been optimized. These updates will be in version 1.1.0.
     
  6. DarkXess

    DarkXess

    Joined:
    Sep 30, 2014
    Posts:
    136
    Yea its fixed mate, though you may want to add that in the documentation about global fog ;)
     
    chingwa likes this.
  7. Pauloxande

    Pauloxande

    Joined:
    Feb 8, 2014
    Posts:
    110
    Hello guys I'm using 5.3.2f1 and my tenkoku not appear clouds and also not rain.
     

    Attached Files:

  8. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    @Pauloxande Do you get any errors in your console while running Tenkoku? And you've set the settings on clouds/rain under the 'weather' tab, correct? (may be an obvious question but had to ask just in case)
     
  9. Pauloxande

    Pauloxande

    Joined:
    Feb 8, 2014
    Posts:
    110
    look
     

    Attached Files:

  10. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    Try setting the weather setting to 'manual', then you can go and customize the cloud/rain settings. If it still doesn't work then let me know.

    The 'automatic(random)' weather generator is... well... completely random. If you let it run long enough it will eventually get cloudy and rain, but currently there is no way to control the randomness of different weather settings.

    I'm working on a more advanced weather automation system which will allow for much more control, but can't say for sure when this will be ready... it shouldn't be too far away.
     
  11. TheSeawolf

    TheSeawolf

    Joined:
    Apr 10, 2015
    Posts:
    267
    @chingwa , first time reader and poster here. I have finally relented and succumbed to the unceasing sensational screenshots presented on the Gaia forum and other related forums :)

    I have long put off your purchasing your weather asset because cannot recall seeing one that had either snow and or rain related weather. After reading through the entire forum I now understand that both rain and snow are in.

    I must admit seeing that thunder and lightning storms are coming soon, and the addition of the Gaia Extension are deal makers for a purchase shortly! I have another weather asset and find making dark night scenes frustratingly difficult.

    How easy is it to get a dark night that doesn't illuminate the ground like daytime? This is the ultimate deal breaker (although rather trivial :) ), is it hit and miss or possible just with a few sliders?
     
    AdamGoodrich likes this.
  12. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    @TheSeawolf Thanks for your interest in Tenkoku! Making dark night scenes is very easy. Actually the defaul settings for Tenkoku are already quite dark, but you can control the overall brightness of the night scene, as well as the amount of direct light from the moon with just a couple sliders. :) The amount of light coming from the moon varies depending on the phase of the moon, but it can be made brighter/darker off at your preference... all the way to being completely black if that's what you need.
     
    TheSeawolf likes this.
  13. TheSeawolf

    TheSeawolf

    Joined:
    Apr 10, 2015
    Posts:
    267
    Giddy up then :) that's great news, I love the nighttime colouring I have seen so far. They are exactly what I have been hoping to achieve for a year, but can't get.

    Final question regarding the current state of random/dynamic weather? I apologise for asking as I'm sure you've heard it before.

    Are weather transitions e.g sunny, cloudy, rainy, cloudy, fine automatic, of do these need to be scripted? The above example is just a random one :)
     
  14. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    Currently there is a random weather generator.... you can select how long a weather "pattern" will last for and how long it takes to transition to the next pattern, but there is not control over how often a pattern will occur (it's completely random).

    Alternatively you can manually set individual weather attributes, or setup some scripting to do specific transitions yourself.

    I'm working on a more robust dynamic weather generator which I hope to have available soon.
     
    TheSeawolf and AdamGoodrich like this.
  15. CaptainMurphy

    CaptainMurphy

    Joined:
    Jul 15, 2014
    Posts:
    746
    Our weather is managed through a single script that controls wind speeds, direction, cloud control, etc. Took us about an hour to write it and wire it up to a UI. We then figured out some 'points' to keep in a table that we could lerp from/to for weather transitions. As much as having a more advanced weather generator sounds good, I can bet that in most cases each game will want different results. Whenever those storms are ready to test @chingwa, you just let us know. We would love to get our hands on them and get them networked up.
     
    AdamGoodrich and chingwa like this.
  16. TheSeawolf

    TheSeawolf

    Joined:
    Apr 10, 2015
    Posts:
    267
    Thanks Chingwa for clarifying my questions. I'm really looking forward to purchasing soonish.
     
  17. TheSeawolf

    TheSeawolf

    Joined:
    Apr 10, 2015
    Posts:
    267
    @chingwa , how is the latest update progressing? Also, with the GX, does this set all features like the camera, wind zone, skybox and weather?

    Finally, any chance of a randomly chosen and non specifically designated Easter sale next week? It would be great if the "Easter bunny" had plans for this:)
     
  18. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    Hi Seawolf,
    Things are coming along. The more advanced auto weather generator will not be in the next update(which I hope to get out very soon), but will be the focus of the next version. The GX plugin allows you to automatically setup Tenkoku, and choose between some predefined weather patterns and time of day settings.

    Tenkoku is not scheduled for any more sales, those interested can 'buy in confidence' of not missing out on a discount.

    I've never met the Easter Bunny and have thus determined he/she doesn't actually exist (bah! Humbug!)... You may have a different experience though :D
     
  19. TheSeawolf

    TheSeawolf

    Joined:
    Apr 10, 2015
    Posts:
    267
    Good answer thanks @chingwa , that's what I was looking for.

    Also regarding the Easter bunny; as long as the chocolate eggs keep turning up each Easter Sunday, then I'll keep believing :)
     
  20. Bartolomeus755

    Bartolomeus755

    Joined:
    Jun 20, 2013
    Posts:
    283
    Hi chingwa,

    I just purchased Tenkoku. And I'm very impressed by your work.

    But I have a big problem with the cloud height. I'm working on a
    Boat Simulator with multiple cameras. In the orbit cam the cloud
    layer is to low. So the camera breaks through the clouds layer.
    Is there a way to correct this?



    Marko
     
  21. Quatum1000

    Quatum1000

    Joined:
    Oct 5, 2014
    Posts:
    889
    Hi,

    1) Some of the textures are not seamless.
    2) Would it be possible to set the strato could layer to white? They are always greyish. That doesn't look well.
    3) Is it possible to set the sun size?
    4) Would it be possible to set fog density and distance?

    Untitled-1.jpg
     
  22. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    @Bartolomeus755 Currently the cloud height is hardcoded, but you can edit the code to get around this. First open up the scripts/tenkokumodule.js file, and comment out line 2050, so it looks like this...
    Code (CSharp):
    1. //cloudPlaneObject.transform.localPosition.y = -1.0;
    After that you can go to the Tenkoku-->SkySphere-->Effects-->fxCloudPlane object in your scene and manually change the height. The default is -1, but changing it to 0, or 1 might help, but I don't recommend going much higher than that.

    The other issue you might be seeinghere is a failure of Tenkoku to track the orbitting when you switch from one camera to another. What I recommend is to go to the configuration tab in Tenkoku and make sure the 'camera mode' is set to 'auto select'. This will track the camera in your scene that's marked with the 'MainCamera' tag. Then when you switch cameras to orbit (and back) make sure to set only the current camera with the maincamera tag (and the old one with 'untagged'), which should ensure Tenkoku continuously tracks the correct camera.
     
    Last edited: Mar 28, 2016
    Bartolomeus755 likes this.
  23. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    @Quatum1000 ...

    Looks like I missed a few spots. I'll make sure this is completely seamless in the next update. thanks!
    There isn't currently a way to do this through the interface, you'd have to edit the cloud shader to do this properly. I'll look into brightening them up for the next release. Is it just AltoStratus that you have issue with?
    Yes, under the 'celestial settings tab you can change the size of the sun under the 'Sun' section.
    Yes, under the 'atmospherics' tab you can set the fog distance and also strengthen/lighten the density with the 'fog density' setting. Additionally you can add a height fog effect as well by going to the tenkoku image effect on your camera and editing the height and height density settings there.
     
  24. Quatum1000

    Quatum1000

    Joined:
    Oct 5, 2014
    Posts:
    889
    No, all the cloud layers seems not to be brighten enough to have a bright day effect.

    Thanks for the answers.
     
  25. Bartolomeus755

    Bartolomeus755

    Joined:
    Jun 20, 2013
    Posts:
    283
    Thank you for your quick reply chingwa. That solved my issue with the orbit cam.
     
    chingwa likes this.
  26. VargaPD

    VargaPD

    Joined:
    Mar 6, 2015
    Posts:
    64
    Hello!

    I haven't read the full forum topic, so I don't know, if it was asked earlier, but I searched for it through the searcher and google and I have found nothing.
    I am using Tenkoku with Gaia, and my problem is, that I don't have shadows on details (grass and flowers) in a scene. If I start a new one in the same project, it's working, I only have this problem on a specific scene. I can't remember if there were this problem at the start, I just noticed it some days ago, and I have modified so much in the scene, that I don't want to start it all from the start ... I have asked the Gaia forum, and they have no solutions, they say it's a lighting problem.
    I also noticed, that sometimes it is working for a short period, when the light ... rebuilding ... thing happens. Then the problem comes back, even if I turn off the automatic build.

    Any suggestion?

    shadow_problem.PNG

    shadow_ok.PNG
     
  27. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    Hi VargaPD,
    Honestly, it sounds like a Unity glitch, especially since you can't recreate it in another scene. But I think this is probably related to one of your terrain settings... the first I would try is go to your terrain settings and edit the 'Detail Resolution Per Patch' setting, changing it from the default 16 to perhaps 32 or 64? If that doesn't work you might try resetting all your terrain details by changing the 'detail resolution' setting to a different number (note, this will remove all your current grass details!)

    I don't believe it would be affected by any setting in Tenkoku, but just in case you might try double checking the light Render Modes... try going to Tenkoku-->SkySphere-->LIGHT_World and set the render mode to 'important', then perhaps also go to the LIGHT_NightSky and try setting this to 'Not Important' (this will affect nighttime moon shadows though).

    Let me know if any of the above helps.
     
  28. VargaPD

    VargaPD

    Joined:
    Mar 6, 2015
    Posts:
    64
    It didn't help :( However, I have noticed something. I have cleared the cache, and rebuilt the lighting. There were shadows some point during the rebuild, but gone before finished.
     
  29. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    Well as a test I suggest turning off the Tenkoku object in your scene and adding a normal Unity directional light instead, just to narrow down whether it's a Tenkoku problem, or a Unity light problem. To me it sounds like a Unity terrain glitch, you can try turning off your current terrain in your scene and adding a new one with some grass to see if it's a scene/project issue or just an issue with this particular terrain asset...?
     
  30. VargaPD

    VargaPD

    Joined:
    Mar 6, 2015
    Posts:
    64
    Oh, sorry, I have forgot to tell: it is also happening with a built in directional light. It's not Tenkoku's bug, but I thought, that maybe here can get some tips, because you also working with lights. And the clearing and respawning of the details didn't help.
     
  31. Bagnol

    Bagnol

    Joined:
    Sep 5, 2013
    Posts:
    169
    @VargaPD You wouldn't happen to be using the Advanced Foliage Shader, would you?
     
  32. VargaPD

    VargaPD

    Joined:
    Mar 6, 2015
    Posts:
    64
    No, I don't have that asset. Should I consider buying it?
     
  33. Bagnol

    Bagnol

    Joined:
    Sep 5, 2013
    Posts:
    169
    It's got some great features but with the admittedly very limited time I've spent with it I personally haven't been able to get it all working correctly. I only asked because the last time I briefly installed it to take another swing at it, I had a similar effect to your grass lighting bug.

    I just want to point out that I'm 99.99% sure my inability to get AFS working is entirely a PEBKAC and/or ID10T issue, but I have seen it look similar to your screenshot.
     
  34. VargaPD

    VargaPD

    Joined:
    Mar 6, 2015
    Posts:
    64
    Thank you for your help! Another shader pack solved my problem :)
     
    Bagnol likes this.
  35. kayke

    kayke

    Joined:
    Oct 21, 2015
    Posts:
    42
    Greta Asset!
    I am having an issue with the Fog. When ever I place the Tenkoku Fog on the Camera the horizon rotates when ever the camera rotates.
     
  36. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    @kayke Make sure that Tenkoku is actually tracking the correct camera. The easiest way to do this is to set the camera 'tag' to be 'mainCamera', and then in the Tenkoku configuration panel set the Camera Mode to 'Auto Select Camera'. Whenever I've seen this error on my side, it's usually because there are more than one cameras in the scene, and Tenkoku is tracking the wrong one. So if you do have more than one, then make sure they are all tagged as 'untagged' except for the main/current camera that you want to use.

    If you switch between cameras it's easiest to just switch the tag as appropriate on the cameras and Tenkoku should pickup the correct one.

    Let me know if this helps or if you continue to have any issues.
     
  37. VengenceARTs

    VengenceARTs

    Joined:
    Apr 2, 2016
    Posts:
    6
    How would one go about fixing this particle issue?
    PS: I have been looking everywhere for a fix, the fog script that's included seems to be causing the problem''
     
  38. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    @VengenceARTs I assume you want the fog to apply to the particle effects, correct? Since the fog relies on the scene depth buffer, in order to get fog on top of the particle effect you'll need to use a custom particle shader that writes to the scene depth buffer as well.

    This is kind of a hairy issue in Unity because transparent objects don't have depth buffer-write capability. One typical workaround is to use a cutout shader instead of a full transparent shader... this might work for some effects ok, but the edges for your smoke might be too drastic. There are other more complicated ways of fudging the edges such as a stochastic binary fade... but this can be tricky to implement and doesn't look as good as full transparent anyway.

    But to start I suggest trying a cutout shader instead for your particles. make sure the shader 'queue' is set to 'geometry' and that 'zwrite on' is set in the shader as well.
     
  39. VengenceARTs

    VengenceARTs

    Joined:
    Apr 2, 2016
    Posts:
    6
    @chingwa thanks I'll post back if It fixes my problem, :)
     
    Last edited: Apr 6, 2016
  40. kayke

    kayke

    Joined:
    Oct 21, 2015
    Posts:
    42

    Set the tag to main camera and it worked. Thank you!
     
  41. veddycent

    veddycent

    Joined:
    Jul 22, 2013
    Posts:
    109
    Hey Chingwa,

    Just a couple of quick questions.
    Is there a way to stop the skysphere moving along with the main camera?? I have to move around in the scene pretty quickly because its a very large area so the skysphere starts to flicker really badly If you any more info then left me know.

    Also have you thought any more about converting Tenkoku to C#. I remember reading it a while back and you said you would consider it.

    Keep up the great work!
    Thanks
     
  42. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    Hi veddycent,
    If the skydome doesn't track your camera, then you will start to see some strange behavior/visuals in the sky. What's likely happening is your controller/camera is being moved too fast for other systems to keep up with... usually this happens when movement or physics get calculated in the Update() function which happens multiple times per frame... whereas Tenkoku position updates only happen once per frame.

    You can either switch Tenkoku to update multiple times a frame (not recommended!) or an even better option would be to dig into your controller component and switch it instead... often you can do this by renaming the Update() function to be LateUpdate(). Sometimes, if you already have both update and lateupdate functions, you can copy the contents of update() into LateUpdate() and then remove it Update() from the code completely.

    Or as mentioned you can try and switch Tenkoku... open up the TenkokuModule.js file and copy the contents of Update() into the top of the LateUpdate() function... then delete Update().

    I hope the above makes sense. :D Let me know if you continue to have trouble with this.

    Edit: Oh, and yes a C# version of Tenkoku is on the way.
     
    Last edited: Apr 18, 2016
    BackwoodsGaming likes this.
  43. veddycent

    veddycent

    Joined:
    Jul 22, 2013
    Posts:
    109
    Hi Chingwa

    The problem was coroutines. Moving it all to Update(), as you mentioned, fixed the issue and all is running smoothly :D
    I was planning on removing the coroutines at some point as they were causing me issues elsewhere, so now is a good time to do that.

    Great to hear that a c# version is on the way :)

    Thanks for the help!
     
    chingwa likes this.
  44. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    What's happening here? Hmmm....
     
  45. BackwoodsGaming

    BackwoodsGaming

    Joined:
    Jan 2, 2014
    Posts:
    2,229
    Uhm.. Is it done yet? OH! Wait! I promised to not badger you for porting to C# any more... heheh At least assuming this might be what is going on.. One can be hopeful, at least.. heheh
     
    chingwa likes this.
  46. VargaPD

    VargaPD

    Joined:
    Mar 6, 2015
    Posts:
    64
    Dear forumers,

    I'm using Tenkoku with Gaia.
    I've got a new HDD, and I wanted to move my project to it. I made a package with all the assets, scenes, everything. However, in the new project where I imported it, the terrain looks ... well, not so good. I have rebuilt the lightmaps, resetted the ground textures, nothing happened. What else I have to do again, which elements/properties not saved in a scene file or a package?

    Sincerely,
    VargaPD
     
  47. Bagnol

    Bagnol

    Joined:
    Sep 5, 2013
    Posts:
    169
    @VargaPD I don't know if it's the best way to do it, as I don't tend to move projects around much, but I've had some luck with simply copying the entire project folder over and browsing to it through the Unity launcher. If that's an option you might want to look into that. If not, can we get a screenshot or two of the terrain issues?
     
  48. VargaPD

    VargaPD

    Joined:
    Mar 6, 2015
    Posts:
    64
    @Bagnol My system says that I can't read some subfolders, files, even as administrator priviliges. I am using Windows 8.1
     
  49. Bagnol

    Bagnol

    Joined:
    Sep 5, 2013
    Posts:
    169
    @VargaPD In that case I'm sorry but I'm not sure. I'm still back on W7, and haven't really poked around in 8 or 10 much yet :(

    What kinds of trouble are you having with your terrain exactly? Is it an odd colour? Maybe a screenshot?
     
  50. VargaPD

    VargaPD

    Joined:
    Mar 6, 2015
    Posts:
    64
    @Bagnol So now I see, that it is not only the ground, but something with the lights overall.



    00000007Image.jpg 00000009Image.jpg