Author Topic: Skyboxes  (Read 5661 times)

0 Members and 1 Guest are viewing this topic.

Offline Lt.Cannonfodder

  • 210
  • Digitalous Grunteous
Anyway, the old Earth skybox (which was privateered from TBP - can't remember who its original creator was) had a lot of flaws. Basically it was just an image/render of Earth that was plastered on a very, very large plane on the skybox, and the apparent diameter of the planet was grossly larger than what the actual surface features visible suggested.

For those interested in the geometric problem, basically the issue was that as you view a sphere from a distance you see very much of the surface facing you, but when you get closer, the amount of surface visible will drastically decrease while the apparent diameter approaches 90 degrees asymptotically as the view angle tangents the planet's surface, defining the visible circular area of the surface...


To be fair, the TBP Earth was created when skyboxes were completely new (back in 2005 or 2006 I think) and no one quite knew how to make best use of them. Honestly, I'm rather shocked anyone is still using the damn thing, it's badly outdated and outclassed by what can be done today.
TBP assets cannot be used outside the mod without specific permission of the asset creator, which in many cases is or includes IPA.
Hasn't stopped the TBP Earth appearing here and there though. I wouldn't mind otherwise but I would like to be given credit.


 

Offline Mobius

  • Back where he started
  • 213
  • Porto l'azzurro Dolce Stil Novo nella fantascienza
    • Skype
    • Twitter
    • The Lightblue Ribbon | Cultural Project
Battuta was confusing.

TBP should be credited for that


Yeah. Pretty much underlines why I'm not a big fan of planet skyboxes... they pose too many limits. :(


Skyboxes have no limitations. The imitate reality as closely as you make the 3D scene to be.

Background bitmap planets have exploits. They enable you to show egregiously falsified views of planets.

Let me elaborate:





Here is a planet as it is seen from four points (P1-P4). P1 is the furthest, P4 the closest point.

The apparent diameter of the planet varies depending on the distance.


As you draw tangents to the planet to determine the apparent diameter, you notice that the lines obviously also limit the area that is visible to the view point. Player in P1 is able to see nearly full hemisphere. The line crossing the area visible to P3 is about 1/3rd of the planet's circumference, for P2 it is one quarter of the circumference, and for P4, the line through the visible area is only about 1/8th of the planet's circumference.

Now if you consider that when you change the apparent diameter of a planet bitmap, you're doing nothing at all to change how much area of the planet's surface is visible. It's still a static image of the planet as seen from the original rendering distance.

Skyboxes automatically take care of this. Not so with re-scaleable planet bitmaps. This is my main issue with skyboxes that essentially take any high-resolution planet image available and just scale it to high apparent diameter in the game. Essentially it's like taking a photo of a car, resizing it and then saying that because the photo is larger it was taken from closer.

Now, regarding the seemingly insane texture resolutions, let's take a look at what sort of area of surface is visible in a single skybox render which has 90 degrees field of view:





The red area is the actual area visible in the "down" render which is the most critical one regarding texture stretching. It's easy to see from here that the visible area is only approximately 1/24th or so from the entire circumference of the planet from edge to edge.

Practically, this means if you have equatorial resolution of 21600 pixels in the texture, you will have 900 pixels to stretch from one edge to another. If you use 4096^2 resolution, that means the texture is stretched by factor of four. That's a rather heavy amount of blur you get to that texture there.

This is basically the reason why such large textures are needed and useful. For skyboxes where the planet is further from the player (and, subsequently, has lesser apparent radius) much smaller textures are sufficient.

Yeah, I know what you mean (I have experience with such pics :nervous:) but, as Woolie Wool stated, skyboxes don't really like flexibility. No doubt they're much more realistic and handy when it comes to perspectives, though.

Do we have any skyboxes featuring a huge planet texture? I'd like to know if there's a perfect skybox for missions which take place right above a planet's atmosphere. (In poor words, with P4 in Herra's second pic being even closer to the planet.)
The Lightblue Ribbon

Inferno: Nostos - Alliance
Series Resurrecta: {{FS Wiki Portal}} -  Gehenna's Gate - The Spirit of Ptah - Serendipity (WIP) - <REDACTED> (WIP)
FreeSpace Campaign Restoration Project
A tribute to FreeSpace in my book: Riflessioni dall'Infinito

  

Offline Herra Tohtori

  • The Academic
  • 211
  • Bad command or file name
Yeah, I know what you mean (I have experience with such pics :nervous:) but, as Woolie Wool stated, skyboxes don't really like flexibility. No doubt they're much more realistic and handy when it comes to perspectives, though.

Do we have any skyboxes featuring a huge planet texture? I'd like to know if there's a perfect skybox for missions which take place right above a planet's atmosphere. (In poor words, with P4 in Herra's second pic being even closer to the planet.)

Not yet, but I hope that with assistance there will be progress in this area during next fall.

The immense benefit of building a full planet scene is that you can then freely move the camera around it to practically any location. The other option is modeling just the portion of the planet's surface that is visible, but when you have the full Earth in the 3D scene, it's easier to navigate and pick the view point for the renders.

With octet-mapped sphere, I could then easily enough use lower resolution textures for most of the parts of the surface, locate a good render spot and then switch to full detail textures for the locations visible from the view point, so that would be perhaps the ideal solution.
There are three things that last forever: Abort, Retry, Fail - and the greatest of these is Fail.