Search Unity

Farland Skies - Low Poly skybox with custom shader

Discussion in 'Assets and Asset Store' started by PhannGor, Jun 18, 2016.

  1. PhannGor

    PhannGor

    Joined:
    Feb 5, 2015
    Posts:
    230
    01.png


    Farland Skies - Low Poly is minimalistic, low-poly style skybox with a custom single-pass shader that works as a regular skybox material, avoiding the use of any sphere or mesh.



    Features:
    • Dynamic three-color gradient sky with adjustable exponents.
    • Three types of stars, with adjustable twinkling speed and horizon extinction.
    • Five types of sun and moon, with customizable size, tint, and position.
    • Three types of nifty low-poly clouds with dynamic height and tint.
    • Fully customizable day-night cycle.
    • Easy to control either from scripts or directly in the editor.
    • High Performance. Optimized for mobile devices and VR platforms.
    • Supports both SRP and LWRP.
    Demos:
    Screenshots:








    Changelog
    2.5
    • Added support for LWRP
    • Better compatibility with Unity 2019.1
    • Replaced obsolete PreferenceItem with new SettingProvider
    • Fixed bug with performance degradation when continuously rotating clouds on iOS
    • Minor bugfixes
    2.4.3
    • Better compatibility with Unity 2018.2
    • A number of small optimizations and fixes
    2.4.2
    • Fixed bug with SkyboxController initialization for large scenes
    • Better compatibility with Unity 2017.2
    2.4.1
    • Added option to specify frames interval between skybox day-night cycle updates
    • Better compatibility with Unity 2017.1
    • Minor bugfixes
    2.4
    • Added option to move the asset wherever you want in your project
    • Got rid of the "Editor Default Resources" folder
    • A number of small optimizations and fixes
    2.3
    • Implemented possibility to enable/disable clouds, stars, sun or moon as shader feature
    • Added three different types of clouds
    • Added three different types of stars
    • Added five different types of sun
    • Added five different types of moon
    • Various optimizations and fixes
    2.1
    • Custom editor for skybox controller
    • Custom editor for skybox day-night cycle script
    • A number of small optimizations and fixes
    2.0
    • New single-pass shader, optimized for mobile
    • Sun and moon with customizable size, tint, and positioning
    • Stars with adjustable twinkling speed and horizon extinction
    • Configurable clouds height
    • A number of small optimizations and fixes

    Please, feel free to send any feedback, suggestion or critic. It'll always be well received and pondered. Don't hesitate to comment. Thanks!
     
    Last edited: Jun 13, 2019
    RoyaleJoons and tarasfromlviv like this.
  2. PhannGor

    PhannGor

    Joined:
    Feb 5, 2015
    Posts:
    230
    Gifts for early birds:

    ̶A̶S̶V̶-̶M̶L̶7̶P̶-̶9̶D̶G̶A̶-̶R̶L̶X̶Q̶-̶Q̶4̶T̶L̶-̶U̶A̶X̶F̶
    ̶A̶S̶V̶-̶M̶N̶9̶U̶-̶R̶T̶3̶L̶-̶K̶G̶T̶H̶-̶E̶V̶H̶G̶-̶6̶9̶7̶F̶
    ̶A̶S̶V̶-̶K̶R̶K̶M̶-̶4̶L̶H̶9̶-̶9̶4̶K̶6̶-̶L̶U̶7̶3̶-̶M̶4̶N̶7̶

    Would appreciate if you'll rate it and leave feedback.
     
    Last edited: Jun 19, 2016
    tarasfromlviv likes this.
  3. pushingpandas

    pushingpandas

    Joined:
    Jan 12, 2013
    Posts:
    1,419
    Thank you! I took ASV-ML7P-9DGA-RLXQ-Q4TL-UAXF. Awesome asset!!!!
     
    tarasfromlviv and PhannGor like this.
  4. b4c5p4c3

    b4c5p4c3

    Joined:
    Jan 4, 2013
    Posts:
    537
    Got the last one. It works fine with other Low Poly assets from the store. Nice Work
     
    PhannGor likes this.
  5. PhannGor

    PhannGor

    Joined:
    Feb 5, 2015
    Posts:
    230
    Few more keys for lazy birds ;)

    ̶A̶S̶V̶-̶D̶G̶Q̶T̶-̶X̶T̶P̶Q̶-̶G̶C̶M̶A̶-̶E̶4̶N̶X̶-̶V̶K̶9̶U̶
    A̶S̶V̶-̶7̶J̶C̶J̶-̶Q̶T̶6̶T̶-̶V̶U̶H̶J̶-̶P̶G̶T̶J̶-̶Q̶F̶4̶6̶
    A̶S̶V̶-̶R̶H̶6̶P̶-̶6̶P̶W̶E̶-̶M̶9̶Y̶E̶-̶K̶6̶X̶W̶-̶D̶E̶6̶Y̶

    Would appreciate if you'll rate it and leave feedback.
     
    Last edited: Jul 2, 2016
  6. PhannGor

    PhannGor

    Joined:
    Feb 5, 2015
    Posts:
    230
    Hi, fellow developers! Version 2.0 is now available on the asset store:

    https://www.assetstore.unity3d.com/en/#!/content/64604

    What's new:
    • Shader completely reimplemented and optimized
    • Added stars with adjustable tint, twinkling speed and horizon extinction
    • Added sun and moon with customizable size, tint, and positioning
    • Added optional sun/moon flares
    Please, feel free to send any feedback, suggestion or critic. Don't hesitate to comment. Thanks!
     
  7. PhannGor

    PhannGor

    Joined:
    Feb 5, 2015
    Posts:
    230
    Gift for early bird:

    A̶S̶V̶-̶N̶E̶Q̶Q̶-̶V̶R̶4̶G̶-̶7̶G̶F̶G̶-̶F̶T̶A̶P̶-̶T̶N̶P̶C̶

    Would appreciate if you'll rate it and leave feedback ;)
     
    Last edited: Jul 29, 2016
  8. pushingpandas

    pushingpandas

    Joined:
    Jan 12, 2013
    Posts:
    1,419
    Thank you for the code, I grabbed one on Jul 2. The asset is awesome I like the day/night circle. Thank you
     
  9. davidchaseling

    davidchaseling

    Joined:
    Apr 20, 2015
    Posts:
    8
    Hey PhannGor,

    With the asset is it possible to take the sun/moon/clouds out of the skybox and into the world as 3d objects? The asset is perfect for what I need otherwise.
     
  10. PhannGor

    PhannGor

    Joined:
    Feb 5, 2015
    Posts:
    230
    @davidchaseling, there is a simple version of the skybox, without sun/moon, in the asset package. You can also disable clouds just by setting clouds texture to "none". Regarding 3d objects, you will need to create your own ones I guess.
     
  11. ajaxlex

    ajaxlex

    Joined:
    Jul 15, 2016
    Posts:
    38
    PhannGor,
    I am really enjoying your skybox. I am using a linear rather than gamma colorspace though, and the highlights around the sun, and particularly the moon are not displaying the same, and there is a dark ring around the edge of the moon. What can I do to rectify this? Thanks in advance!
     

    Attached Files:

    • Moon.png
      Moon.png
      File size:
      56.4 KB
      Views:
      984
  12. ajaxlex

    ajaxlex

    Joined:
    Jul 15, 2016
    Posts:
    38
    Hey, I figured it out. For those who follow: The textures must be imported using the advanced mode, with "Bypass sRGB Samp" checked, "Encode as RGBM" set to off, ( and don't forget to set "Wrap Mode" to Clamp. )
     

    Attached Files:

  13. PhannGor

    PhannGor

    Joined:
    Feb 5, 2015
    Posts:
    230
    @ajaxlex,
    Glad to hear that you've figured it out and all works fine now. Also thanks for sharing your solution with community ;)
     
  14. PhannGor

    PhannGor

    Joined:
    Feb 5, 2015
    Posts:
    230
    New version with custom editors for Skybox Controller and Skybox Day-Night Cycle has been submitted for review.
    Now it should be far more convenient to adjust skybox parameters for your needs ;)

     
  15. DanielGilbert

    DanielGilbert

    Joined:
    Feb 14, 2015
    Posts:
    11
    Hi,

    thanks for the asset! Love the overall style. However, I encountered a problem with some other, third party shaders. If you are using shaders that rely on the intensity of a directional light in the scene, they will disappear during the day/night switch. (at least that's the cause, I guess.)

    Digging through your script, I figured out that at some point, moon and sun light intensity become zero. So I added a small fix, by making sure that at least one light's intensity will never be zero - voilá, everything works so far. Just as a hint for other users. :)
     
    PhannGor likes this.
  16. PhannGor

    PhannGor

    Joined:
    Feb 5, 2015
    Posts:
    230
    Thanks for sharing! However, there is even simpler solution - just edit sun and moon DOT params in editor in a way their light intensity is overlapping, that's it.
     
    DanielGilbert likes this.
  17. DanielGilbert

    DanielGilbert

    Joined:
    Feb 14, 2015
    Posts:
    11
    Ah, ok. Thanks! Haven't thought about this one, guess that makes more sense. :)
     
  18. CharlieHorse

    CharlieHorse

    Joined:
    Sep 16, 2014
    Posts:
    2
    Great product, love the new configuration options for sun, moon, clouds. Is Unity 5.5 supported yet? Considering a migration soon. I did a quick test and saw some errors, don't want to spam them here if the problems are known/being worked on.

    Thanks!
     
  19. PhannGor

    PhannGor

    Joined:
    Feb 5, 2015
    Posts:
    230
    Hi @CharlieHorse,

    Unity 5.5 is supported with the latest released version. Just double tested it now with 5.5.0f3 and all works fine for me. Feel free to describe your issue here or send an email to support@borodar.com.
     
  20. Damo9000

    Damo9000

    Joined:
    Nov 4, 2015
    Posts:
    7
    ive never worked with red and blue cubemaps, and im trying to replace clouds with asteroids. I can do it, but i dont understand what the deal is with red and blue cube maps and how to use them. what is the term for this kind of cubemap and how does one work with them? Its like blue doesnt show but red does?
     
  21. PhannGor

    PhannGor

    Joined:
    Feb 5, 2015
    Posts:
    230
    @Damo3000,

    It's a typical 6-frames cubemap with the info for shader where to render sky and clouds. The blue color will be interpreted as sky and shades of red will be rendered as clouds.
     
  22. Deleted User

    Deleted User

    Guest

    I love the sky but am having some problems integrating it. If I open a new scene and drop the three prefabs for the sky controller and day night cycles it works great. I do the same with my current project and for some reason the sun and moon disappear. I can still see the lens flare where they would be but not sun or moon. I looked at the camera and it looks the same as a new scene, minus a UI and RenderCameraLayer removed, but neither of those is the layer for the sky components. I even tried creating a new camera and setting it as the main camera, still just the lens flair. Any thoughts as to what to look at next, if it helps I can send you screenshots of the camera and day night objects.
     
  23. PhannGor

    PhannGor

    Joined:
    Feb 5, 2015
    Posts:
    230
  24. lookx2

    lookx2

    Joined:
    Jun 24, 2016
    Posts:
    20
    Hi @PhannGor ,
    Love the sky so much, It's so beautify. However, when I use this in mobile device, It slow down a lot.
    More than 30fps drop even I turn off the sun light and moon light. Seem the shader update slow down the program.
    Are there any work around to improve performance?
    Thank you!
     
  25. PhannGor

    PhannGor

    Joined:
    Feb 5, 2015
    Posts:
    230
    Could you please describe how exactly did you tested asset performance? And what is hardware specification of your mobile device?

    I'm wondering because this skybox shader is optimized for mobile and I'm getting stable 60 FPS even on my 5-years old LG Nexus 4.

    Screenshot_20170213-133736.png

    P. S. The shader is optimized for mobile, but demo scenes coming with the asset are NOT. They include complex terrain, lightmaps, reflection probes and ALL variants of the cubemaps/textures for demo purposes. These things could be heavy even for modern mobile devices :)
     
    Last edited: Feb 13, 2017
  26. lookx2

    lookx2

    Joined:
    Jun 24, 2016
    Posts:
    20
    Thanks for reply. I use Samsung S7 edge to test, it should be powerful enough to run most of the mobile application.
    I'd create an empty scene and put the skybox prefabs. It run very well and have a high performance. However when I use the day night cycle(which update the position of sun/moon/cloud etc), the frame rate drop dramatically.
    Also I'd do some test, reduce the update() in SkyboxDayNightCycle.cs to run every 5 frames. The framerate back to 60fps again.
    So I guess it should be the update of shader items impact the performace.
    Thank you so much
     
  27. PhannGor

    PhannGor

    Joined:
    Feb 5, 2015
    Posts:
    230
    Thanks for the info, will do additional testing regarding SkyboxDayNightCycle.cs performance. Also, I like your workaround with reducing the update() runs. Quite elegant and users should not notice the difference!
     
  28. KevinCain

    KevinCain

    Joined:
    Nov 8, 2016
    Posts:
    85
    Is there an easy way to turn moon / stars off? I could edit the script but wanted to see if I'm missing exposed controls...
     
  29. PhannGor

    PhannGor

    Joined:
    Feb 5, 2015
    Posts:
    230
    Yes, you can enable/disable them right from the SkyboxController editor:

    CropperCapture[11].png
     
  30. KevinCain

    KevinCain

    Joined:
    Nov 8, 2016
    Posts:
    85
    Thanks, sorry to bother you with something so simple I overlooked it completely!

    Two other questions:

    - How could we control the sun's glow term?
    - Is there a way to insert additional colors in the sky beyond the top/middle/bottom RGB values?
     
  31. PhannGor

    PhannGor

    Joined:
    Feb 5, 2015
    Posts:
    230
    1. I'm not sure i understand your question. Please explain what do you mean by the sun's glow term?

    2. This shader supports only three color gradient. You can change top and bottom exponents of the gradient, but cannot insert additional colors without modifying the shader manually.
     
  32. KevinCain

    KevinCain

    Joined:
    Nov 8, 2016
    Posts:
    85
    Thanks; I was asking if there is an exposed parameter to tune the sun shader's glow.

    We can change the halo by editing the B channel in the relevant sun map, as below:
    upload_2017-2-16_10-51-38.png

    My question is: can we dial down the amount of the halo effect rendered (shown at left)?

    Back to my question about controlling the sky box's color gradients, can you point me to the shader I will need to edit manually? Thanks!
     
  33. PhannGor

    PhannGor

    Joined:
    Feb 5, 2015
    Posts:
    230
    There is only one shader in the package: Farland Skies/Low Poly/Shaders/LowPolySkybox.shader

    shader.png

    And here's the place where sky gradient is applied:

    CropperCapture[14].png

    Regarding sun or moon halo, there is no exposed parameters to tune it in the editor. But you can also modify the shader in this case.:

    CropperCapture[15].png
     
  34. KevinCain

    KevinCain

    Joined:
    Nov 8, 2016
    Posts:
    85
    Thanks for the fast reply, I'll give that a shot!
     
    PhannGor likes this.
  35. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,409
    HiI just bought your skybox tool and I love it!

    If I were to ask for any features, it might be to add a little more control over the horizon: an alpha ramp for each haze setting (so I can keep the horizon at 100% but fade to the sky/ground sooner), and the ability to shift the horizon up and down would be wonderful!
     
  36. PhannGor

    PhannGor

    Joined:
    Feb 5, 2015
    Posts:
    230
    Hi @wetcircuit,

    Thanks for proposals, that sounds interesting. Will take a look what can I do here, probably next week.
     
    wetcircuit likes this.
  37. Schneider21

    Schneider21

    Joined:
    Feb 6, 2014
    Posts:
    3,512
    This asset is a no-brainer purchase for me. The wife's been keeping a tighter leash on my wallet lately due to my many Asset Store purchases, but as soon as the restriction is lifted, I'm buying this.

    I'm immensely impressed by the documentation and obvious attention to detail you've put into sun and moon positioning. Any plans on adding moon phases?
     
  38. PhannGor

    PhannGor

    Joined:
    Feb 5, 2015
    Posts:
    230
    Hi Schneider21,

    Thanks for such a positive review!

    Regarding moon phases, we definitely have this feature on the roadmap. However, I can't say anything about when it will be implemented. Meanwhile, you can easily achieve this effect by changing moon texture manually or from scripts, even at runtime.
     
    Schneider21 likes this.
  39. znith52

    znith52

    Joined:
    May 6, 2017
    Posts:
    2
    I love this asset so much , and am currently using it for active development. Will absolutely recommend it. One thing tho, the sun and the moon are not showing up in the sky for me. Im using the latest build of unity. Maybe you can give me a hint how to fix it.
     
  40. PhannGor

    PhannGor

    Joined:
    Feb 5, 2015
    Posts:
    230
    Hi, just double checked it and all works fine in Unity 5.6.1. Can you please provide more info how to reproduce your issue with the sun and the moon? Have you got a chance to run the demo scenes, does this issue appear there as well?

    Also, it would be faster to contact us using our support email for similar questions: support@borodar.com
     
  41. Dalsten

    Dalsten

    Joined:
    Jun 23, 2017
    Posts:
    2
    Hey! just installed this on Unity 5.6.2f1 and it seems not to work - even tried the demo to make sure it wasn't my scene, but i get the same errors. Can you help?
    http://imgur.com/a/ct8U5
     
  42. PhannGor

    PhannGor

    Joined:
    Feb 5, 2015
    Posts:
    230
    Let me check it with the latest build.
     
  43. PhannGor

    PhannGor

    Joined:
    Feb 5, 2015
    Posts:
    230
    Just double checked it and all works fine in Unity 5.6.2f1.

    CropperCapture[14].png

    Sometimes Unity just imports something in wrong way. At first, create a new project and try to import this package into it. If all works fine, then:
    • Сlose Unity Editor
    • Backup your project
    • Open your project folder in Explorer/Finder
    • Delete whole Library/ folder
    • Delete the Farland Skies folder, wherever it is (in Assets/ or in Assets/Plugins)
    • Reopen your project in Unity and let it reimport all the things (may take some time)
    • Import Farland Skies asset again
    I hope this helps, but please let me know if you need anything else or if you have any other questions.
     
  44. Dalsten

    Dalsten

    Joined:
    Jun 23, 2017
    Posts:
    2
    That worked / thanks alot! Big fan of this. And the response time you are keeping is so nice.
     
    PhannGor likes this.
  45. zRares

    zRares

    Joined:
    Nov 4, 2015
    Posts:
    2
    So i have a question, can anyone help me make my clouds rotate by default when i start my game ? is there any simple way to do that ? .. i'm a noob so try to be as specific as you can :p . Thanks!
     
  46. PhannGor

    PhannGor

    Joined:
    Feb 5, 2015
    Posts:
    230
    Hi @zRares,

    You can easily achieve that by adding this simple script to some object in your scene:

    Code (CSharp):
    1. using UnityEngine;
    2.  
    3. namespace Borodar.FarlandSkies.LowPoly
    4. {
    5.     public class CloudsRotator : MonoBehaviour
    6.     {
    7.         public float RotationPerSecond = 1;
    8.  
    9.         protected void Update()
    10.         {
    11.             SkyboxController.Instance.CloudsRotation = Time.time * RotationPerSecond;
    12.         }
    13.     }
    14. }
     
    Ronnocshanks and shyamarama like this.
  47. zRares

    zRares

    Joined:
    Nov 4, 2015
    Posts:
    2
    @PhannGor Thank you for the super fast reply ! :) you're awesome and the asset is amazing! Keep up the good work!
     
    PhannGor likes this.
  48. BillyMFT

    BillyMFT

    Joined:
    Mar 14, 2013
    Posts:
    178
    Just bought this and dragged the prefab into the scene but I keep getting null object errors when I run the scene or try to check boxes on and off in the settings for the skybox.

    eg

    NullReferenceException: Object reference not set to an instance of an object
    Borodar.FarlandSkies.LowPoly.SkyboxController.set_StarsCubemap (UnityEngine.Cubemap value)
    Borodar.FarlandSkies.LowPoly.SkyboxControllerEditor.StarsGUILayout ()
    Borodar.FarlandSkies.LowPoly.SkyboxControllerEditor.CustomGUILayout ()
    Borodar.FarlandSkies.LowPoly.SkyboxControllerEditor.OnInspectorGUI ()
    UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editor, Int32 editorIndex, Boolean rebuildOptimizedGUIBlock, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect)

    I'm using Unity 5.6.1. Any thoughts?

    Thanks
     
  49. BillyMFT

    BillyMFT

    Joined:
    Mar 14, 2013
    Posts:
    178
    I think it was because I have my own Singleton class. Updating your class declaration to

    public class SkyboxController : Borodar.FarlandSkies.Core.Helpers.Singleton<SkyboxController>
    {

    seemed to fix the null errors.
     
    PhannGor likes this.
  50. BillyMFT

    BillyMFT

    Joined:
    Mar 14, 2013
    Posts:
    178
    is it possible to turn off the sun and turn on the moon at runtime?

    this throws an error because the property is read only.

    SkyboxController.Instance.MoonEnabled = true;

    Thanks