I am not getting the expected result in this auto LOD attempt.
I am sure the lighting is wrong, but other than that, why is the alert never firing for finishing the LOD simplification process?
Hello! About the lighting, it’s dark because no environment was created and you have a GLB file, that uses PBR Materials which depend on an environment for most of the lightning. You can use scene.createDefaultEnvironment
to quickly create one. About the optimization, the answer lies on the structure of the model. It’s composed of separate models, which have a common root:
This root node (and the Sketchfab and Pink_cosmos nodes) don’t have any vertices, so the optimization does nothing on them. You have to iterate over the result.meshes array to run the optimization on the child nodes that have vertices: Auto LOD | Babylon.js Playground (babylonjs.com)
Thank you so much @carolhmj . Have a most peaceful and rewarding day!
You don’t need environment lighting if the model doesn’t have metallic surfaces. In your case, the point light is too dark to show anything. Increasing the intensity makes it work.
PG: https://playground.babylonjs.com/#2JBSNA#218
light.intensity = 1000;