Hey there,
As the title says, I’m having some difficulties adding my own sky box. When I use the provided skybox it works fine. But when I try to import my own files from 3D Space it doesn’t seem to work. I download the 6 pictures and rename as per the skybox3 example.
This works:
private createSkybox() {
// Specify the size of the skybox
const skyboxSize = 5000; // The size of the skybox
const skybox = MeshBuilder.CreateBox("skybox", { size: skyboxSize }, this.scene);
const skyboxMaterial = new StandardMaterial("skyboxMaterial", this.scene);
skyboxMaterial.backFaceCulling = false;
skyboxMaterial.reflectionTexture = new CubeTexture("textures/skybox/skybox3", this.scene);
skyboxMaterial.reflectionTexture.coordinatesMode = Texture.SKYBOX_MODE;
skyboxMaterial.disableLighting = true;
skybox.material = skyboxMaterial;
skybox.infiniteDistance = false; // Ensures the skybox moves with the camera
}
This doesn’t work:
private createSkybox() {
// Specify the size of the skybox
const skyboxSize = 5000; // The size of the skybox
const skybox = MeshBuilder.CreateBox("skybox", { size: skyboxSize }, this.scene);
const skyboxMaterial = new StandardMaterial("skyboxMaterial", this.scene);
skyboxMaterial.backFaceCulling = false;
skyboxMaterial.reflectionTexture = new CubeTexture("textures/space/space", this.scene);
skyboxMaterial.reflectionTexture.coordinatesMode = Texture.SKYBOX_MODE;
skyboxMaterial.disableLighting = true;
skybox.material = skyboxMaterial;
skybox.infiniteDistance = false; // Ensures the skybox moves with the camera
}
Also I noticed the skybox size doesn’t seem to to change anything even if skybox.infiniteDistance = false;
is set to true.
Can someone explain what I’m doing wrong here? Thanks in advance