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

TENKOKU - Dynamic Sky

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

  1. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,789
    @doodle911 What?! You stole my glory! :D Tenkoku isn't currently scheduled for any sales. It was submitted to the 24 hour sale list but I have not been notified of inclusion, so this could be selected next month, or next year, or never (It's completely up to Unity).

    @Trucker I have not done VR testing myself, though I do know that some other customers have used it in VR settings. The main issues seems to be camera tracking... Tenkoku needs to be able to track your camera in order to properly position clouds/weather/and celestial objects. If you put your camera/player at position 0,0,0 in your scene and play are you able to see clouds properly?
     
  2. CaptainMurphy

    CaptainMurphy

    Joined:
    Jul 15, 2014
    Posts:
    746
    Tenkoku works fine in VR. I have used it in 3 VR projects so far without any problems. I don't use any replacement cameras and simply use Unity built in VR handling.
     
    chingwa likes this.
  3. doodle911

    doodle911

    Joined:
    Aug 14, 2016
    Posts:
    62
    Ahahaha. ;)
    Will buy as soon as I have the money then! Thanks!
     
  4. Trucker

    Trucker

    Joined:
    Sep 21, 2015
    Posts:
    9
    @chingwa The OVRCameraRig is at 0,0,0 by default. I will probably just advance my game without Tenkoku for now and check back later if there is a fix to this. I think Tenkoku is a great addition to any game, and I'm confident I will be able to eventually use it in VR. For now, I can't make it to work, and will have to use a replacement normal skybox.

    @CaptainMurphy Thank you for your info. I might need the Oculus replacement camera rig for the Touch controller tracking that is also tied to it. Did you use tracked controllers in your Tenkoku VR projects?
     
  5. Todd-Wasson

    Todd-Wasson

    Joined:
    Aug 7, 2014
    Posts:
    1,079
    I just bought it and tried the demo scene. Stuck a parent object above the main camera but no, this isn't working correctly in VR for me. It looks like it's rendering the clouds multiple times (not sure how many). One set is correct, the others are moving with the head position and kind of blending into the "correct" clouds in a way. Like one pass is ok but the second pass is using the wrong camera.

    How did you make it work in your three VR projects? I'm running an Oculus here.
     
    Last edited: Jun 13, 2017
  6. theLittleSettler

    theLittleSettler

    Joined:
    Jul 14, 2012
    Posts:
    36
    yo

    So we updated to 1.1.5 in unity 5.6.1f1.

    Initial impressions...

    I like the new clouds, but we can't use them as the shape is a bit too unnatural. Also, some sort of builtin blur would probably be needed as we don't use much DOF. Legacy clouds are fine for us though.

    Sky looks allot better; more realistic and much better overall than the old model. However, again, it doesn't really suit our game as dawn/dusk oranges need to be exaggerated (we have a short day night cycle, and the game is stylised). To that end, I'm thinking of editing the Elik shaders, but I'm not familiar with the technique.

    Do you know whether or not it would be feasible to make that kind of stylistic change with the Elik model or is it too ingrained in the algorithm?

    Moving on...
    Encountered the lighting issue of things going too dark when sun and moon are down. Set the date as you'd mentioned to 12/3/2017 (I assume you meant d/m/y). Increased night ambient. Also had to increase day ambient so that it was never darker than night. As such, we'll have to adjust all gradients but it'd be nice to have a quick rundown on what each gradient is for before we dive into that.

    Also, the Ambient Daylight gradient was confusing...black is brighter than white at 7 am (roughly when its darkest). Is that a gradient for selecting whether day or night ambient is used or something?

    Also also, in both 5.4.4f1 (new project, no changes at all) and 5.6.1f1, I checked the demo scene. Its quite off, but looks identical in both versions. More specifically - the sun whites out most of the screen, extreme sun shaft and so on. If you let us know what defaults you'd have there for realistic rendering with elik, that'd also help us get started.

    Of course I'd be happy to share whatever I come up with if it works out.
     
    Dwight_Everhart likes this.
  7. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,789
    Hi @theLittleSettler Thanks for the detailed report! Hopefully I can address all your concerns below...

    It's highly recommended to use the included TemporalAliasing feature if you intend to use the newer non-legacy cloud rendering. This goes a long way in making the clouds less noisy, and more, well, cloud-like. Unfortunately this option is currently only available for PC, mac users will need to use their own blurring techniques until the TAA issues with Mac can be worked out. Also the shape of the cumulus clouds can be edited somewhat by changing the 'cloud frequency' and 'cloud detail' settings in the configuration tab. a bit of messing around here might give you results that are better suited to your project.

    The Elek shader is a bit esoteric, but there is nothing preventing you from digging into it. To exaggerate the dusk reds and oranges I recommend finding the following line (near the top of the Frag section) in the Tenkoku_sky_elek.shader file...
    The .x value can be thought of as the height of the atmosphere, and the .y as the vertical density of atmosphere particles. Increasing the x will give the horizon more viewable space and decreasing the y will compress the atmosphere particles, so the following should give better results for you:
    I also recommend enhancing the red manually at the bottom of the Frag section, right before the return by adding something like the following:
    These edits should get you started, but feel free to adjust the shader as it suits your project.

    I admit the color gradients can be a little confusing, especially the ambient gradients, as they all interact with each other somewhat. I'll post a description of what each of these gradients do below this reply.

    As for the brightness of the sun, light shafts etc... the default settings are set this way on the assumption that people would be using Linear Rendering/ HDR camera / and specifically Tonemapping in their scenes. This setup is highly recommended, simply because it offers better color fidelity and sky rendering.

    If you are not using Tonemapping then I recommend to reduce the 'Sky Amount (Day)' setting in the Celestial Settings tab from the default 1.0 to, say 0.6 instead. You might also want to decrease the 'Sun Ray Intensity' under Atmospherics, from the default 0.2, down to 0.06. This should give you much more pleasant sky rendering when not using Tonemapping.

    You are not the first to bring up the default brightness issues... I may consider lowering the defaults with the next update.
     
  8. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,789
    COLOR GRADIENTS:
    First of all, just so it's clear, the gradients are sampled based on the height of the sun object, and in general this is analagous to the time of day. The gradient starts at midnight (on the left side) which is the lowest point of the sun and ends at noon (on the right side), which is the highest point of the sun. Once it hits noon it travels back down the gradient until it hits midnight again, so there is no difference between dusk and dawn colors... it just depends on the sun height.

    Here's a description of the gradient settings, how they interact, and what they are intended for:

    1) Cloud Color - affects color tinting of Altostratus and cirrus clouds, as well as directional lighting of cumulus clouds.
    2) Cloud Ambient - affects main color tinting of cumulus clouds.
    3) Sun Color - affects the Tint color of sun lighting.
    4) Horizon Color - In Elek this is ignored. In the legacy Tenkoku atmospheric model this adds an additional tint on the lower atmosphere/horizon area.
    5) Sky Color - In Elek this is ignored. In the legacy Tenkoku atmospheric model this adds an additional sky tint on top of the underlying atmospheric model.
    6) Ambient Color - When 'Ambient Source' is set to Skybox this is ignored. When 'Ambient Source' is set to gradient, or color the scene ambient tint is sourced directly from this gradient.
    7) Moon Color - This is currently ignored (it is a holdover from implementation in previous versions). I am considering reimplementing it as a direct moon tint, either to the moon object, or the night lighting, or both.
    8) Ambient Daylight - This affects various settings in subtle ways but the main function can be thought of as the Sun vs Moon lighting switch. This affects sun light intensity and moon light intensity, but also has an affect on cloud light intensity and overall scene ambient intensity.
    9) Ambient Lighting - This mainly effects the intensity / brightness of the skybox, between day and night. It also has some affect on cumulus cloud lighting. This was made separate from the above ambient setting in order to better control how the sky itself responded to incoming and outgoing daylight scattering... which needed different timing compared to normal direct light ambient settings.
     
  9. Dwight_Everhart

    Dwight_Everhart

    Joined:
    May 11, 2014
    Posts:
    123
    Is the Mac TAA issue a Unity bug, or is it something that needs to be fixed in Tenkoku? It's the only issue with Tenkoku that would prevent me from releasing my game for macOS. I'm nowhere near releasing, so there's no time pressure. I'm just wondering if I'll need to upgrade Unity to fix the problem.
     
  10. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,789
    @Dwight_Everhard The truth is, I'm not sure. The TAA method used in tenkoku was adapted from elsewhere, and I am not 100% versed in the complications on Mac. There aren't any errors that show up that would help track down the issue, the effect simply fails and blanks out the screen. I was waiting to possibly adapt a different TAA solution, such as the one included with the Combined effects stack from Unity... though it does not look as good unfortunately, and I'm not sure if that one even works on Mac either?

    New version of Tenkoku will be ready soon, but it will not have any TAA fixes included. Perhaps I can track this down and get a new working Mac-friendly TAA (or a different solution) for the next next update.
     
    ScruffyNinja and Dwight_Everhart like this.
  11. Dwight_Everhart

    Dwight_Everhart

    Joined:
    May 11, 2014
    Posts:
    123
    Interesting. Good luck. I wish I could help. I'm a programmer, but shaders are a black art to me.
     
  12. Black-Spirit

    Black-Spirit

    Joined:
    Sep 14, 2013
    Posts:
    67
    So where are we at with having a bit more control of the random weather? It seems the feature has been forgotten?

    While I do use random weather in my project, surely I can make it rain when the player triggers something right?

    ETA, using unity 5.5. When the rain amount is set high, rather then being volume fog, the fog appears as several transparent spheres.

    Cheers for any help.
     
    Last edited: Jun 25, 2017
  13. theLittleSettler

    theLittleSettler

    Joined:
    Jul 14, 2012
    Posts:
    36
    Thanks for the quick response and detailed rundown. Its looking promising so far...I'll let you know in a day or two how things've gone. Having a bit of fun messing with it, but I'll see how it all goes.

    Oh, and I fiddled with the new clouds - happy with the shape. Very slight dof made them smooth enough...I guess we could probably use layer-specific dof. Though, I noticed the clouds move (even at speed 0) and its that motion which makes the edge dithering/noise more noticable.

    I did tweak temporal reprojection, but it didn't smooth it enough.
     
    Last edited: Jun 26, 2017
    Dwight_Everhart and chingwa like this.
  14. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,789
    @Black-Spirit the more advanced weather gen has not been forgotten, but it's certainly been lower on the priority list as of late... dealing with the new cloud and sky rendering tech took me on quite a detour. I have started and restarted this feature a few times now, not being completely sure how I want it to work. I apologize for the delay. There will be a Tenkoku update soon that addresses a number of issues in the current version, and afterwards I may be able to put more focus into advanced weather gen.

    Tenkoku does not currently include trigger volumes (something else on my to-do list!), but editing the weather through code is very easy. To get started you can take a look at page 8 of the documentation which goes over basic code access: http://www.tanukidigital.com/tenkoku/documentation

    In the current version Tenkoku does not have automatic control over the distance fog settings... so in a more fog-filled scene it's also recommended to manually edit the fog settings under 'Atmospherics'. The next update does introduce a 'Humidity' variable which will automatically control distance fog by default through an 'enable auto fog' setting. This will likely be much easier for most people, and should make a much more atmospheric scene when it's raining or when you adjust the humidity level upward. The ground particle fog is it's own separate effect.
     
    Dwight_Everhart likes this.
  15. Black-Spirit

    Black-Spirit

    Joined:
    Sep 14, 2013
    Posts:
    67
    Cheers for the reply mate. Look forward to the next version.

    Regarding the ground fog when raining, this is what I mean. I have not noticed this on prior versions.



     
  16. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,789
    @Black-Spirit yeah, that screenshot looks about right. That's the particle based ground fog, which is meant to conform to ground surfaces near the camera. Pretty sure it's been in since the beginning :D I'm hoping to have the next update ready at some point this week, I think you'll like the improved auto fog/humidity controls.
     
  17. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    864
    Good to hear that a new version of Tenkoku may be out this week!
    Any spoilers about some new features in this version?
     
  18. theLittleSettler

    theLittleSettler

    Joined:
    Jul 14, 2012
    Posts:
    36
    Ok, here's what I came up with


    more screenshots here

    It can go allot more orange in a decently realistic way with the same basic code I wrote but we wanted to preserve the blue sky and not go too crazy with it.

    Basically I took what you wrote - but instead of shifting to red using the blue/green values, I shifted to orange using hue. Which meant multiplying some green, and then multiplying some blue to correct (avoid blue interfering with red/yellows; preserve blue above).

    Then I took the general concept of conservation of energy - made sure brightness before and after matched. Since there were issues with some colour channels getting clipped independently, I accounted for original sky saturation as well. So that kept it balanced.

    Then finally, adjusted for light direction, tweaked gradient shape...and there we are.

    Some of the more pink hues are quite interesting too actually, though I'm sure we'll be sticking to more orangey shades:



    Excited to see how it'll look when we get it tweaked, esp with tonemapping and cloud colour adjusted

    Will post shader code and settings when we're done fiddling around
     
    chingwa likes this.
  19. chiefarchon

    chiefarchon

    Joined:
    Jun 22, 2009
    Posts:
    80
    Hi there

    im trying to come to a decision about a weather system. I need to know the following:

    Can Tenkoku produce localised weather effects so that one region of a map has a different weather to another?

    Thanks in advance for any help you can give to me :)
     
  20. Black-Spirit

    Black-Spirit

    Joined:
    Sep 14, 2013
    Posts:
    67
    My god it's like I'm taking crazy pills, haha :p

    Joke aside, the screenshot just does not do its justice. I'm fully aware that the ground fog has been in all versions, however, it just seems to be completely off IMO. Something is not right.

    Unless my eyes are bad, the ground fog appear as random spheres, with evident banding (like grey rainbows :p). It does not look natural.

    Please see the linked video, it easier to see.



    Note, using Linear/Differed, and have disabled the post fx stack.

     
  21. chiefarchon

    chiefarchon

    Joined:
    Jun 22, 2009
    Posts:
    80
    Im looking into an environment packaga and would like to know, does Tenkoku support:

    • Multi-terrain
    • Infinite worlds
     
  22. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,789
    @chiefarchon Tenkoku supports multi-terrain / infinite worlds. It will follow automatically your scene camera projection wherever it goes. It will not do localised weather effects though... all clouds/weather are global. But with a little bit of coding you could access the weather variables and shift them manually as you move around different parts of your map.
     
  23. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,789
    @theLittleSettler That's looking great! I'm glad to hear editing the shader is working well for you :)
     
  24. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,789
    @Harekelas I consider this a bug-fix update more than a feature update, but there are a few new additions such as automatic fog option, Humity slider (affects fog), Color tinting based on temperature (by default overall tinting gets more orange when hot and more blue when cold). Then a bunch of bug fixes and small updates.
     
    Harekelas likes this.
  25. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,789
    @Black-Spirit after looking at the video I do see what you mean, there's definite banding in the fog particles. Are you using any other camera effects on your camera? Tonemapping? If so, does disabling the other camera effects make any difference? If you disable the Tenkoku Light Rays (under Atmospherics) does that make any difference to the banding? If you disable Temporal Aliasing (under Configuration) does that make any difference?
     
  26. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    864
    That sounds great, I can really use these new stuff for atmosphere rendering ;)
    Might I ask when will the advanced weather system come online?
    I designed my own weather system to somewhat simulate the nature, but I think you can create some more realistic and science-based algorithms. Will be super excited to see what will you do it, or maybe you can share some thoughts about it if it will not come in a short time?
     
  27. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,789
    @Harekelas I don't yet have a time estimate for the advanced weather. I talked about this a little further up this thread, it's been delayed a little as I was working on other Tenkoku aspects and I'm still trying to decide exactly the type of functionality I want.

    Ultimately I want to give much more control over weather on a seasonal/cyclical basis, where all the attributes feed into one another. The more I've thought about this the more I've been thinking of modelling a sort of underlying cold/warm front system... this could then control daily and seasonal fluctuations in temperature and humidity, cloud systems, precipitation, fog etc. It doesn't have to be strictly science based, it just had to have a plausibility to it. It can even interact with scene terrain, where mountains can create up-drafts, local weather effects etc. But then it get's to the question of how you could control and customize such a system for a variety of different projects. It isn't something to be taken lightly which is why I've started and stopped this process a few times now.
     
    Dwight_Everhart likes this.
  28. CaptainMurphy

    CaptainMurphy

    Joined:
    Jul 15, 2014
    Posts:
    746
    If you are going to do the fronts system then we need to be able to bring in a cloud blanket from a direction so we can have blue skies on one side and a cloud system on the other. Then we can really start making some good looking weather with localized fog to simulate rain particles and reduced visibility.
     
  29. Dwight_Everhart

    Dwight_Everhart

    Joined:
    May 11, 2014
    Posts:
    123
    I second the Captain's motion. Seeing clouds come in from one direction would add a lot of realism. Also, if the clouds are moving slowly, I'd like the player to be able to walk from a sunny area towards the clouds and go under them, until the whole sky is overcast. That would be very cool.

    @chingwa Your advanced weather plans are quite ambitious! My needs are much simpler. I just need to define a number of weather conditions and the probabilities of each condition occurring and, optionally, which conditions can transition into other conditions, so the weather doesn't suddenly change from sunny to thunderstorm. I can write this on my own.

    But, if you go ahead with your macro weather modeling, I hope it'll be able to model the weather beyond what is loaded in the scene. My game is procedurally generated but finite. Only a portion of the game's area is loaded at a time. As the player moves around, other areas are loaded in the background. So I would ideally like the weather to be modeled across the entire area of my game, so that it remains consistent as the player moves around. The entire game's weather shouldn't be rendered; only the area around the player would be, but what is rendered should fit into the whole system that is modeled behind the scenes.
     
  30. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    864
    @chingwa
    Maybe you can just let the users to adjust the detailed values of the weather, weather changing chances, relations between weather and temperature, wind and moisture like what unistorm is doing.
    Also you can make a expandable cloud-weight groups to let up add our own weather types by setting different clouds on the sky.
    Even can let us use our own textures to add more upper cloud types and manipulate some of the volume clouds' values to create our own volumetric cloud types as what Fog Volume is capable of. Then we can combine these cloud types into different weather types then set our own weather changing rules. Don't know if this is a huge work to accomplish, but really love to see that comes to Tenkoku!
     
    chingwa and Dwight_Everhart like this.
  31. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,789
    Hello All,

    I'm happy to announce that Tenkoku version 1.1.6 is now ready for download...

    Download Here: http://www.tanukidigital.com/download

    This update includes improvements to fogging and lighting through the introduction of a few new settings. The new 'Humidity' weather setting works in conjunction with the new 'Auto Adjust Fog' setting and will automatically analyze and adjust fog distance values for a more believable and easier to control fog setup. Note that you may need to adjust humidity value in your scenes to get the fogging that you expect, or if you'd rather stick to your current fog setup simply disable the Auto Adjust Fog setting under the Atmospherics tab.

    There is also a new feature called 'Temperature Tint' which will adjust scene lighting colors based on the current temperature. By default it adjusts to a more orange color during high temperatures and adjusts to a more blue color during low temperatures.

    There have also been some adjustments made to lighting. There is a new fill light object which adjusts via the Sky Amount (Night) setting, and will give better scene night visibility, so scenes should no longer go completely to black in between sun and moon lighting situations (however, if you want it to go to black simply set the Sky Amount (night) setting to 0). Tenkoku will now adjust the overall ambient brightness and the darkness of shadow areas to simulate the more diffuse lighting caused by lack of direct sunlight during overcast weather.

    Finally, this update includes an integration component with CTS - Complete Terrain Shader. CTS is an advanced terrain shader for Unity with built-in settings to control wetness, rain, snow, and seasonal tinting directly on the terrain itself. This integration script which will automatically drive the effects in CTS according to the weather settings you use in Tenkoku. To enable this integration, install CTS and Tenkoku in your project, add the CTS weather Manager, then finally drag the /SCRIPTS/Tenkoku_CTS_Weather component onto the 'CTS Weather Manager' object in your scene. Learn more about CTS here: https://www.assetstore.unity3d.com/en/#!/content/91938

    In addition to the above, a whole bunch of bugs and other issues have been addressed. Please take a look at the version notes below. Because of some of the new additions in this version it's important to remove your current Tenkoku scene object and add a new one from the prefabs folder after installing, and in general I recommend doing a complete uninstall of old versions first before installing this new update.

    As always, let me know if you have problems/questions/feedback etc, either by email or on the forums!

    All the best,
    Justin Kellis
    Tanuki Digital



    -------------------------------
    RELEASE NOTES - Version 1.1.6
    -------------------------------

    WHAT'S NEW
    - Added Integration component with CTS - Complete Terrain Shader.
    - Added night light Fill for better night visibility. Control with Sky Amount (Night) setting.
    - Added 'Temperature Tint' gradient that tints scene colors based on weather temperature setting.
    - Added public boolean flag variable (isDoingTransition) to test for transitions from code.
    - Added Wind Speed slider to Random Weather Generator tab.
    - Added 'Fog Obscurance' property under Atmospherics to handle sky/fog distance blending.
    - Added 'Auto Adjust Fog' setting under Atmospherics. Enabled by default.
    - Added Weather Humidity setting. Automatically adjusts fog distance and rendering when enabled.
    - Added subtle moon lighting to overcast clouds at night.
    - Added Sun Flare setting under 'Atmospherics' section.
    - Added Moon Horizon Tint option, to manually control low-horizon moon color.
    - Added 'Use Full Screen Aliasing' option. Off by default. Useful when showing reflections of clouds in your scene.
    - Added 'Adjust Overcast Ambient' setting to lighten ambient shadows during overcast weather.

    CHANGES
    - Adjusted default sky lighting to be darker (previous settings were confusing to those not using Tonemapping.)
    - Adjusted Dusk/Dawn lighting to be less red.
    - Changed rain/snow/fog particle collisions to 'default' Unity layer. Should help with default performance.
    - Random Weather generator no longer overrides wind speed.
    - Removed forced moon shadows. Set to soft shadows by default, but LIGHT_NightSky object can now be edited.
    - Adjusted cloud transparency and lighting slightly.
    - Added additional tooltips.
    - Reflection probe intensity no longer forced to 1.0, but is set at 1.0 by default.
    - Removed Fog Dispersion setting. No longer applicable.

    BUG FIXES
    - Fixed sky calculation timing error when set to large time multipliers (3600+).
    - Fixed Scattering calculation shader which was preventing proper color rendering in DX9 and MacOSX.
    - Fixed sky shader errors when used in PS4 render target.
    - Fixed new sky atmosphere shader to work properly on MacOSX.
    - Fixed fog/sky tracking error while switching scene cameras.
    - Fixed overdarkening of Stratus and Cirrus clouds.
    - Fixed bug showing incongruous horizon line when during overcast weather.
    - Fixed issue with y-reversal in fog buffer when using Forward and MSAA.
    - Fixed intermittent issue with Aurora render clipping.
    - Fixed distant dark horizon line and lower atmosphere rendering fill.
    - Fixed 'Fade Distance' setting, now blends out distant fog properly again.
    - Fixed camera .hdr switch error in Unity 5.6+
    - Fixed error with Scene Light Layer list population while playing scene.
    - Fixed outline rendering issues in cumulus and stratus clouds.
    - Fixed auroa compositing with Legacy Clouds.
    - Fixed blank screen error when Light rays are enabled and temporal aliasing is disabled.
    - Fixed prolonged delay with initial reflection probe and ambient update.
     
  32. XOA_Productions

    XOA_Productions

    Joined:
    Nov 27, 2016
    Posts:
    24
    Hi @chingwa ,

    firstly, I absolutely love Tenkoku, it looks so beautiful and really adds something special to my scenes.

    I've got one issue though and I am not really sure in whose thread this one belongs, but I'm just gonna ask it here:
    I've purcased particle packs from PopcornFX, they don't use the shuriken system but something they made themselfs. It seems like there are sorting issues with their system, when It should be rendering infront of Tenkoku (for example an explosion not being drawn infront of Tenkoku). Do you have an idea if I can fix this with settings for Tenkoku or wether I should go and ask the PopcornFX guys?

    Regards,
    Benedikt Künzel

    Also I got a question on bugfixes, with the previous version of Tenkoku I noticed that high rain amounts were really dropping the fps. I fixed that with some settings to the rain-particles. It seems like these issues are solved with the new version. However high fog amounts are still dropping the fps quite badly, maybe you could look into that for future updates
     
  33. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,789
    @XOA_Productions I'm glad to hear you're enjoying Tenkoku :)

    For the Popcorn FX issue I've had similar reports over on my forums... the solution seems to be changing some settings on the Popcorn FX side. I'm not directly familiar with popcorn fx, but the following post might help you: http://tanukidigital.com/forum/index.php?topic=851.msg3905#msg3905

    As for the fog, it may be slowing down more due to a fill-rate/overdraw issue, but I'll take a look and see if performance can be improved in the next update.
     
  34. mwituni

    mwituni

    Joined:
    Jan 15, 2015
    Posts:
    345
    chingwa likes this.
  35. theLittleSettler

    theLittleSettler

    Joined:
    Jul 14, 2012
    Posts:
    36
    About that. Its been a relatively minor thing in our project (namely, because of bigger performance problems) but ideally I'd want that kind of fog to be integrated into your fog image effect (perhaps optional). This would allow for a much nicer looking effect, and it would be much cheaper *. I understand it wouldn't be high on your priorities though.

    *Well, or so I believe - it would depend on sample count, but you wouldn't necessarily a high number of samples shooting through full fog-shape volumes. I'm thinking a dozen or so parallax layers. So, I'd use a fog shape textures as well as layers to create the effect without having to sample excessively.

    About this, and control generally. You can always have redundant control - as long as the editor is kept clean looking, it doesn't hurt to have both scientific-style control and stylistic controls. An example would be fog, with the recent humidity changes - it can be altered with those values and also multiplied by an overall tint.

    In general, I'd like to see more redundancy in that way. For instance, it would have been easier to sort out ambients if we had an intensity curve with the skybox ambient mode (as odd as that sounds). An overall sun colour tint (multiplied by its gradient) would also have been a significant help.

    This could get messy, but you can simply only show relevent gradients according to what other settings are set, which would help with general confusion over what does what.

    tbh, the idea sounds kind of insane in all of its potential implications, but even if it was just clouds/sky building up from a direction that would add allot to the the feeling of a storm rolling in. Maybe if you share your notes on the conceptual design of it?

    Also, my 2 cents - I'd rather see better quality rain/fog particles. I think that visually they're the weakest part of tenkoku currently. That said, I'm happy to chime in on whatever improvements/changes you mean to make if it'd help.

    Oh, will post the stylised elek notes / settings soon, too, just cleaning up a few things in our project.
     
  36. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,789
    It could possibly cheaper, especially if done using a sort of off-screen particle method. The resolution for this effect could thus be lowered which could achieve the same number of particles for less performance cost, or even give room for increased particles.

    I have thought about removing gradients when they aren't relevant. I'll add this to the list for the next update, it shouldn't take too much effort :D

    I've also been wanting to do an improved rain shader for, oh, about 2 years now. I'd like to use a subtle refraction effect in the rain particle itself, and perhaps use the above-mentioned off-screen particles or some other effect to generate more particles more efficiently.
     
    Dwight_Everhart likes this.
  37. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,789
    Dwight_Everhart likes this.
  38. kulesz

    kulesz

    Joined:
    Jul 1, 2012
    Posts:
    138
    It still has some problems with Unity Postprocessing stack (or the other way around).
    You can see in the screenshots - colours are "overburnt", just like some posterize effect. It's most visible during night scenes - on entire terrain, galaxy and all other scene objects.
    It happens on pure demo scene from freshly installed Tenkoku, without any custom changes (just postprocessing stack added to camera).

    This is the vesion without postprocessing (good):


    And this is the version with the postprocessing (bad) - notice terrain and milkyway:


    Turning ALL features on the stack seems to help a bit, but it is not the right solution :)
    Great asset BTW, keep it up :)
     
  39. kulesz

    kulesz

    Joined:
    Jul 1, 2012
    Posts:
    138
    OK - got it. It's the Temporal Aliasing setting. Turning it off removes all image errors, but the clouds look much worse.
    Any possible fix por this?
     
  40. Gunsrequiem

    Gunsrequiem

    Joined:
    May 17, 2017
    Posts:
    71
    Anyone else get some weird artifacts on the edges of their cumulus clouds?
     
  41. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,789
    @kulesz Hmmm... I'll take a look at the stack later today and see if I can figure out whats going on.

    @Gunsrequiem Are you using the Temporal Aliasing option under configuration? This will go a long way to reduce cumulus cloud noise artifacts, or perhaps you can post a screenshot of what you see on your end?
     
    Gunsrequiem likes this.
  42. Gunsrequiem

    Gunsrequiem

    Joined:
    May 17, 2017
    Posts:
    71
    Thanks for the reply! I managed to get them looking gorgeous by adding some post processing effects.
     
    chingwa and Dwight_Everhart like this.
  43. Gunsrequiem

    Gunsrequiem

    Joined:
    May 17, 2017
    Posts:
    71
    Alright, so I fixed the cloud issue, but now it seems like Tenkoku is overriding my CTS "Advanced" shader settings. When I run the scene without the Tenkoku weather manager component, the advanced shaders (including the smoothness values) show up. However, when I apply the component, they revert back to basic. If I manually set them to advanced again, a second or so later they revert again. In regards to the weather manager itself, snow is working beautifully, but now the rain is not applying smoothness to the terrain any longer. My settings are exactly the same as they were before when everything worked together in unison. Any thoughts?

    EDIT: Okay, so for anyone that seems to run into this issue too, I figured out it was because the CTS weather manager had the max smoothness setting to 15, so the smoothness was up so high that it appeared to not exist at all. Therefore, if you're using CTS with Tenkoku, I highly suggest turning it down on the "CTS Weather Manager" game object to around 2 or 3. This will give you a nice wet sheen (even with the rain maxed out in Tenkoku) without oversaturating the shader! :D
     
    Last edited: Jul 9, 2017
    chingwa likes this.
  44. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,789
    @Gunsrequiem glad to hear you figured it out! I'm not sure why the CTS default is so high, or why smoothness would even be allowed to go that high at all.
     
  45. Gunsrequiem

    Gunsrequiem

    Joined:
    May 17, 2017
    Posts:
    71
    Yeah, it basically produces a very dark blue film that doesn't look like wetness at all, but I suppose it could work for some things. I believe it also depends on what you set your default smoothness to in the terrain editor as well.
     
    Last edited: Jul 9, 2017
  46. Gunsrequiem

    Gunsrequiem

    Joined:
    May 17, 2017
    Posts:
    71
    @chingwa

    Just out of curiosity, does the temperature also vary based on the "Random" setting? I ask because I am utilizing CTS with the scripting you provided with the recent update to Tenkoku, and I would like to be able to have the snow stick/melt based on the temperature in a random way.

    Also, do you have any suggestions for adjusting Tenkoku based on certain parameters without having to instantiate a new Tenkoku prefab? In other words, if I want one area to always be snowy (high-altitude mountains), one to be rainy (jungle) and the rest of the world to be random, is it possible to easily create a trigger that adjusts those values in the same Tenkoku game object?

    For instance, I'm currently utilizing Map Magic which uses tiling--if I want to hide something (like trees) until that tile is loaded into the game world, I simply attach it to the appropriate tile. With that in mind, I'm thinking it might be possible to create a script that adjusts the Tenkoku settings based on whether or not that tile is active. So, if I want one area to be snowy, I attach that script to the world tiles that are snowy environments. Then, when the player gets close to the tiles (and they get loaded), the script also gets loaded, which therefore adjusts and sets the Tenkoku parameters. When the player then leaves those tiles, the script gets despawned and Tenkoku goes back to its pre-set parameters ("Random").

    I'm curious as to whether you think this is the simplest way to do this, or if there might be a simpler option already embedded within Tenkoku. Any thoughts you might have would be greatly appreciated! :)
     
    chingwa likes this.
  47. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,789
    @Gunsrequiem Actually no, the temperature setting is not affected by the random weather setting. I'll add this in to the next update. As for adjusting parameters, this is best done by acessing the TenkokuModule object in code, and then setting the appropriate weather settings as necessary (I strongly discourage having multiple Tenkoku objects in your scene).

    For example, you can setup a trigger object in your scene that surrounds a certain area (mountains for example) and then write some code to transition the settings once your player enters the trigger area. I'm attaching an example of this below.

    First setup a trigger object (sphere? box?) in your scene and make sure it has a collider and rigidbody (set kinematic to false, trigger to true). Then save the below script to your project and add it to the trigger object. Also make sure that it's set to track an object that also has a collider and rigidbody. It should serve as a decent example of how you can use triggers to adjust Tenkoku in your scene.

    There is a list of common accessible Tenkoku variables on page 9 of the documentation pdf here: http://www.tanukidigital.com/tenkoku/documentation But if you need something that you don't see in this list then let me know!

    Example Trigger Transition Code:
    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4. public class TenkokuTrigger : MonoBehaviour {
    5.  
    6.     //Public Variables
    7.     public Collider trackObject;
    8.     public float blendTime = 5f;
    9.     public bool resetWhenExiting = true;
    10.     [Space(10)]
    11.     [Range(0f,1f)] public float amountCirrus;
    12.     [Range(0f,1f)] public float amountCumulus;
    13.     [Range(0f,1f)] public float amountRain;
    14.  
    15.     //Private Variables
    16.     private Tenkoku.Core.TenkokuModule moduleObject;
    17.     private bool hasExited = false;
    18.     private bool hasEntered = false;
    19.     private float blendVal = 0f;
    20.     private float startValCirrus = 0f;
    21.     private float startValCumulus = 0f;
    22.     private float startValRain = 0f;
    23.  
    24.  
    25.     void Awake () {
    26.         //Reference Tenkoku Object
    27.         moduleObject = (Tenkoku.Core.TenkokuModule) FindObjectOfType(typeof(Tenkoku.Core.TenkokuModule));
    28.     }
    29.  
    30.  
    31.     void SaveSettings(){
    32.         startValCirrus = moduleObject.weather_cloudCirrusAmt;
    33.         startValCumulus = moduleObject.weather_cloudCumulusAmt;
    34.         startValRain = moduleObject.weather_RainAmt;
    35.     }
    36.  
    37.  
    38.     void BlendSettings(){
    39.         moduleObject.weather_cloudCirrusAmt = Mathf.SmoothStep(startValCirrus, amountCirrus, blendVal);
    40.         moduleObject.weather_cloudCumulusAmt = Mathf.SmoothStep(startValCumulus, amountCumulus, blendVal);
    41.         moduleObject.weather_RainAmt = Mathf.SmoothStep(startValRain, amountRain, blendVal);
    42.     }
    43.  
    44.  
    45.     void LateUpdate(){
    46.  
    47.         //Blend Values in
    48.         if (hasEntered){
    49.             if (blendVal < 1f){
    50.                 blendVal += (Time.deltaTime / blendTime);
    51.                 BlendSettings();
    52.             } else {
    53.                 hasEntered = false;
    54.             }
    55.         }
    56.  
    57.         //Blend Values out
    58.         if (hasExited && resetWhenExiting){
    59.             if (blendVal > 0f){
    60.                 blendVal -= (Time.deltaTime / blendTime);
    61.                 BlendSettings();
    62.             } else {
    63.                 hasExited = false;
    64.             }
    65.         }
    66.     }
    67.  
    68.  
    69.     void OnTriggerEnter(Collider collideObject){
    70.  
    71.         //Init Value
    72.         if (collideObject == trackObject){
    73.             if (blendVal == 0f){
    74.                 SaveSettings();
    75.             }
    76.         }
    77.     }
    78.  
    79.     void OnTriggerStay(Collider collideObject){
    80.  
    81.         //Set Blend Values Flag
    82.         if (collideObject == trackObject){
    83.             hasEntered = true;
    84.             hasExited = false;
    85.         }
    86.     }
    87.  
    88.     void OnTriggerExit(Collider collideObject){
    89.         //Reset
    90.         if (collideObject == trackObject){
    91.             hasEntered = false;
    92.             hasExited = true;
    93.         }
    94.     }
    95.  
    96. }
     
    Last edited: Jul 18, 2017
    mwituni and Dwight_Everhart like this.
  48. Rastapastor

    Rastapastor

    Joined:
    Jan 12, 2013
    Posts:
    589
    I have an issue with the shadow of the mountain i am guessing, it doesnt look normal imo. Is there any way to fix it ?
     

    Attached Files:

  49. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,789
    @Rastapastor Unity shadows only render a set length into the distance. You can increase the shadow distance in your Unity settings. Go to Edit-->ProjectSettings-->Quality
     
    Dwight_Everhart likes this.
  50. Rastapastor

    Rastapastor

    Joined:
    Jan 12, 2013
    Posts:
    589
    Ehhh...those noob question. It ofc worked, thank You.
     
    chingwa likes this.