Jump to content

Rescale Skybox size


syed samoon
 Share

Recommended Posts

Hi Everyone,

i have a doubt. How to get big skybox.

i need the size 2500 is this possible

 

i'm using this script

 

skybox = BABYLON.Mesh.CreateBox("skyBox", 1000.0, scene);
var skyboxMaterial = new BABYLON.StandardMaterial("skyBox", scene);
skyboxMaterial.backFaceCulling = false;
skyboxMaterial.reflectionTexture = new BABYLON.CubeTexture("assets/skybox/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);
skybox.material = skyboxMaterial;
Link to comment
Share on other sites

Hi Syed Samoon !

Of course you could use
    var skybox = BABYLON.MeshBuilder.CreateBox("skyBox", {size:2500.0}, scene);
to have a big box used as a skybox.
You may have to play you camera.m[in/ax]Z to avoid clipping.

However, if what you really want is avoiding player to reach skybox frontier, I recommand you to use 

skybox.infiniteDistance = true;
instead.  
Think about disabling lightning for the skybox. It should not be in a shadowMap as well (the bigger the size of meshes in the shadowMap, the less pretty the shadow).
Link to comment
Share on other sites

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...