Skybox pixelated

Hi! Feeling a bit silly, because this issue is documented, anyhow i still run into the problem of a pixelated skybox. I’m using a custom cubemap and already override the import settings in unity, I’ll attach some further screenshots for clarification.
I already tried adding the additional SkyboxExportSettings, but no luck.
Any help would be appreciated :slightly_smiling_face:



Original Post on Discord

by user 263717937473519619

Hey :wave: this component can override the skybox resolution, perhaps you have it in the scene somewhere?
image.png

Or you can set the desired resolution with it.

just checked again, there’s no other reference to skyboxExportSettings in my scene, and even if i try to set the resolution that way, I’m still get the same result
Bildschirmfoto_2023-11-03_um_11.50.10.png

by user 263717937473519619

And what do you dislike about the result the most? The low res or the color banding.
image.png

Can you check the default import settings and make sure to not have a lower import resolution there?

color banding is not great but I’m mostly concerned about the bluriness

by user 263717937473519619

@marcel :cactus: are you talking about these default import settings?
Bildschirmfoto_2023-11-03_um_11.55.23.png

by user 263717937473519619

if i bump it up to 8192 i would be concerned about the size of the output file, i mean 2048 is already pretty big

by user 263717937473519619

another workaround i have thought of would be to add a gaussian blur in photoshop

by user 263717937473519619

Can you put the same texture on a plane and see the quality there?

yep, looks fine there :slightly_smiling_face:

by user 263717937473519619

Could you report this as a bug and then we can get to a workaround?

just uploaded :slightly_smiling_face:

by user 263717937473519619

awesome :+1:

Option A (the simplest), is to have your own mesh acting as the skybox: https://sketchfab.com/3d-models/360-panorama-mapped-onto-a-sphere-511e40baf29147769ae30d7e19fc9431

Option B, would be to assign the skybox in runtime.

thanks, I’ll try to assign it during runtime and see where it gets me

by user 263717937473519619

Hi @cetaryl did you have any luck so far?
Can you try if the following script works for you?

export class MyScript extends Behaviour {

    //@type UnityEngine.Cubemap
    @serializable(Texture)
    mySkybox?: Texture;

    start() {
        if(this.mySkybox){
            this.mySkybox.mapping = EquirectangularRefractionMapping;
            this.context.scene.background = this.mySkybox;
        }
    }
}

yes, that works, thank you. I’m still trying to figure out how to fix the low resolution though

by user 263717937473519619

Hello @cetaryl turns out that this is a issue in threejs Using a texture as `scene.background` is blurrier than it should · Issue #27501 · mrdoob/three.js · GitHub

Oh well, good to know :sweat_smile:

by user 263717937473519619