Cube Map Skybox rendering issue

Hello again, I seem to be having problems setting a cube map for a skybox. Here is my code:

cubeMap = self.loader.loadCubeMap('/Users/blah/PycharmProjects/OrbitalSim1/3dModels/sandboxUni/cubemap/cubemap_#.png')
        self.spaceSkyBox = self.loader.loadModel('models/box.egg')
        self.spaceSkyBox.setScale(100)
        self.spaceSkyBox.setBin('background', 0)
        self.spaceSkyBox.setDepthWrite(0)
        self.spaceSkyBox.setTwoSided(True)
        self.spaceSkyBox.setTexGen(TextureStage.getDefault(), TexGenAttrib.MWorldCubeMap)
        self.spaceSkyBox.setTexture(cubeMap, 1)

This doesn’t throw an error however it doesn’t load any skybox images, as it just appears as the default colour I set the window to. Like it isn’t showing the images

Perhaps you forgot.

self.spaceSkyBox.reparentTo(render)

And also maybe you forgot to flip the normals of the model inward so that you can observe them while in the skybox.

To check this, cancel the scale of the model, and look from the side, in theory it should be visible.

1 Like