How to add world background

Hello guys,

I work in the development of an interactive 3d visualization, and I want to add sky and ground to my interface (I’ve a metro station fly in white background :stuck_out_tongue: ).

like this one : Interface interactive

Thank you :slight_smile:

Anes

You need to ad a sykbox.
https://doc.babylonjs.com/how_to/skybox

thanks @oglu and how about the ground (with virtual objects) like in the demo ?

Ad the ground like you would add the objects.

In this app’ our skybox is a 3D model (made in Blender). Of course ground & all other objects are 3D models too.

You can also leverage that:

var envTexture = new BABYLON.CubeTexture("/assets/textures/SpecularHDR.dds", scene);
scene.createDefaultSkybox(envTexture, true, 1000);

Ex: https://www.babylonjs-playground.com/#BH23ZD#1

Even more powerful:

scene.createDefaultEnvironment()

Doc: Fast Build a World - Babylon.js Documentation