- Home /
Skybox horizon adjustment
I have a situation where there is a cliff you can look off over the ocean. When you look across the water down at the ocean level it aligns with the skybox horizon just fine and looks realistic.
When you look from the top of the cliff you can see below the horizon of the skybox and it looses all realism. The player will never be down near the edge of the water so I just need to adjust the horizon down a bit. so that it looks correct from the cliff.
Is there a way to shift or tilt the skybox to move the horizon down? I know in Maya there is an adjustment for that but I haven't been able to find anything similar in Unity.
Answer by domiii · Jul 04, 2015 at 09:55 AM
The way I see it, you have three options:
1. Add fog
To me, it appears that the easiest way of dealing with this is to add fog to hide your Skybox's "underbelly". The Global Fog Package is a standard asset and quite powerful! Here is how it goes:
Add the "Effects" standard package.
Download this Extended Global Fog script and copy it into your folder (to enable more customization options). Note that the author posted multiple versions through-out the thread to fix bugs reported by others. Very helpful fella!
Add the
GlobalFogscript component to your camera.Make sure to enable "Affect Sky Box"!
Global fog uses the color and other settings defined under
Windows->Lighting->Fog.However, as explained here, enabling Unity-standard fog causes a hell lot of bugs when used in conjunction with the extended fog script. So what you want to do is: (1) enable fog, (2) make the changes, (3) disable standard fog again.
You are done! Fine-tune to your liking. :)
2. Custom Skybox texture/material
Unity's Skybox is defined by a material applied to a tessellated sphere or box; so you can just make some adjustments to your Skybox texture, and move down or otherwise eliminate it's "horizon" using Photoshop, Gimp, Blender etc.
3. Roll your own Skybox shader.
Just wanted to say that adding fog works with HDRP in 2019.3 as well. Just need to go to the Sky and Fog volume and make sure the Fog component is enabled and tweaked to your liking.This answer nudged me in that right direction! Thanks
Answer by Marlk · Oct 29, 2016 at 10:19 AM
I know this is a bit late but for anyone else that sees this: If you use the Mobile Skybox shader you can add Y offset to all the textures. It will screw up the skybox top a little bit but if seeing the bottom (eg looking down from aeroplan) is a priority it shouldn't matter.
Answer by Bryarey · Apr 14, 2021 at 07:02 PM
Again, it's late, but, probably, it can be useful for somebody: I created custom skybox shader with vertical scale/offset feature, and HSV controls for simple coloring and reuse skybox textures:
Your answer
Follow this Question
Related Questions
Procedural Skyboxes Based on Scene Data 1 Answer
Normal Texture to Skybox 0 Answers
Sun coordination with Skybox 2 Answers
transform.RotateAround problems 2 Answers
Error with transform.RotateAround when I use a variable for the last parameter... 1 Answer