Is this a bug? Index of Refraction & Volume Index of Refraction should both use the KHR_materials_ior property in glTF?

Hello! I’m trying to figure out why two different glTFs, one from Khronos and one exported by me from Blender 3.4.1, behave differently concerning IOR for transmission (“Volume Index of Refraction”) in BabylonJS, whle both use KHR_materials_ior.

In the Khronos example, the KHR_materials_ior is 1.5. In BabylonJS, both “Index Of Refraction” and “Volume Index of Refraction” are indeed 1.5. I can’t find another 1.5 value in the glTF so I assume they both use the same one.
https://sandbox.babylonjs.com/?assetUrl=https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Models/master/2.0/IridescentDishWithOlives/glTF/IridescentDishWithOlives.gltf

In the Blender export example though, the KHR_materials_ior is ~2.45, but in BabylonKS only the “Index Of Refraction” value is 2.45. The “Volume Index of Refraction” defaults at 1.0.
https://sandbox.babylonjs.com/?assetUrl=https://raw.githubusercontent.com/kokotron/test/main/test_transmission.gltf

Can someone explain to me why this happens? Is it because of the transmission thickness values existing in the Khronos glTF? You can check the corresponding gltf contents from the urls above, the gltf urls are in them.

I think it is because on one of the model it is used in conjunction with KHR_materials_volume and not the other one as you can see here KHR_materials_volume

2 Likes

https://docs.blender.org/manual/en/latest/addons/import_export/scene_gltf2.html#volume

1 Like