High quality skybox / space

Hi,

I'm trying to create a skybox for my level which features planets and nebulas, kind of like in this image: http://4walled.org/src/ea509f2d98c6e9038603a06683b46234.png

I managed to get it looking good using 2048x2048 textures, but I am worried about the performance hit I will encounter from using such high resolution images.

Is there a better way of doing what I am trying to achieve or is high res textures the only way to go?

Unless you are targeting low end graphic cards it should be fine, though will eat up a fair amount of memory (16mb*6 = 96mb + mipmapping) unless they are compressed. So in this case i'd be more wary of memory useage/requirements than performance. Can you not drop down to 1024x1024? That could reduce memory by 75% (4mb*6 = 24mb+mipmaps)

There are other solutions such as using a different mapping such as spherical (on a sphere obviously), which from memory can potentially half the amount of memory you use on a cubemap with little loss in quality. HDR Shop can be useful for converting different mapping schemes if its still available.

Alternatively you could take the approach of mapping a bounding sphere or skybox. That is you create a mesh that allows you to place elements from a texture atlas or simply assign vertex colours or both. This is what HomeWorld did many years ago and there used to be a good webpage about it, but google is coming up empty.

You might also want to check out the inspirational Journal of Ysaneya for the Infinity game/engine he did some great stuff with nebulas and skyboxes. At one point these were just 1024x1024

Edit: Found a page about Homeworld backgrounds here

Another solution could be to write a custom shader that draws procedurally pixel-perfect stars on a large sphere, a star dome basically. You then could either use neatly placed billboards for features like planets and nebulas in space that are textured with much smaller but still large-ish textures. Or, probably even better, you can customize the star-shader in a way that it draws given textures to certain positions on the sphere. That would require a little math and shader-knowledge, but will probably deliver the best looking solution even on high screen resolutions.

I believe this might help you.

Make sure you turn of “generate mip maps” under advanced texture import settings for each image… otherwise it looks totally crappy.