HDR skybox boilerplate code not working for me

I can’t get this simple HDRI (.dds) background code working in Visual Code (everything else is working fine):

*I don’t get any errors/warnings - simply nothing is happening in terms of environment texture for the background.

Thanks a lot for your ideas :slight_smile:

/textures/workshop_1k.dds does not exist :slight_smile:

:smile:
the code on playground is for easy reading (vs pasting a code chunk here), @sebavan
I actually have the texture file in my Visual Code setup:

Thanks a lot for your prompt reply btw, much appreciated!

Your code works https://www.babylonjs-playground.com/#VZM0U0#7 I suspect your dds to not be a cube or to not be prefiltered correctly

3 Likes

Thanks a lot @sebavan - so I also tried using the exact .dds image from the Playground sample (“SpecularHDR.dds”) - but I get this error:

Any ideas?

You should ensure your server supports serving dds in binary mode with the right mime type I guess ?

1 Like

So yes it does work on playground - but the very same textures don’t work on my Visual Studio Code → Live Server or on my local python3 HTTP server.

I wonder if you have any examples for how to resolve this - Playground is good for trying out snippets but developing a more full-fledged app on it doesn’t seem very efficient to me… Thus the need to resolve skyboxes, such an important part of any 3D environment.

Thanks a lot!

you should try simply with npx http-server a tiny node based server to see what you have. At least you could validate that you are simply not setting the path incorrectly for instance.