Last time I already create day night cycle with smooth light and fog transition. now I will perfected last day night cycle in this article by adding Skybox transition from day and night just like the demo bellow. For this functionality we need a custom skybox shader that contain 2 type of skybox and blend factor with range [0-1] type to get combination of 2 skybox texture.

Now we have our new custom shader, next we have to create new Skybox material and use shader RenderFX > Skybox Blended, now set blend slider to 0 and apply skybox texture to our material according to this rule

Put Day Skybox (front) texture to “Front”

Put Night Skybox (front) texture to “2 Front”

Put Day Skybox (up) texture to “Up”

Put Night Skybox (up) texture to “2 Up”

and also put left, right, back, down texture according to it’s variable

11 Opinion to this post

Is there anyway you can make this same sort of thing, but instead of gradually changing depending on time, instead it depends on position. For an example if you are in some sort of wilderness the sky may be blue but you might walk into a dark graveyard and the skybox will gradually fade to a darker, saturated sky.

I was wondering, is there anyway to do this type of thing but the Skybox changes depending on where you are?

For an example, if you have played Oblivion, when your on the bottom of the mountain where the gate is open it’s just a normal blue sky but as you walk up the mountain it gradually gets redder and if you walk down it goes back to blue.

I am having a problem with the script. Can you give me the full script that you could accomplish after this tutorial? If you don’t understand what I mean, I mean can you give me the script even after you add the both short scripts. I hope you understand! Please reply 😀

Hi, thanks a lot for the free tutorials, they helped me a lot. There’s still a problem, thought: in Unity Free, it’s not possible to assign a render to the scene, so I can’t make the skybox blending work unless I have Unity Pro. Is there a workaround?

"I read a lot of interesting content here. Probably you spend a lot of time writing, i know how to save
you a lot of work, there is an online tool
that creates readable, SEO friendly posts in minutes, just type in google - laranitas free content source"

"I read a lot of interesting articles here. Probably you spend a lot of time writing, i know how to save you a
lot of time, there is an online tool that creates high quality, google
friendly articles in minutes, just type in google
- laranitas free content source"

"I read a lot of interesting posts here. Probably you spend a lot of time
writing, i know how to save you a lot of work, there is an online
tool that creates high quality, SEO friendly posts in minutes, just search in google - k2seotips unlimited content"