Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

uSkyPro – Precomputed Atmospheric Scattering [2.0 Beta]

Discussion in 'Works In Progress' started by Luckymouse, Sep 14, 2014.

  1. Luckymouse

    Luckymouse

    Joined:
    Jan 31, 2010
    Posts:
    481
    I'm not planning to go any weather system yet. Right now I want uSky to be light weight and simple. Extra fancy addon feature I may implement it later that depends on how user like this asset.

    In the beginning, I didn't plan to add cloud in uSky. User can make their own solution, and many other cloud package assets are available too. The easiest way is that user can always place a simple hemisphere dome or couple planes on the sky for cloud texture map. In this case user need manually to apply the cloud color for different time of day .
    Some 3D cloud asset out there render very nice effects already, but it has to run on high-end platform. So right now I may just add also a simple solution that use static cloud texture for another layer in the skybox and change color automatically according to the light direction. I'm glad to hear any other suggestion or ideas as well.
     
    Baldinoboy likes this.
  2. MikeTon

    MikeTon

    Joined:
    Jan 10, 2013
    Posts:
    57
    Amazing work. I'm looking forward to uSky's availability!


    (Spell check changed amazing => Amazon...fixed lol)
     
    Last edited: Oct 26, 2014
    Luckymouse likes this.
  3. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,239
    Sounds good to me. I asked about your clouds because you were saying who/what influenced your sky tools, so I was curious which direction you might go. Flexible sounds best. Weather doesn't interest me that much and there are already several "all-in-one" solutions which I have avoided for that reason. I'm an artist not a meteorologist, LOL. I'd rather have better color controls than a 1-button scientific simulator....

    If you do add a "skybox" layer to uSky, would you consider making it capable of a skybox behind the atmosphere as well as in front? It would maybe be helpful to add moons and planets, as well as clouds... Thanks for considering!
     
  4. Luckymouse

    Luckymouse

    Joined:
    Jan 31, 2010
    Posts:
    481
    I totally agree with you, I think many other sky systems seem to make it for meteorological game. You will find all the calculation in their scripts for 'hour, month, year, julian date, meridian, ephemeris..etc". uSky didn't need them.

    In the beginning, uSky had a Time of Day Slider to control the sun rise and sun fall. Right now I adopted how that works with Unity 5 sky procedural, so slider removed, lets user can freely rotate any directional of the light. I think it gives better freedom to control the sun light. So you will never need to think "Which Date , Month and Year should I use to get the light direction I want?".

    Thanks for suggestion. However, I think you missed the tryout beta project earlier in this threads, it has been removed. So you may not sure how uSky works. Lets me clear it again here that uSky it-self is a skybox material (Not a Skydome). So everything will be render in front of it. The cloud layer that I mean earlier that it will be other render pass inside the skybox it-self. uSky works just exactly like the original unity skybox material. it will apply the uSky material to RenderingSettings > Skybox and you will get the sky color and cloud inside the skybox. User can add any extra "moons and planets" in the scene which they will always render in front of skybox. :)

    [update info]
    Also lets me clear again why uSky is skybox that it works flawlessly with Unity 5 RenderSettings build-in skybox-based ambient lighting and skybox generated specular reflection cubemap (global reflection probe). Ambient colour and reflection probe will completely and automatically generated with in Unity 5 Editor. So the color of the Scene contents (included both Dynamic and Static game objects) will automatically change according to the color of uSky.
    Right now uSky works also currently for any third party image based lighting system in Unity 4. You just need to manually create the convolve cubemaps and set it up.
     
    Last edited: Oct 27, 2014
    wetcircuit likes this.
  5. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,239
    I didn't play with the beta but I love the look of the webdemo...

    I'm pretty new to Unity (maybe there is already a way to do this...?), I'll need this kind of effect where you can see a planet "behind" the sky. I can probably figure out an alpha-channel method to do it with your cloud layer in uSky, but was hoping it could be easier.... Or would you have a suggestion how to do it?



    I use Skyshop shaders now (with my own 3D sky renders).... But after seeing the potential of uSky, I suddenly don't want to render hundreds of static backgrounds just to get different lighting moods, LOL... I realize it wouldn't be "moving planets" and it's still not dynamic (sun position, etc).... I just figured if you are adding a cloud layer in front, it maybe would not be difficult to also add a "moon layer" behind - especially if that preserves the air density and light scattering effect of uSky. Or maybe the cloud layer will have some depth/blending options?...sorry if this is off topic.

    Thank you for considering. I'm sure you know what you are doing better than I do. Haha.
     
  6. Groen

    Groen

    Joined:
    Oct 23, 2014
    Posts:
    2
    Where can I find this package to test it out?

    A search on the asset store gave me 0 results
     
  7. Luckymouse

    Luckymouse

    Joined:
    Jan 31, 2010
    Posts:
    481
    Blending between Sky and your Planet image that i think it does not matter which in front of which. I think what is your consider about is that you want the Planet behind the cloud layer, make it looks it is from the space.
    I'm thinking to release two different version that I mention on earlier post. The uSky Pro will have a layer for Moon, it is behind the cloud layer. It just uses a Moon texture and you can replace it with your own planet texture. Moon position will be control by a game object.

    By the way, If everyone are interested only the full feature of uSky Pro with Day/ Night and Cloud, i will get rid of the basic version then ( it is what you see in Webplayer now). Well, in this case you guys just need to wait for longer time for me to finish it. :)

    You are in "Works In Progress" section of the forum, uSky is still in development stage, not yet release in Asset Store.
     
  8. Groen

    Groen

    Joined:
    Oct 23, 2014
    Posts:
    2
    True...but I see some posts of people testing uSky...so I was just wondering where they'd gotten it
     
  9. Luckymouse

    Luckymouse

    Joined:
    Jan 31, 2010
    Posts:
    481
    Sorry, we offer a tryout project of beta version before, not available now.
    Thanks for interested uSky. Are you looking for something specific?
     
    Last edited: Oct 27, 2014
  10. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,239
    Assuming you are still thinking something in line with these prices:
    "uSky ~ $15-$20"
    "uSkyPro ~ $50-$60"​
    I would buy the "lite" version (whatever it is called) today for use with Skyshop for IBL. I'm working with particle-based clouds and lightbaking anyway...

    I can't say yet if the "pro" version would add "must have" features for me. Your webdemo right now already looks better than other atmosphere systems I'm seeing in the asset store.... I was expecting to have to render in a separate app to get that kind of dramatic look.... Personally I am still shying away from a truly dynamic sky for the reasons above (and clouds are always weird).

    It makes sense to have two products, imo - one for just IBL and a "pro" version for the full sky, if that's what you were thinking.
     
    Luckymouse likes this.
  11. Luckymouse

    Luckymouse

    Joined:
    Jan 31, 2010
    Posts:
    481
    Thanks!, I'm waiting for someone to say so. You just helped me to answer someone ask me earlier here about: " I don't see a difference......".:)

    There are so many variety type of the cloud, and it is always hard to pleases for everyone. Especially the procedural cloud it doesn't look natural in general (mostly very CG looks). It might be ok for certain type of game style. Right now I think I may do the 2D cloud for uSky is something like UE4 BP_Sky_Sphere's cloud, which it is Not really that awesome. The best procedural cloud I have seen so far is the Lumion 3D. However there is place for me to do a lots of investigation. I don't know I want to dig in to that too much, at least not in this moment.

    I always think that it may not be fair for someone pay a full amount of price for a product and they may not need or use all the features. It would be nice to have a choice for user. Speaking of the IBL that i think the basic version of uSky serves the purpose by it-self already, and it is pretty much ready to submit to asset store now.

    [Other info]
    Here is a old version of webplayer with night sky, people who interested may check it out. The reason I replaced it with current webplayer that those sprites based stars i got some Z-depth issue with other transparency game object in the scene, and it may fall back to use legacy milky way cubemap instead. it may not be a bad way if someone want a like galaxy night sky. Welcome for any suggestion.
     
    Last edited: Oct 28, 2014
    wetcircuit likes this.
  12. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,239
    Interesting to see the evolution. I'm impressed by the range in the current player, there's a lot more "play zone" in the sunset... and there are color tones in there - it dials from Caribbean island to Bangkok smog... the "thin" blue you see in arctic photos, that seltzer bottle color from The Matrix, hahaha... And this is without being able to change the tints?

    For me it is "shut up and take my money" territory, but I am trying to be polite. o_O
     
  13. blackbird

    blackbird

    Joined:
    Aug 9, 2011
    Posts:
    528
    looks good .... any chance to make this work on mobile ?
     
  14. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,239
    Those Lumion clouds are cool. There are some DX11 skies for Unity in the asset store that have similar "rolling" clouds. I am on a Mac though....

    For your night sky layer... idk. I guess most people will expect to see some kind of stars when the sun goes down, but for me it is like the clouds - they are always "weird". So long as the layer can be swapped or turned off... Also I guess people will expect stars to be able to roll in sync (or nearly in sync) with the sun, otherwise it isn't a "real" sky. Maybe that is one of your "pro" features.
     
    Last edited: Oct 28, 2014
  15. Project-Mysh

    Project-Mysh

    Joined:
    Nov 3, 2013
    Posts:
    223
    Hi Luckymouse,

    There is any realese date for usky? Its only to stay tunned, im very interested in your plugin. The webdemo looks very interesting to me.
     
  16. Luckymouse

    Luckymouse

    Joined:
    Jan 31, 2010
    Posts:
    481
    Yes, It is working on Mobile. Listed in the feature in first post. Tested on iPhone 5 and Mini iPad at 60 fps.

    Well, Stars should show up when sun fall, i guess it need to increase the intensity of the stars. The night sky from old webplayer shouldn't have cloud, not sure why you see that. Basically I follow how the night sky is done in cryengine sandbox. If the stars able to roll that have to be in full sphere form, which need to double the Sprites (polygon faces). That is the reason it is a static stars, it just saved half of the Sprites. I think we need to pick the between "real sky" or performance friendly for game. Anyway that old webplayer mean really old and outdated, I need to rework on that, those stars will be replaced. Right now It is pretty much what you see what you get is the Webplayer in the first post. It is basic version of uSky, and it is what i'm focus on now.

    For the basic version of uSky (same as Webplayer in first post), will be submit to asset store on early next week.
     
    Last edited: Oct 28, 2014
    wetcircuit likes this.
  17. Project-Mysh

    Project-Mysh

    Joined:
    Nov 3, 2013
    Posts:
    223
    Thanks for your fast response. The basic version is what im looking for ( my clouds will be fully 3D ).
     
    Luckymouse likes this.
  18. Project-Mysh

    Project-Mysh

    Joined:
    Nov 3, 2013
    Posts:
    223
    Hi Luckymouse,

    There is one question that I forgot to mention: There is any system planed to synchronize sun position with the directional light? (In the basic version)
     
  19. Luckymouse

    Luckymouse

    Joined:
    Jan 31, 2010
    Posts:
    481
    When you rotate the directional light, the sun position in sky will automatically synchronise and line up. No need to plan any system for it, It is already done.;)
     
    Last edited: Oct 29, 2014
  20. Luckymouse

    Luckymouse

    Joined:
    Jan 31, 2010
    Posts:
    481
    Chairs_Timelapse.gif
    Unity 5 Editor with uSky Preview.
    Dynamic lighting of the scene with the Skybox based ambient color (directional light color is constant).
    Two reflective spheres are using the reflection probes.
     
    Last edited: Dec 1, 2014
    janpec likes this.
  21. Project-Mysh

    Project-Mysh

    Joined:
    Nov 3, 2013
    Posts:
    223
    Awsome!
    I expected the basic version to be released this week. The release date will be delayed?
     
  22. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,239
    Luckymouse said he would submit it to the asset store this week.... Then probably another week (or two?) for a first-time product to be approved(?)

    I am trying to avoid tapping on the store window. Is it up yet? Is it up yet? Is it up yet? ...How about now? :confused:

    Sorry for dumb question but the shadows in this GIF..., are they the regular shadows for Unity5? They don't look horrifically jaggy.... (maybe I should download the beta) o_O
     
  23. Project-Mysh

    Project-Mysh

    Joined:
    Nov 3, 2013
    Posts:
    223
    Now in unity 5 beta you can adjust the shadow cascades % as you wish, but the soft shadow metod is the same as unity4. If you want better softener, get Shadow softener or Sunshine from assest store.
     
    wetcircuit likes this.
  24. shkar-noori

    shkar-noori

    Joined:
    Jun 10, 2013
    Posts:
    833
    There is a PCF 5x5 option for shadows in Unity 5 beta 10+
     
    wetcircuit likes this.
  25. Luckymouse

    Luckymouse

    Joined:
    Jan 31, 2010
    Posts:
    481
    @ Project Mysh, wetcircuit.
    The uSky is ready, organising the requirement to submit ( screen shots, documentation, ...etc), it is on the way.

    I think Unity team is still improving the soft shadow, it is already better than early beta.
     
    wetcircuit likes this.
  26. Project-Mysh

    Project-Mysh

    Joined:
    Nov 3, 2013
    Posts:
    223
    Sry, its ture, i didnt noticed the new PCF filter they added in beta 10+. So finally there is no need for plugins, cause the old "blur" filter was very poor.

    I hope they are still improving shadow system, we need something like distance fade and per-light source resolution cause is very unatural to have perfectly sharpen shadows.
     
    Last edited: Nov 6, 2014
  27. Quickfingers

    Quickfingers

    Joined:
    Aug 29, 2009
    Posts:
    268
    Apologies, I just read the first post and noticed you already answered this! Please ignore :) I'll leave it here so I get updates to this post

    Does usky work on OS X / dx9 or does it require sm4/5? It looks really great Luckymouse, good luck with the sales :)
     
  28. Luckymouse

    Luckymouse

    Joined:
    Jan 31, 2010
    Posts:
    481
    Subnission successful.png
    [EDIT]
    Updated new shader setting via uSkyRenderer script.
     
    Last edited: Dec 1, 2014
  29. Luckymouse

    Luckymouse

    Joined:
    Jan 31, 2010
    Posts:
    481
  30. elias_t

    elias_t

    Joined:
    Sep 17, 2010
    Posts:
    1,247
    Bought it!!!

    Congratulations. This is a must have for unity5 users.

    Works very well with enlighten and the pbs shaders.

    edit:

    One question. When pressing play on the player the reflections do not seem to update
    in realtime on the materials. Is this a unity5 beta bug or should I do something else?
     
    Last edited: Nov 14, 2014
    Luckymouse likes this.
  31. Luckymouse

    Luckymouse

    Joined:
    Jan 31, 2010
    Posts:
    481
    Thanks

    Even uSky will do dynamic in both Editor and Runtime, however currently Unity 5 beta is only update the Probes in Editor mode only, that mean it is Dynamic in Editor, Static at Runtime. In general, all the Probes were pre-baked before run the scene. It is currently how Probes and Enlighten are working in Unity 5, not sure everything will change in the future for Unity 5 release.

    Performance wise, I believe it is still too expensive to update all the probes at runtime in Unity 5, especially if the scene has a lot of local reflection probes.

    [Edit]
    At the moment the Skybox Ambient will update at Runtime for the Static gameobjects only.
     
    Last edited: Nov 14, 2014
  32. elias_t

    elias_t

    Joined:
    Sep 17, 2010
    Posts:
    1,247

    ok thanks.

    Do you know how it can be forced to bake the probes at runtime whenever it is needed?

    edit: nevermind Ante answered this on the beta thread:

    "Joachim_Ante said:
    We are working on adding reflection probes that can be generated at runtime.

    The hard part in this has been making the convolution filters run fully on the GPU so this is feasable in realtime, but we managed to do it and it's freaking fast. Generation of reflection probes is timesliced so it's realistic to do it while the game is running."
     
    Last edited: Nov 14, 2014
  33. Luckymouse

    Luckymouse

    Joined:
    Jan 31, 2010
    Posts:
    481
    Good Question and Good Answer !.

    Joachim Ante mentioned also something about realtime reflection probe baking in future Unity 5 in here.
    ( he commented at near the bottom of the page)

    Joachim Ante said :
    " Our plan is also to support reflection probe baking at runtime in either 5.0 or 5.x. (TBD). So you can rely on reflectivity, skybox SH extraction and directional lights to get very nice lighting for completely procedural scenes."
     
  34. Charkes

    Charkes

    Joined:
    Apr 17, 2013
    Posts:
    228
    Luckymouse likes this.
  35. Quickfingers

    Quickfingers

    Joined:
    Aug 29, 2009
    Posts:
    268
    Great job Luckymouse, been waiting for this one :) Just curious, are you planning to have ocean fog and stars like the older web player, those feature would be really useful for myself and I'm sure others
     
  36. Luckymouse

    Luckymouse

    Joined:
    Jan 31, 2010
    Posts:
    481
    Thanks
    For now you can change the Ground color to something like dark blue, that will be equivalent to my old ocean fog effect. Because the Sky Ambient will pick up the sky bottom color and intensity too, so Ground color lets user more flexible to control it. For the Stars, I need to investigate better way to integrate it in the future.


    Btw, I just find a bug of Wavelength setting, it should change the upper sky color, but now it change the bottom color. It will fix it for next update.
     
    Last edited: Nov 15, 2014
  37. Luckymouse

    Luckymouse

    Joined:
    Jan 31, 2010
    Posts:
    481
    Just check the code, I forget to pass the _betaR and _betaM values from script to shader. I must be accidentally removed it during clean up the code.

    For the Quick fix insert two line of codes in the uSkyRenderer.cs:
    Code (CSharp):
    1. void InitMaterial(Material mat)
    2. {
    3.        .
    4.        mat.SetVector("_SkyMultiplier", skyMultiplier);
    5.        // Add following two line of codes
    6.        mat.SetVector("_betaR", BetaR);
    7.        mat.SetVector("_betaM", BetaM);
    8.        .
    9.        .
    10.        .
    11. }
    Anyway I will update the package as well.
     
  38. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,239




    I have no idea what I am doing (terrain/veg shaders+IBL, etc) ... 1st day with Unity terrains.

    Thanks for uSky though, this is great! Trying to push it until my eyes bleed! lol
     
    Last edited: Nov 15, 2014
    shkar-noori likes this.
  39. Luckymouse

    Luckymouse

    Joined:
    Jan 31, 2010
    Posts:
    481
    @wetcircuit Thanks
    Yup, you can change the settings of uSky to get a interesting effect. I think you can also tweak the fog and directional light color to get a nice final composition.
     
  40. Project-Mysh

    Project-Mysh

    Joined:
    Nov 3, 2013
    Posts:
    223
    Hi Luckymouse,

    I bought your package and its amazing. Unity 5 beta 13 now have rayleigh/mie scattering based color in their procedual sky shader, but its nothing compared to uSky. There is only one feature that unity added that you could add and can be amazing: unity 5 procedual shader syncs the intensity of the directional light with the exposure and scattering.
    Could be amazing if you do the same but adding sync with the directional light color automatically updating with the shader.
    Is this posible or so much coding needed?
     
    shkar-noori likes this.
  41. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,239
    Sorry for the newbie question, but how did you capture the uSky box to Skyshop? I should just be able to make a new specular output by hitting Probe Direct or Probe Direct +IBL...(?)

    However, I either get a black preview in the spec window or I get some garbage.



    I can see uSky in my scene as the skybox... Any ideas?

    Alternately is there another way to save either an hdr cubemap or an equirectangular/spherecam of my scene?
     
  42. Luckymouse

    Luckymouse

    Joined:
    Jan 31, 2010
    Posts:
    481
    Thanks.
    I tested the new Unity 5 beta 13 procedural sky already. They claimed to have that closer to "real sky" (rayleigh/mie scattering based color). I don't know how far they are going to improve their sky, at the moment sky color doesn't seem look right to me neither. Glad we have uSky, don't we?

    It is possible to sync the directional intensity to shader, I will add that as an optional in future.

    Since Unity 5 beta 13 changed the skybox mesh, some codes of uSky shader allows computing per-vertex based for better performance.
    I will update the uSky shader that approximately run 10 ~ 20% faster. That should be release in version v1.0.0f.
    This performance gain is for Unity 5 beta 13 or newer users only, uSky shader for Unity 4 will remain the same.

    I just tested uSky with last version of Skyshop (v1.10.1), It seems working totally fine to me.
    (I'm working on my Mac, But it should not have any different)
    uSky_Skyshop_guide.jpg

    Here is the Step by Step setup:
    1) Create New scene or load the uSky Scene
    ( if Create from New scene, then Apply uSky Renderer Prefab)
    * Leave the default "Auto Apply Skybox" as checked
    * Make sure you have the lighting on in the Scene window. (Little light icon on the top of Scene window)This will show the correct lighting in the Scene window.

    2) Create some Primitive Gameobjects (Spheres, plane..etc) for testing, Apply Marmoset's material to primitive gameobjects. eg: Marmoset/ Diffuse IBL to Plane and Marmoset/ Specular IBL to Spheres
    (Specular IBL: set Diffuse Color to Black, Specular Sharpness slider to maximum.)

    3) Rotate the light direction in the scene as you will. (You may want to turn on the shadow)

    4) Apply (Skyshop) Sky Manager gameobject ,
    - uncheck "Show Skybox" (we will use uSky instead)
    - check the "Probe Only Static Objects" ( Right now all the Objects in the scene are Non-static, so lets just bake the sky only with no objects in Specular cube map)

    5) Apply (Skyshop) Sky gameobject.
    Inspector for Sky Setting:
    SPECULAR OUTPUT >
    1 - Check HDR
    2 - New > 256 (if Create from New scene, Skyshop may ask you to save the scene, click "Save Scene" button, then you may repeat this one more time: New > 256)
    3 - Hit "Probe Direct" or "Probe Direct + IBL" button (either will work!)

    Now you should see all the Marmoset materials in the scene will update with the baked cubmaps.

    Right now uSky doesn't have that option to export as panorama (equirectangular) image. As you see the instruction and guide image, uSky doesn't require any panorama image to work with Skyshop.

    If you still have problem try to import both uSky and Skyshop in new project. I hope my Skyshop instruction guide helps.
     
    Last edited: Dec 1, 2014
    wetcircuit likes this.
  43. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,239
    Thank you for that awesome handholding..... :)

    While Skyshop refuses to capture it in my earlier scene, it is working perfectly in a new scene.



    :rolleyes: Oh Unity!
     
    Luckymouse likes this.
  44. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,239
    I think I need to just ditch Unity4 and the whole push a button to make probes happen because it is really inconsistent when it wants to work.... And uSky is my new favorite everything so having this all "just work" in u5 would be totally boss!





    I left a review.
     
    Last edited: Nov 17, 2014
    alexzzzz and Luckymouse like this.
  45. Luckymouse

    Luckymouse

    Joined:
    Jan 31, 2010
    Posts:
    481
  46. Luckymouse

    Luckymouse

    Joined:
    Jan 31, 2010
    Posts:
    481
    Quixel Textures in Unity 5 Ligthing Test (Linear Color Space)
    Quixel_textures_Unity5.jpg

    Quixel_textures_Unity5_2.jpg

    [Edit: Removed link]
    > uSky parameters :
    Only darken the Ground color and other are all in default value.
    > Using Camera HDR and Tonemapping:
    Technique = Photographic (default)
    Exposure = 1.5 (default)
    > Using Image Effects - Anti-Aliasing
    > Directional light intensity = 1.0
     
    Last edited: Feb 6, 2015
  47. Luckymouse

    Luckymouse

    Joined:
    Jan 31, 2010
    Posts:
    481
    Updated version 1.0.0f2 is on Asset store now.

    uSky 1.0.0f2 Change Log
    =======================
    - Since Unity 5 beta 13 changed for a big and tessellated sphere mesh. Now some codes of uSky shader allows computing per-vertex based for better performance. New update of the uSky shader that approximately run 10 ~ 20% faster.
    This performance gain is for Unity 5 beta 13 or newer users only, uSky shader for Unity 4 will remain the same.
    * Note: Do not use the uSky shader for Unity 5 in Unity 4.x.x.

    - Removed the Directional Light in the Unity 5 uSkyRenderer Prefab. When apply this Prefab, user need to apply the Directional Light manually to uSkyRenderer.
    (When Create or Start a new scene in Unity 5, default always included the Directional Light in the scene. So I removed it from Prefab for less confusion)
    -----------------------------------------------

    By the way:
    The new Unity 5 Beta 15 built-in Skybox-Procedural shader that improved a lot and doing very similar what uSky can do now. So I decide to add night sky in future. Who own the uSky package will have free upgrade.
     
    Last edited: Dec 2, 2014
    wetcircuit likes this.
  48. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,239
    In Unity4, I'm attempting to write a script that will link uSky's Directional Light to the ambient light using
    RenderSettings.ambientLight... Since I am not much of a coder this will be a learning challenge for me, but I realized it might be a useful option in uSky (at least for a while).... Maybe an averaged color value that was actually informed by uSky's settings, with a slider to boost it?

    Thanks for considering.
     
  49. Luckymouse

    Luckymouse

    Joined:
    Jan 31, 2010
    Posts:
    481
    I'm trying to understand what you are trying to do that get a uSky's averaged color, and set it to ambient light, right?

    Besause all the sky color computed by shader, it is not that straight forward to pass the computed color value from shader (GPU) to script (CPU) in Unity. The Material.GetColor API can get only the material property value, not the output value.
    In this case, you need to assign a RenderTexure (can be small as 32x32 pixels) to shader and shader can apply the sky color to RenderTexure, then you use the Texture2D.GetPixel from the RenderTexure and calculated average color via script. (Please someone let me know there is better way to do so)
    At the moment uSky attempts to work on Unity free, so it will not use RenderTexure. However what you want can be done from custom script.
     
    Last edited: Dec 7, 2014
  50. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,239
    Ehh, I am not that smart, I just need a simple color to color, so as the sun "sets" the ambient light dims out too. (as soon as I can figure out what a lerp is)

    I was suggesting that if it was a feature of uSky :) it might be intelligent, like finding a complimentary sky color but giving us exposure adjustment, etc.... Controlling the Ambient Light seems to be a feature of most of the other day/night sky assets, but they don't have a friendly approach to lighting (they take over, not giving you any adjustments).

    I am trying particle clouds with a uSky sunset. If uSky could drive the Ambient Light it would make the timing and color much easier. Seems like most cloud solutions work off the Ambient Light. I really like uSky being my lighting/color control, and then simple rotate the sun, but all connected.

     
    llJIMBOBll likes this.
unityunity