Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by BumfluffPenguins · Aug 18, 2013 at 06:43 PM · skyboxtransitiondaycycle

Day/Night cycle transition help?

Hi, beginner here. What im trying to do is make a simple day/night cycle,i followed this guys super simple tutorial and it worked great, however i would like to know how to make the day skybox slowly fade into the night and same with the night into day. And also even maybe how to make a sun that sets and rises?

Any help would be greatly appreciated, thanks.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by getyour411 · Aug 19, 2013 at 01:08 AM

Try BurgZergArcade's Day/Night cycle tutorial parts; sets up suns, moons, fading in/out skyboxes, sunrise/sunset, demo's how to get a custom shader from wiki, even adding an Editor menu, etc. It's a great series as a whole, but the parts covered in these bits speak directly to your question.

http://www.youtube.com/watch?v=zxIyZzieFqE

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Sajidfarooq · Aug 19, 2013 at 06:34 AM 0
Share

Thats a really good find. I had a vague memory of there being a day-night cycle tutorial but had no idea about the custom-shader from the Wiki. Written by Aran Prankecivus no less...Up-voted.

avatar image BumfluffPenguins · Aug 20, 2013 at 12:28 PM 0
Share

oh cool, thanks ill check that out :D

avatar image
0

Answer by AdenFlorian · Aug 18, 2013 at 10:43 PM

Fading Skyboxes

To do this you could use a shader that holds two textures (or sets of textures), and a range slider that controls the fade in between the two (usually by changing the opacity of one of the textures).

I found this tutorial on shaders to be a great introduction.

Part four of the linked series covers blending two textures with a range slider, but you should probably go through all of the previous ones if you are new to shaders.

You can see it demonstrated here.

Rising Sun

Two methods to do this I can think of are using a flare with a directional light (or any light, and just rotate it around the level), or a texture that is being rotated around the level.

The simplest is to use a directional light with a flare assigned to the flare slot on the component. When you rotate the directional light it places the flare in the sky at where the light is coming from. A Light Flares package comes standard with unity. Import that and use the sun flare on the directional light.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Sajidfarooq · Aug 18, 2013 at 10:57 PM 0
Share

I hinted at a shader approach as well, but given that the existing skybox shader alone is quite complex, expecting a beginner (or even moderately good programmer for that matter) to be able to also add further textures + fade-ins, is asking much.

The rotating directional light approach is correct though. I missed that part of the question.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

18 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Errors with ENDCG in shaders 1 Answer

fading between skyboxes 1 Answer

Skybox Transition 1 Answer

Change/Fade between two skyboxes? 1 Answer

How to make/use Skysphere 3 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges