Hey everyone! I am having trouble loading a custom glb model in three js. I have added logs when importing and everything looks fine but the model doesn’t appear in the scene. I have tested the same importing pipeline with another glb model and it works fine. I think the problem is related to the glb file I’m loading but it’s hard to know why because I get a good console log with meshes and materials. Could anyone try and load the model and help me find the problem it would be much appreciated!
#Loading a custom glb file
3 messages · Page 1 of 1 (latest)
- Make sure you have lights in the scene
- Make sure the model is not too small and not too big for the camera to see it
- Make sure camera is looking at the model, if it’s off-center
- Does the model render here? https://gltf-viewer.donmccurdy.com/
Drag-and-drop preview tool for glTF 2.0 3D models.
One of the problems I had with importing glb and fbx files was, that the scale was too big. scaling the mesh to 0.01 helped ( model.scale.setScalar(scale) ). I'm sure this can be circumvented by setting the scale correctly in the 3d program before exporting the model.
If your using Blender, try "apply all transforms" (CTRL + A I think) to the object before exporting. Also experiment with 'apply transforms' in the export dialog on the right side in the properties accordions