Search Unity

Question how do i hide the grey space between plane and skybox?

Discussion in 'General Graphics' started by unity_8DE537CF8A8F1DCB1A9E, Nov 28, 2022.

  1. unity_8DE537CF8A8F1DCB1A9E

    unity_8DE537CF8A8F1DCB1A9E

    Joined:
    Nov 28, 2022
    Posts:
    2
    No matter how big my plane is there is still the gap between plane and skybox when i rotate the cam in game from a higher altitude.im working on game like pokemon go so trying to make that effect any help would be appreciated.Thanks. i have attached the ref picture that im trying to make as well
     

    Attached Files:

  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,348
    Yep. That's going to be true with Unity's procedural skybox.

    Mathematically speaking the edge of a flat plane will always be below the horizontal plane of the camera. Unfortunately, Unity's procedural skybox was designed so it transitions to the "horizon" at that horizontal plane rather than at some point below that plane which makes the issue you're having more obvious.

    However the "real" solution is fairly straightforward.

    Use fog, and don't use the included procedural skybox.

    Something like Pokemon Go is using a solid color fog, and then using a skybox material that fades to the same solid color below the horizon. They're likely using a custom skybox shader to accomplish this, but a cubemap skybox using an equirectangular texture as a base that you hand-colored the bottom half of to the same solid color can get you there. Otherwise there are plenty of skybox shaders you can get on the asset store or likely even find for free that'll let you set the color yourself, or even automatically reuse the fog color.
     
    BrandyStarbrite likes this.
  3. unity_8DE537CF8A8F1DCB1A9E

    unity_8DE537CF8A8F1DCB1A9E

    Joined:
    Nov 28, 2022
    Posts:
    2
    thank you so much for the reply do you any link to such shader which is free thanks.