Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Skybox vs Skysphere

Tags:

3d

What are some advantages and disadvantages between the two. Especially for something like a 3D game.

like image 629
Dave Avatar asked Oct 12 '10 06:10

Dave


People also ask

How do I change the sky sphere in Assassin's Creed Unity?

To Assign the skybox to the scene you're working on: Choose Window->Lighting from the menu bar. In the window that appears select the Scene tab. Drag the new Skybox Material to the Skybox slot.


1 Answers

Skyboxes and skyspheres are pretty much equivalent in the sense that you will get the same kind of visual effect - i.e. a nice background that appears to be at a long distance away.

However I'd normally recommend a skybox for the following three reasons:

  • Less polygons required
  • Assuming you set up your projection matrices correctly, you can't tell that you are inside a box (if you get it wrong, you may see some distortions)
  • It's easier to render square skybox images (one for each of the size directions)

Regarding the last point, it is pretty easy to configure a renderer to produce raytraced square images that exactly fit on a skybox by creating a 90 degree field of view, e.g. in POVRay you would use something like the following:

camera {
   right -x
   up y
   direction -z
   location 0
}

I typically use 1024*1024 or 2048*2048 square textures for this.

The one good reason I can think of to use a skysphere is if you are using some kind of procedural texture approach that requires generation at (approximately) the points on a unit sphere. I think that is a pretty special case however, and unlikely to be necessary for most gaming applications.

like image 150
mikera Avatar answered Sep 22 '22 03:09

mikera