So I’ve been trying to troubleshoot an issue with refractions not transferring over from Blender → glb → Babylon (as I noted in this forum post: Is it possible to test models with previous versions of the babylon sandbox without having to find a specific commit and clone it from github? - #3 by johntdaly7), and so I made a playground that emulates the Babylon sandbox setup to narrow down the issue.
The playground can be found here:
The refraction shows up fine in the Babylon sandbox, but in my code it does not. I realized that it is because the Babylon sandbox uses ImportMesh() function to load in the model, whereas my code uses LoadAssetContainer(). It seems LoadAssetContainer strips the refraction data from the mesh/material upon load.
Is there a way to add in the refraction data in the LoadAssetContainer parameter function, or would it just be lost? I assume that this issue has been known, because this issue no longer exists with Babylon 5.0.0-alpha.40.
If I want to still use 4.2.0, would I still have the ability to use LoadAssetContainer for this purpose? Or would I have to use some other load function? I know we chose LoadAssetContainer for a particular reason, but I cannot remember specifically why. Is there any benefit for utilizing LoadAssetContainer over the other functions? I think it was because LoadAssetContainer returns “assets”, which is broken into meshes, transformNodes, textures, lights, cameras, animations, etc. What would be the next best alternative?
Thanks for the help!