Yet Another Skybox Thread

Haven’t found what I’m looking for in other threads.

I want custom, non-realistic skyboxes, comparable to those used in Sins of a Solar Empire.

I see that there is a system for creating semi-realistic ones (conventional view of the sky from here on Earth) in Terragen and something that costs $1500 called Vue.

However, I just want to create my own and have them appear without obvious corners.

I’ve been able to create decent looking images, and I’ve been able to transfer them to front, right, left, back, up, and down images. I’ve followed the instructions for transferring them to a skybox (clamp, square dimensions, 2048 resolution, true color, copied other settings from those used in the skyboxes that ship with Unity).

However, I can still see corners. Really obvious, glaring, HERE! I! AM! corners.

I’ve been breaking down the images in Paint Shop Pro X4, but I see there is mention of using projection paint in Blender. Is there a way to paint an existing image in Blender via projection pain, or is this just a low-res way of creating very, very simple skyboxes? (Blender texture paint tools that I see in Blender 2.59 are like those in MS Paint.) What is the benefit of using projection paint for the skybox?

Also, is it necessary to apply some kind of deformation to the image you want to use for a skybox? If so, is there a tool in Paint Shop Pro or GIMP that can perform that distortion?

Is there a way to utilize a capsule-shaped skybox, rather than a cube?

I’ve been trying to use a capsule in blender, with the normals flipped inward and a camera inside to obtain the correct perspective distortion - no luck so far - but it occurs to me that if I could use a capsule for the actual skybox, I’d be good to go. I can easily uv texture my desired horizon to the interior walls of the cylinder portion of the capsule and my up and down views aren’t that fancy (just plain colors or simple gradients).

You can make a background enclosure be any shape you want, the only reason to use a skybox was for performance. Not sure if Unity’s skyboxes can be arbitrary shapes, sorry, never had need to use the Unity skybox system.

If you have obvious corners in your skybox it is most likely that you either have poorly created textures or an error in your math that adjusts the view matrix for the skybox. If you are using an off the shelf skybox system, such as that which is built-in to Unity, then it is most likely your textures that are at fault.

That said, some textures, very few, are just not suited to a cube and are better done with an oblate disc, a sphere or dome.

Using a capsule for a skybox I think you would suffer from longitudinal warping as the camera moves across the transverse of the manifold.

It could be you’re seeing shading or joins if it’s not rendered using an unlit shader.

Thank you for pointing that out. There are probably more than the obvious culprits I pointed out but I would still suspect the textures (even without a screenshot or video, which would be useful to diagnose the actual problem) based on the description of “without obvious corners” rather than “I’ve got dot crawl and weird lines appearing.” :slight_smile:

Thanks.

I’m pretty sure it’s my textures. When I examine a screenshot from the camera, I can identify where a uniform horizontal line narrows through a corner of the skybox, then returns to normal width farther out from the corner, indicating that I need to incorporate a distortion to compensate for the perspective error. (Which, to me, seems like a flaw in the skybox system, but I can’t say that I understand shader programming or the technical aspects of computer graphics).

To the Unity-using world at large, I’d like to suggest that if there were a tool in the assets store for converting custom 2d graphics to “properly distorted” skybox-ready textures, I’d buy it (depending on price). I see products for creating conventional skybox scenes, but I need to create a custom, alternate-reality appearance.

A skybox is simply an unlit cube of “infinite size” with six images mapped to the faces. It’s up to you to render these 6 images properly. There are many general tutorials out there for creating skyboxes in 3d apps or by hand in an image editing program.

I am going out on a limb because my knowledge of Unity’s sky boxes is sub-par – not of coding up sky boxes and other background shapes, just of Unity’s way of doing it – so take what I am about to say with many grains of salt. Someone more knowledgeable than this will probably weigh in with the correct details.

There is a matrix tweak that a programmer can do that will distort the textures enough to hide the corners in a flat texture map so that they warp correctly at the seams. Not all sky box code does this, for those that don’t it is expected that the artist should do this on their assets before inclusion in the game. I don’t know if Unity’s sky box does this or has an option to do this, you may want to dig around in the sky box options to see. The problem with providing this distortion ability built in to the sky box is that it is not generic enough to work for all types of texturing, sometimes you want those corners, many times you don’t.

There’s a built-in skyboxing system in “edit>render settings”. Just make a cube map.

Try to make your sky textures full rgb 24 bit, no compression. That may help.