What are the differences/pros/cons between a skybox and a skydome?
If the textures are done correctly, ideally the two are indistinguishable.
Other than the obvious difference of one being a half sphere (sky dome):
And the other being a cube (sky box), the two only have a few differences.
The most flexible of the two is the sky dome. With the increased number of vertices, sky domes allow some more options. For example, coloring the vertices for different effects.
The easiest to implement of the two is the sky box. It's just a simple box, and very fast to draw with far fewer vertices.
- Easy to implement
- Easy to code texture coordinates by hand
- Fast to draw
- Can have issues with perspective and corners
- Can be difficult to create textures that look smooth
- Easier to create textures for (but much more difficult to apply)
- Slower to draw with far more vertices
- More flexible because of increased vertices
- Less likely to have perspective issues and there are no corners to worry about
A skybox is a cube that has the image of the sky projected onto its six faces so that it looks like a sky if the camera is placed in the exact center. I.e. each face of the triangle has 90 degrees of the view.
A skydome is a dome shaped bit of geometry that's rendered to look like a sky.
A skybox is more limited in terms of animation and has a fixed resolution.
A skydome, being constructed from real geometry, can have more detail where it needs (say the moon, or a city skyline) and less texture detail where it's not needed (like the plain sky background). A skydome can also be composed and animated from separate parts, to animate things like clouds and the motion of celestial bodies.
Using geometry for the sky also means you can get parallax effects. Say you've got your sky box modeled at 1/10th scale, just move the camera 1/10th of its translation when rendering the sky geometry. This way you can mix world geometry and sky geometry at vastly different scales without running into depth buffer precision issues.
In general, the term "skybox" has been used to mean anything that's used to render the sky separately from the world geometry. But traditionally, a skybox is a textured cube rendered at the origin to provide the illusion of a sky.