Hi Sebavan,
I made some samples to show you what I mean.
I did apply the solution you gave to me and it worked:
http://test.company-song.com/index02.html
Sourcecode as .txt: test - environment hidden
Without your Solution it looks like this:
http://test.company-song.com/index01.html
Sourcecode as .txt: Test - environment without
So it definitely improves the whole thing.
If I apply the:
var hdrTexture = BABYLON.CubeTexture.CreateFromPrefilteredData(“textures/environment.dds”, scene);
var currentSkybox = scene.createDefaultSkybox(hdrTexture, false);
and combine it with:
var skybox = BABYLON.Mesh.CreateBox(“skyBox”, 500.0, scene);
var skyboxMaterial = new BABYLON.StandardMaterial(“skyBox”, scene);
skyboxMaterial.backFaceCulling = true;
skyboxMaterial.reflectionTexture = new BABYLON.CubeTexture(“textures/environment.dds”, scene);
skyboxMaterial.reflectionTexture.coordinatesMode = BABYLON.Texture.SKYBOX_MODE;
skyboxMaterial.diffuseColor = new BABYLON.Color3(0, 0, 0);
skyboxMaterial.specularColor = new BABYLON.Color3(0, 0, 0);
skyboxMaterial.disableLighting = true;
skybox.material = skyboxMaterial;
it looks like this:
http://test.company-song.com/index03.html
Sourcecode as .txt: test - full reflexion
That example has much more reflections of the environment.
So Question 1 is if there is a way to achive the reflexion of /index03.html in /index02.html?
But as I see and realize in that examples. I think that the reflexions in /index03.html are sort of wrong and /index02.html is correct displayed. It’s just that in other 3D-Models, I used, the material-textures are less reflexive and so it looks better if I use the /index03.html way.
Question 2 and the “unsolved mystery” I still have is the BoomBox…
I use the example out of the Playground and added the:
var hdrTexture = BABYLON.CubeTexture.CreateFromPrefilteredData(“textures/environment.dds”, scene);
var currentSkybox = scene.createDefaultSkybox(hdrTexture, false);
Magically it shows the reflexion of the environment but not the environment.
http://test.company-song.com/index04.html
Sourcecode as .txt: Babylon.js sample code - boombox
Used 3D-File: http://test.company-song.com/scenes/BoomBox.glb
Do I use the same Code and just change the loadet 3D .glb, I get the full reflexions and the environment.
See here: Babylon.js sample code - test 3D
Sourcecode as .txt: Babylon.js sample code - test 3D
Used 3D-File: http://test.company-song.com/assets/test.glb
So I imagine it has to do with the loaded BoomBox.glb. It must have some sort of gimmick in it that overrides the environment.
That is what I try to solve and to understand. If I can make my test.glb do the same as the BoomBox.glb I can have the better reflexions and the invisible environment.
But I think if I use your solution and rise the reflexion of the material in the 3D-File it will work perfectly.
I’m just curious why the “magic” on the BoomBox happens.