So im still a noob so please forgive my learning baby steps.
I bought LYS to make a .dds HDRI , im loading it and it works, i used createDefaultSkybox and I could see it there. I did also set scene.environmentTexture so it should be used for IBL.
I loaded a glb i created in blender and targeted one mesh in it and set the material to a PBR material , this works and if I change the albedoColor or roughness or mettalic I can see the changes happening. I can also see the HDRI in the reflection so it is affecting the material rendering.
What does have me stumped is as mentioned in the title , setting ambientColor or setting environmentIntensity does not have any affect , the mesh material looks exactly the same. What am i doing wrong here??
(ps another bizarre aspect of this test is that when I set the material the normals get all messed up? Why does setting a different material have any affect on the face normal direction? that should never be happening The normals are fine when the glb loads , after I set this material it looks like the get inverted , although it looks like it does invert them totally … if someone could explain why this is happening i would be grateful )
Here is the code :
var testMaterial = new BABYLON.PBRMetallicRoughnessMaterial("testMaterial", scene); testMaterial.environmentTexture = hdrTexture; testMaterial.albedoColor = new BABYLON.Color3(1, 1, 1); testMaterial.metallic = 0.105; testMaterial.roughness = 0.08; testMaterial.environmentIntensity = 0.1; testMaterial.ambientColor = new BABYLON.Color3(.5,.5,.5); testMaterial.backFaceCulling = false; mesh.material = testMaterial;