Weird "skybox fog"

I just made a skybox filled with thousands of stars, they’re all evenly placed out across each image, so I’d expect them to look like that inside Studio. But whenever I look directly at the skybox’s edges, it seems like there’s some fog effect being applied to the skybox itself:

skyboxfog
(Click to play if the gif isn’t playing already)

Only when I look directly at the skybox’s side, the stars from the images’ edges show fully. It behaves just like fog - it doesn’t cover the things closer to the camera, but skybox’s edges are further away so they are being covered.


Reproduction

To reproduce this bug, simple night time won’t be enough, as the maximum star count is not enough to notice the fog effect. You will have to use a skybox similar to mine, where there are a lot more of stars. I will provide you with my skybox to allow reproduction. You can probably use some other, more efficient skybox to see this more clearly, but for now I only have the one from the gif.


1. Open up Studio and insert a Sky object into the Lighting:

image


2. Assign asset IDs

These are Sky’s properties which are needed to apply the skybox:image

Assign these asset IDs to Sky’s properties respecitvely:

SkyboxBk: rbxassetid://2570432999
SkyboxDn: rbxassetid://2570433005
SkyboxFt: rbxassetid://2570432998
SkyboxLf: rbxassetid://2570433000
SkyboxRt: rbxassetid://2570432997
SkyboxUp: rbxassetid://2570432996


You should now be able to see the skybox with stars, and you can now rotate your camera around to notice the skybox’s edges become darker, depending wheter you look at them or not.

I’m unable to tell if it was happening before, as I only just tested the skybox for my game and noticed it. I believe it isn’t related to my hardware, but if you think it may matter, please say so and I will provide my specifications.

P.S.
Note that this isn’t related to the fog inside Lighting settings, changing it’s properties doesn’t affect the “skybox fog”.

3 Likes

Just gave your post a quick skim. It sounds like your are not accounting for the warping of the edges of the skybox. If you make a 2d image with points scattered across it evenly, then use that image as faces of a box (like how the skybox is), you will experience non-uniformity when looking at it because parts of the surfaces are distributed differently when viewed with perspective.

The corners look faded because they are further away from the viewer than the center of the images. The stars in corners are smaller and dimmer from perspective. Roblox may want to implement skyspheres, or a method to artificially warp the 2d images in post to make them appear evenly distributed in perspective view.

6 Likes

That makes sense.
I will have to “spherify” my images then… somehow…

I implemented a simple gradient as skybox and to me it looks like studio is applying some sort of ambient occlusion that darkens the corners. You clearly see the vertical welds.


I guess they need to change the skybox shader to fix this.

Nah, that just looks like you just didn’t “spherify” the skybox textures to not look like a cube.

That’s just perspective, the only way to get around it is to make an illusion of a skyphere by modifying the textures to not look flat.

For exampe this skybox (spherifiedSkybox.rbxm (989 Bytes) ) looks spherical, even though it’s using 6 flat textures.

If you look at an individual texture, you can see it’s “distorted”, instead of being a simple gradient.
image

An easy way to “spherify” your textures is change it through a map projection conversion.
I personally use this software from NASA as it’s free and easy.
https://www.giss.nasa.gov/tools/gprojector/

Import your map like this:
image

and select “Gnomonic Cubed Sphere” projection

7 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.