Exporting cubemap or .env reflections to GLTF

using PBRMaterial, we’re having trouble exporting GLBs with environment reflections. The env reflecitons do not show up when re-importing the GLB in either the BJS sandbox or other gltf viewers.
(we’re using reflectionTexture with .envs.
Babylon.js docs)

seems like the GLTF spec supports reflectionTexture , is there a different way to do this?

-Anupam

cc @alexchuber

1 Like

There is no way in glTF to specify material-specific environment maps, so it makes sense that PBRMaterial.reflectionTexture doesn’t export. There’s been some discussion about adding something like it here, but to my understanding, the conversation instead led to EXT_lights_image_based. It’s for scene-wide environment maps, and is not currently supported by the glTF exporter.

When you say that the spec support reflection textures, any chance you’re thinking of specular reflection maps? We export those from the similarly-named property PBRMaterial.reflectanceTexture as KHR_materials_specular.

2 Likes

EXT_lights_image_based came before the other discussions and was just something that Adobe needed in their products which uses Babylon.js. It’s a vendor extension. There is currently no extension in active discussion for generic IBL that I’m aware of.

1 Like

OMG. that is a great test for people with dyslexia. reflection vs reflectance ,lol We will try reflectance texture. That might be the ticket, thanks a bunch.

1 Like