Search Unity

TENKOKU - Dynamic Sky

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

  1. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    @nobluff67 I suspect Gaia Pro might be the culprit here.... What I recommend is to first try removing the Gaia dependency file that ships with Tenkoku and see if that solves the problem. Go into the 'Tenkoku Dynamic Sky/Scripts' folder and delete the 'TenkokuGaia.cs' file. You will still be able to use Tenkoku and Gaia together without this file, the only difference is that you lose the auto-setup functionality that Gaia supplies. However Tenkoku is easy to install manually, so you should just follow the normal Tenkoku setup procedure after deleting this file.

    If you still have issues then I would also recommend deleting the CTS dependency as well. Go into the 'Tenkoku Dynamic Sky/Scripts' folder and delete the 'Tenkoku_CTS_Weather.cs' file. You can always re-install this file from the Tenkoku package in the future.

    The specific error messages you list in your screenshot don't mean much to me (at least they don't list anything that seems related to Tenkoku codebase), but I suspect after trying the above then your issues with Tenkoku will be fixed. Let me know if this helps!
     
  2. nobluff67

    nobluff67

    Joined:
    Nov 3, 2016
    Posts:
    338
    this was before seeing your post above. Checking your solution now.

    also getting this now

    NullReferenceException: Object reference not set to an instance of an object
    Tenkoku.Core.TenkokuModule.LoadObjects () (at Assets/TENKOKU - DYNAMIC SKY/SCRIPTS/TenkokuModule.cs:865)
    Tenkoku.Core.TenkokuModule.Awake () (at Assets/TENKOKU - DYNAMIC SKY/SCRIPTS/TenkokuModule.cs:755)
     
  3. nobluff67

    nobluff67

    Joined:
    Nov 3, 2016
    Posts:
    338
    It didnt help. I have removed all gaia,cts and sky. Removed any "Scripting define symbols for gaia, cts. I have reinstalled only sky. Demo still crashing. Also crashes on new scene. Does not crash on new project (which is an unrealistic solution for current project with lots of hours attached to it).

    I think the demo crashing unity and the config issue in the image posted, are probably related.
     
  4. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    @nobluff67 This is very strange indeed. I recommend to delete the Tenkoku/Demo folder completely. Tell me the exact Unity version you're using in your project and I'll send you an updated demo folder built with that version specifically.
     
  5. nobluff67

    nobluff67

    Joined:
    Nov 3, 2016
    Posts:
    338
    Well, this is typical. Deleting the library folder fixed everything. I should make a mental note that debugging any strange behavior with any asset should START with deleting this folder.
     
  6. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    LOL ok great! I usually delete the library folder from my project every few months, if for no other reason than to save space from the massive amount of temporary files it consumes.
     
  7. Rodolfo-Rubens

    Rodolfo-Rubens

    Joined:
    Nov 17, 2012
    Posts:
    1,197
    Hi,

    Does this work with Crest Ocean System?

    Thanks.
     
  8. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    I have not used Crest, but I don't see why they wouldn't work together.
     
  9. Rodolfo-Rubens

    Rodolfo-Rubens

    Joined:
    Nov 17, 2012
    Posts:
    1,197
    I'm wondering because some systems tend to have some problems with transparency, draw order, etc. I spent a couple of hours trying to make a volumetric light work with Crest.
     
  10. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    864
    Any news about Tenkoku 2?
     
  11. akalegman

    akalegman

    Joined:
    Feb 23, 2019
    Posts:
    26
    Hi there, I have been having a strange issue with Tenkoku where it seems like the skybox material reverts to default when the project is built. Everything looks fantastic in the editor but once built, the scene looks dark. We have light mapping disabled for this project.

    Any help would be greatly appreciated!
     
  12. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    Hi @akalegman The first thing I would do is to make sure the material and shader references have not been lost...

    Under the Tenkoku DynamicSky object in your scene is a sub-object called "Tenkoku_Library" click on this object and make sure the "sky material" slots at the top have project materials referenced in them (and are not "missing", or "none"). Also click on the shaders rollout and make sure none of the shaders element slots are missing and shader references. And just to be sure check the rest of the named objects in the list for any missing references as well.

    If nothing is missing, then make sure that the shaders rollout includes a reference to "TENKOKU/Tenkoku_Sky_Elek" in one of the slots. Let me know if you see anything missing. This would be my first guess why the build is not matching the editor.

    @Harekelas I don't have any 2.0 news yet. :(
     
  13. akalegman

    akalegman

    Joined:
    Feb 23, 2019
    Posts:
    26
    Thanks for the quick reply!

    I have done as you asked and I can confirm that there are 22 shaders in the rollout and both skybox and legacy skybox have references.

    Any other advice?
     
    Last edited: Jul 10, 2020
  14. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    @akalegman It would be helpful to know if it is a problem with the Tenkoku install overall, or just your particular project setup. Are you able to make a test build of the included demo scene, and see if that also has sky/brightness issues? Also can you tell me what version of Unity you are using?
     
  15. akalegman

    akalegman

    Joined:
    Feb 23, 2019
    Posts:
    26
    I have followed your advice and I think I have nearly found the issue. After some testing it seems a particular setting in the component could be causing the issue. When I have narrowed it down I will let you know!
     
  16. akalegman

    akalegman

    Joined:
    Feb 23, 2019
    Posts:
    26
    OK I found the component parameter causing all the trouble. If Enable Reflection Probe is unchecked then the build looks ugly. But checked then everything looks perfect in the build. Could you explain this setting please, I don't quite understand why I should use it as this scene currently is not using any reflection probes.

    PS: I am using Unity 2019.2.5f1

    Thanks for your continued help!
     
    chingwa likes this.
  17. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    @akalegman I see. Tenkoku uses it's own automatic reflection probe that captures the sky information, and then relays that to objects in the scene. It's a bit of a misnomer for Unity to only label this as "Reflection Probe", because it also uses this for ambient lighting as well. It makes sense now that with this setting turned off then all your objects would appear dark, as they wouldn't be getting any ambient light information applied in the rendering pass. The Tenkoku Reflection Probe should be really light weight as it is set to only render the sky, and not other scene object information. I definitely recommend keeping this on in most cases.
     
  18. Berz_

    Berz_

    Joined:
    Jan 28, 2017
    Posts:
    1
    Hello,
    Been trying to fix this for a while now. I cant seem to get the skybox to render, it just renders black. Is it something I'm missing? It's the same in the demo scene. You can see my screenshots.

    I'm using unity2019.4
     

    Attached Files:

  19. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    @emilberzen Hi sorry for the delay in responding here! I'm not 100% sure why the sky would be black, but perhaps it's related to your baked lighting settings (in the unity Lighting panel). Tenkoku is generally intended for dynamically lit scenes, so I usually recommend turning off any baked lighting data. It's also possible your scene camera is defaulting to a solid black instead of rendering the skybox. Tenkoku should be setting this for you, assuming it can find your camera. Make sure your camera has the MainCamera tag set on the gameobject, OR drag your camera into the 'main camera' slot in the Tenkoku configuration panel.
     
  20. tcz8

    tcz8

    Joined:
    Aug 20, 2015
    Posts:
    504
    Hello, I'm having problems getting this thing to work. In 2018 it looks weird and in 2020 the sky is all gray. That is on a fresh project with nothing else. Cant get the demo scene working.
     
  21. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    I've tested all the way up to the latest Unity release so it isn't a unity compatibility issue, as long as you are using the standard renderer (i.e. not URP or HDRP). Can you perhaps post a screenshot of what you are seeing on your end?
     
  22. tcz8

    tcz8

    Joined:
    Aug 20, 2015
    Posts:
    504
    Yes and thank you. I will make sure I'm in a standard project first. Will get back to you on this one.
     
  23. tcz8

    tcz8

    Joined:
    Aug 20, 2015
    Posts:
    504
    Ok I tried it again, made sure i wasn't creating a URP or HDRP project and this is what I get from the demo scene under Unity 2020.1.7:
    upload_2020-10-5_2-28-1.png
     
  24. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    Hi @tcz8 Thanks for the screenshot.

    After doing some tests here I have an idea what the issue is. Likely the problem lies in an incompatibility between the 2018 install, and the 2020 install. Specifically, taking the Tenkoku files from 2018 and importing them into a 2020 project can cause some unexpected issues, due to minor differences in the Tenkoku files and the Unity project settings. This is unfortunate, but can't be helped in some cases due to inevitable Engine changes from one version to the next.

    Currently there are three versions of Tenkoku on the asset store, which will be selected automatically based on the different Unity versions used to make the download. (There is a Unity 5.x/2017.x version, a Unity 2018.x version, and a Unity 2019.x/2020.x version).

    I believe the solution in this case is to delete the Tenkoku folder in your Unity2020 project, and then download Tenkoku from the Asset Store again directly into Unity 2020... This will insure you are getting the most compatible files for that Unity version.

    Try it out and let me know how it works for you.
     
  25. Eidoboy

    Eidoboy

    Joined:
    Jul 3, 2012
    Posts:
    29
    Greetings, I have some strange night sky issue in the southern emisphere
    It happens for very short times, please try the coordinates in the attached image as an example
    Let me know, thanks
     

    Attached Files:

    chingwa likes this.
  26. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    @Eidoboy Thanks for the screenshot. Yes I also see this strange sky darkening. It looks somewhat like the effect that kicks in during a solar eclipse, but there should not be an eclipse happening during that date/time. It also appears to happen in those coordinates despite the year... I'm going to have to take a closer look at what is going on here before I can give you a solution.
     
    Eidoboy likes this.
  27. Eidoboy

    Eidoboy

    Joined:
    Jul 3, 2012
    Posts:
    29
    any news on this? thanks
     
  28. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    @Eidoboy Sorry I don't have a solution to this yet, but hopefully I can offer one soon.
     
  29. Chris_Payne_QS

    Chris_Payne_QS

    Joined:
    Jul 16, 2016
    Posts:
    84
    I'm using Tenkoku in a URP project and it's mostly working :)
    Fog and sun/moon/planets are going to need some hacking but the sky, clouds, aurora and stars look fine. I should fire up this version in a standard project just to check what else I'm missing though...
     
    chingwa likes this.
  30. SDC2X

    SDC2X

    Joined:
    Apr 4, 2017
    Posts:
    8
    Hi,

    I have this problem:
    NullReferenceException: Object reference not set to an instance of an object
    Tenkoku.Core.TenkokuModule.LoadObjects () (at Assets/TENKOKU - DYNAMIC SKY/SCRIPTS/TenkokuModule.cs:865)
    Tenkoku.Core.TenkokuModule.Awake () (at Assets/TENKOKU - DYNAMIC SKY/SCRIPTS/TenkokuModule.cs:755)
     
  31. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    @SetDave it sounds like Tenkoku cannot find one of it's internal objects. Make sure the Tenkoku/TenkokuLibrary object in your scene is not missing any shaders (there should be 22 int he list) or static objects. If you do see anything missing perhaps replace the Tenkoku prefab in your scene with a new one from the project, or try reinstalling Tenkoku from scratch, perhaps there was an install glitch.
     
  32. veddycent

    veddycent

    Joined:
    Jul 22, 2013
    Posts:
    109
    Quick question,

    Is Tenkoku HDR? I'm comparing it to the built in skybox material and the sky colours vary quite a lot.
    I know Tenkoku uses geo location which varies sky colours but it's a stark contrast.

    To test this I've setup the scene with Tenkoku and its default settings (i.e. Tenkoku lights and Tenkoku sky box material), it also uses the fog settings in the lighting tab (I know Tenkoku doesn't work with it), it also uses post colour grading in processing.

    I then replace the sky box material to the built in version all other settings are the same.

    First image is Tenkoku
    Second image is built-in skybox shader.
    Tenkoku vs Built-in Shader - Tenkoku.jpg Tenkoku vs Built-in Shader - Built-in.jpg

    I think the built-in skybox shader looks a lot better but I can't replicate it with Tenkoku.
    IMHO the horizon colour is far to blue with Tenkoku.

    I've tried changing the Tenkoku LUT texture during play mode but it doesn't seem to have any effect, is this correct?

    I'd appreciate your thoughts on this!
     
  33. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    @veddycent I think you may need to adjust the SkyAmount(day) setting (under Celestial Settings). The default is quite low, but particularly when using linear lighting and HDR this should be increased in order to get a more realistic brightness level from the sky.

    Defaults were set low in the past because most users were not informed about linear lighting, HDR, and Color Grading. This does seem to be different now, as Unity is shipping with better defaults itself. I might consider changing this for the future.

    As far as the comparison to the updated built-in, I do agree that the lower horizon atmosphere is less realistic. This is something I am adjusting in Tenkoku 2.0 which is still under development... hopefully there will be some news about this later this year (fingers crossed).
     
  34. veddycent

    veddycent

    Joined:
    Jul 22, 2013
    Posts:
    109
    cool, I'll have another play with the settings to try and match it.

    Thanks!
     
  35. PatataFrita

    PatataFrita

    Joined:
    Oct 17, 2014
    Posts:
    50
    Hello, Will Tenkoku 2.0 be compatible with HDRP or URP? And will it have volumetric clouds?
     
  36. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    There will not be URP or HDRP compatibility at the current time. These plans may be updated in the future. Volumetric clouds yes. Date and more info is still TBD.
     
    PatataFrita and julianr like this.
  37. Efril

    Efril

    Joined:
    Aug 31, 2013
    Posts:
    82
    Hello @chingwa . I'm trying to get Tenkoku Dynamic Sky with Ultimate Water System to work well together together and faced a night time rendering issue. When the deferred rendering mode of Ultimate Water System is used, the moon and stars are rendered across the entire celestial sphere, completely ignoring the ocean which should cut out the bottom hemisphere:
    TroubledWaters_UI_2021-05-08-00-57-21_1280x720.png

    I can probably fix this by adding an opaque ocean floor plane (currently my ocean is bottomless):
    TroubledWaters_UI_2021-05-08-00-57-28_1280x720.png
    But I'm wondering if there is a more straightforward way to make Tenkoku work with semi-transparent objects like this?
    Thanks in advance.
     
  38. Efril

    Efril

    Joined:
    Aug 31, 2013
    Posts:
    82
    Hello @chingwa . It seems that 'Sun Rendering' selector of 'Selectal Settings' section do nothing. I don't see any usage of corresponding TenkokuModule.sunTypeIndex except rendering its custom editor UI field.
     
  39. ChopaFr

    ChopaFr

    Joined:
    Aug 7, 2019
    Posts:
    2
    I dont get to make it work properly in my scene... As you can see, clouds are always being that dark even if I change the hour. The reddish color of the sky also stays even if its 12:00... I dont know what to do to fix that (its working fine in the demo scene but not in my scene). Please help... upload_2021-6-28_14-31-25.png
     
  40. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    Thanks, yes it looks like you're right. This setting was meant to allow a switch between realistic sun positioning (normal operation) and a simplified/consistent sun positioning. However it looks like the simplified settings do not get exposed when performing the "custom" switch. I'll take a look for the next update.

    First I would ask if you see any Tenkoku related error messages popping up in your console. If not it's possible the system is not finding the included light object, or it is somehow not available. I have seen, from time to time, the prefab lose references particularly when going from older Unity versions to newer versions.

    You can try opening up the demo scene, since it's working there, and dragging the Tenkoku Dynamic Sky object from the scene into the Tenkoku prefabs folder in order to create a new/updated prefab. Then using that new prefab in your custom scenes.

    If the above doesn't help then please let me know what version of Tenkoku you're using (it'll show you in the inspector header of the Tenkoku object) and also what version of Unity you're using and I'll try and recreate this problem on my end.
     
  41. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    @Efril Were you able to fix your problems using Tenkoku with Ultimate Water System? I am not familiar with the water asset unfortunately, but I assume it is injecting rendering into different aspects of the Deferred rendering system (Compute Buffers etc), which might conceivably throw the expected rendering order out of whack. In some assets the rendering buffers are exposed and selectable/changeable, but I don't know if this is the case with UWS? The current version of Tenkoku does not use rendering buffers, it simply relies on Unity to handle rendering separation similar to any other scene objects. Anyway, I'm just guessing here, sorry for the late reply. I think your idea of putting asolid object underneath the water would most likely solve the issue, if not fix it.
     
  42. ChopaFr

    ChopaFr

    Joined:
    Aug 7, 2019
    Posts:
    2
    Thanks a lot for your fast reply. I managed to make it work by moving the sphere away from the terrain. It's working out well now thank you ^^ Also, I have some problems with the rain effect. It partly collide with the ceiling... I mean, some drops still manage to go through colliders. If there is any way for me to fix that, I'd appreciate. ^^ Thank you !
     
  43. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    The rain blockage is handled through unity’s particle system colliders. If rain is coming through on some objects you may need to increase the y-height of the colliders, OR add extra thicker colliders perhaps if colliding objects are too skinny.
     
  44. Efril

    Efril

    Joined:
    Aug 31, 2013
    Posts:
    82
    I think yes. I added an opaque underwater object. I still have to fix the issue with celestal objects that should be partially visible, but I think it is easy to solve by calculating the right scale for the opaque object.
    TroubledWaters_UI_2021-06-28-20-09-09_800x600.png
     
  45. Efril

    Efril

    Joined:
    Aug 31, 2013
    Posts:
    82
    Hello @chingwa . I have a question about 'Use Temporal Aliasing' setting. It seems it is absolutely necessary to render clouds correctly, but it also makes the night sky really grainy.
    Look at the screenshots below:
    TroubledWaters_UI_2021-07-03-03-02-04_1024x576.png TroubledWaters_UI_2021-07-03-02-52-50_1024x576.png
    Is it possible to keep the night sky clear as in the first screenshot without disabling the 'Use Temporal Aliasing'?
    Thanks in advance.

    EDIT. More info about the problem and its solution.
    The issue occurs only for linear color space. Gamma works fine.
    It seems the easiest way to solve it is not to use temporal anti-aliasing of Tenkoku, but instead use temporal anti-aliasing effect of Unity Post Processing package.
     
    Last edited: Jul 3, 2021
    chingwa likes this.
  46. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    Yes I also see this on my end, though I have to admit that at least on my screen it is extremely subtle. As you mentioned, when used with other PostProcess effects it is an avoidable artifact.
     
  47. Efril

    Efril

    Joined:
    Aug 31, 2013
    Posts:
    82
    Hello again @chingwa . Sorry to bother you again, but I've entered the stage of work on my game that requires a lot of sky customization. It seems I found a bug with fog rendering. It is not rendered at night time at least near the horizon.
    I reproduced it with Tenkoku demo scene disabling the terrain and replacing it with a plane so that the horizon can be seen.
    TenkokuFogDay.png TenkokuFogNight.png
    Is it supposed to work this way? I have an endless ocean in my game and fog plays a big role in visibility system, so this will be a big problem.
     
  48. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    @Efril As long as the objects in the distance (terrain, ocean, or test plane) write to the camera depth buffer, then they should be getting fog information applied to them. What I suspect you're seeing in the night picture is not the fog ending, but the clouds not meeting the horizon (and then the stars/horizon showing underneath). Please try going to the Tenkoku-->SkySphere-->EFFECTS-->fxCloudSphere object in your scene and try lowering the Y-position a little (-5 works well in the demo scene). Then try your night scene again.

    I also would recommend you go to the Tenkoku Atmospherics tab, turn off Auto Adjust Fog, and set the fog parameters manually, likely with both obscurance and density set to 1, and then whatever start/distance is suitable for your project.
     
    Efril likes this.
  49. Efril

    Efril

    Joined:
    Aug 31, 2013
    Posts:
    82
    Thank you very much. Lowering fxCloudSphere did the job for me. Actually, in my case, it required some additional actions to solve the problem with the bottom of the celestal sphere, visible through the ocean plane, but it has nothing to do with Tenkoku.
     
    chingwa likes this.
  50. Desert-Tiger-Games

    Desert-Tiger-Games

    Joined:
    Sep 20, 2015
    Posts:
    26
    Last update is from 2 years ago and the last forum entry is from 1 year ago. So I am asking this to be sure, did you stop working on this asset?