Jump to content

[Solved] Skybox config issue


Snouto
 Share

Recommended Posts

Hi guys

I've just set up a regular ol'skybox for my scene exported from blender. The scene has a scale of 10 along the X and Y and 5 along the Z in blender. The skybox code is as follows;

var skybox = BABYLON.Mesh.CreateBox("skyBox", 100.0, scene);
                var skyboxMaterial = new BABYLON.StandardMaterial("skyBox", scene);
                skyboxMaterial.backFaceCulling = false;
                skyboxMaterial.reflectionTexture = new BABYLON.CubeTexture("textures/skybox", scene);
                skyboxMaterial.reflectionTexture.coordinatesMode = BABYLON.Texture.SKYBOX_MODE;
                skyboxMaterial.diffuseColor = new BABYLON.Color3(0, 0, 0);
                skyboxMaterial.specularColor = new BABYLON.Color3(0, 0, 0);
                skyboxMaterial.disableLighting = true;
                skybox.material = skyboxMaterial;
                skybox.renderingGroupId = 0;

So far, so ordinary. The problem is when babylon renders the scene. With a particular zoom of the camera (camera is also exported from blender btw) it appears like the attached. Normally there's no issue using the skybox code shown above, this is the first time i'm seeing something weird. i thought maybe the 100.0 value in the createBox constructor was too small and so the camera was clipping part of the cube, but increasing it above 100 just makes the black area larger until it envelopes all. Reducing that number makes the cube smaller to the point where it's visible as a cube in the scene, which obviously isn't ideal.

Am I missing something obvious here?

Cheers!

 

 

skybox_wierdness.jpg

Link to comment
Share on other sites

  • Snouto changed the title to [Solved] Skybox config issue

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...