Is there a way to mask a mesh with a texture from skybox


I looked through the documentation but wasn’t quite sure if I missed something.

I have a skybox made with 360 render.

I import just the floor as 3d model but all the objects that should be on the floor ( like table and chairs ), obviously appears behind that. ( as you can see from the image )

[test skybox]

Is it possibile to mask the floor with a 360 texture so i can see chairs, table etc?

(Babylon.js sample code)

Thank you for the assistance!

I don’t see how it can work as your table/chairs are part of a cube texture, so there’s no depth information attached to them. You could draw a face of the cube before of after the 3d floor but you can’t “interlace” them (or maybe you could make the floor in the 3d cube transparent so that drawing the 3d floor before the cube would make it work).

1 Like

I think i find the solution,

i will use two overlapping skybox with two different mask ID, one for the floor and one for all the rest.
So i can select just the floor and change the texture

@Evgeni_Popov thank you very much for your answer