Just wondering if anybody can help me. I’m using Next.js and React Three Fiber to display some custom models. I’ve tried exporting the model with a variety of different settings using different softwares. When I import the models into my scene they have no geometry. I am wondering if this is a loader issue or an export issue?
When I log the object to the console, there is no geometry node, compared to a .glb I found online that seems to be working in the same scene:
The second viewer in the list uses three.js. So there seems to be a problem with your app. Any chances to share a live example that demonstrates the issue?
Thank you and of course. In the meantime in the question I uploaded two screenshots comparing my model to the R3F glTF parrot, where my model (along with some others I tried) don’t have any geometry node
that’s not how it works. the example was using gltfjsx (https://github.com/react-spring/gltfjsx). it extracts the scene-graph and it’s specific to the model. sphere.gtlf has another graph, it doesn’t fit.
which is shorthand for (well, plus it uses suspense so you can manage async assets):
const [model, set] = useState()
useEffect(() => new GLTFLoader().load(url, set), [url])
return model ? <primitive object={model.scene} dispose={null} /> : null
you can look into gltfjsx if it interests you, it most certainly has advantages. but nothing in r3f should distract you from how threejs works. when in doubt, always do it like it’s written in the threejs docs.