Environment creation


right now I am working on an environment. Two questions came up.

I want to use .env textures but to automate the process I would love to be able to convert dds and hdr files on my own. I know that it is possible to create a env texture in the playground. But am I able to use the code behind this in my own project?

How is it possible to place the model directly on the ground of the environment/skybox. It should look that the model is really in this environment and not flying around. I tried to move the skybox up until the model is on the ground but that breaks the perspective of the environment unfortunately.

Thank you!!


Pinging @sebavan

About first you can create them by tool like here: Babylon.js/toolsTabComponent.tsx at d18504fd8d056de2fc83677073acd91738f1d7c2 · BabylonJS/Babylon.js · GitHub

and about 2 not really cause environment is meant to represent lights from infinite distance but you could add a plane to simulate your ground.

  1. That looks promising. I will use it. Thank you!

  2. Of course it won’t work with every hdr but I you can see it in this Video for example: https://youtu.be/_jByN1csVT0
    The porsche configurator on their website shows a scene with the car on the floor in the environment. It would be nice to achieve something like this.

but in the example the ground is a model not the skybox bottom (look at the pavement) :slight_smile:

1 Like

Good catch :grinning:

I am convinced that a watched a video some weeks before that presented this effect without a model. Unfortunately I can’t find it.

But anyway will give this solution a try: https://youtu.be/nnfD85cRxbE


1 Like