Search Unity

Distant landscape on mobile?

Discussion in 'General Graphics' started by derkoi, Nov 29, 2014.

  1. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,260
    I'm changing my existing static skybox to a dynamic sky dome (Time of Day on the asset store) and as a result cannot have my distant landscape on the skybox, so I'm thinking the best thing to do is somehow render a landscape with transparency where the sky would be, so my dynamic sky can show.

    Has anyone tackled this in their games? Is there a better way?

    Thanks
     
  2. smd863

    smd863

    Joined:
    Jan 26, 2014
    Posts:
    292
    You can render a 3D skybox between your skydome and your main geometry.

    Create a second camera that renders before your main camera. You put all your distant geometry into a special layer, and you scale it to a ratio of your main geometry (Valve used 1:16 as a default). Scale the movement of the 3D skybox camera by the same ratio, and you will get a little bit of parallax on your distant geometry that can create the illusion that your skybox geometry is huge and really far away.

    It's relatively simple to set up, but it will be an extra camera and render pass. Your distant geometry can be pretty simple though so it shouldn't be too expensive.

    The best would be to get the "Time of Day" camera to render it with the rest of its skybox, but I am not familiar with how that asset works so I can't really speculate on how that might work.
     
  3. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,260
    Thanks I'll look in to that.