.dds Skybox right configuration, + problem on local development

Hi,
Till this day I have been using only one skybox texture: environment.dds. Now I want to create my own and understand what is hapenning:

https://playground.babylonjs.com/#Y7XMAR#38

I have some questions:

  1. why does the scene looks different when using line 17 instead of 18? and what does that mean? what is correct?
  2. Line 24: why does the scene looks different when using .clone() instead of using the same reference. For some reason some official PG use clone…
  3. On my local development using environment.dds I dont get any errors, but using any other .dds from the github textures folder I get this error:
    error
    that also happens when I use Runyon_Canyon_A_2k_cube_specular.dds (the one I am using in th PG)

thanks for the Help!

Pinging @sebavan

1 Like
  1. either you load the dds as a normal texture or you load it as a prefiltered one.
    Prefilter is the way to go for pbr: Use a HDR environment (for PBR) - Babylon.js Documentation

  2. Cause if you do not clone the texture coordinates would be modified for all the scene not just the skybox as intented.

  3. Would be nice if you could repro in the playground ?

hi thanks!

  1. So… does it make sense to use the assetmanager for this case? if I use line 17 …line 17 is using directly the .dds file on my assets folder right? and the loaded cube Texture is then never used? or I am missunderstanding something.? If so…how do i Make sure to use the loaded Texture for CreatefromPreFilteredData?

2.ah! I see

  1. This playground is based on my scene, I think is weird that environment.dds is the only file working on my side. I just download the scene and copy paste the .dds from: Babylon.js/Runyon_Canyon_A_2k_cube_specular.dds at master · BabylonJS/Babylon.js · GitHub
    to the textures folder…and I am still getting the error.?

thanks!

  1. yup you could use outside the the asset manager.

  2. Unfortunately hard to tell without code repro :frowning: It might be a server issue you should double check you do not have any 404 in the js console.

  1. so … is there a way to preload(assetmanager) a .dds file and use it with new BABYLON.CubeTexture.CreateFromPrefilteredData() ?

Your code should be ok as they would be shared by the cache I guess.

hi @sebavan So, I uploaded everything to glitch, line 63, works and line 62 throws me the same error as in my local development. Both .dds are being hosted in my github and I got them from the babylon repository.

(click on remix this)

thank you

This is totally normal cause Babylon.js/Runyon_Canyon_A_2k_cube_specular.dds at master · BabylonJS/Babylon.js

is not a preprocessed dds. It needs to be prefiltered as explained here: Use a HDR environment (for PBR) - Babylon.js Documentation

I am sorry but I dont understand.

I have the very same setups in babylon playground and in glitch.
babylon PG works with both .dds files and glitch only with one the .dds files.

But for simplicity we can stay in the playground that I updated
https://playground.babylonjs.com/#Y7XMAR#39
my github texture is the same i downloaded from the babylon folder and it doesnt work.
i am prefiltering in line 19,
… thanks!

And I was using the glitch thing to “try to prove” that it wasnt a server problem, since one .dds works there but the other doesnt… Both .dds are in the same github folder …

It is definitely a server issue:

look at the content of the file downloaded if you use this link. It is an html file.

ahhh! yes somehow the files i downloaded from github were being downloaded as “html” even if the files was ending .dds , thank you very much!