Skybox vs Skysphere

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

+7
3d
source share
5 answers

Skyboxes and skyspheres are pretty much equivalent in the sense that you get the same kind of visual effect, that is, a nice background that seems to be at a great distance.

However, I usually recommend skybox for three reasons:

  • Less polygons required
  • Assuming you set up the projection matrices correctly, you cannot say that you are inside the box (if you are mistaken, you may see some distortion)
  • Easier to display square Skybox images (one for each of the size directions)

As for the last point, it's pretty easy to set up the renderer to create even-image images that exactly match on the Skybox, creating a 90-degree field of view, for example. in POVRay you will use something like the following:

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

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

One of the good reasons I can think of using skysphere is that you use some kind of procedural texture approach that requires the generation of (approximately) points on a unit sphere. I think this is a rather special case, and it is unlikely to be necessary for most gaming applications.

+8
source share

Easier to create textures for skybox. In addition, the number of polygons will be less (but today it is negligible).

The only problem with skybox is that the edges of the cube may be visible under certain conditions.

Another aspect that matters:

  • skybox will never run into geometry - the image is projected only from another camera that rotates with the user’s camera and is "stuck in a drawer"
  • in the case of skysphere, the background will be displayed directly (the player can "crash into the sky")

A good description and sample of OpenGL is here .

+2
source share

it’s also a very cool skisphere, because you can use any projection map of the Mercator for its texture, and it has no distortion.

+1
source share

Another advantage of skyboxes is the ability to use cubmaphs for them. The sphere, on the other hand, is not hardware acceleration (afaik).

0
source share

when you use skybox, you will most likely use the texture of the window. This texture can also be used for reflective materials. Skyphere textures are not so easy to use.

0
source share

All Articles