I’m following the tutorials and to train a bit I downloaded a gltf model and tried to animate some nodes.
Here a screen of what I got printing node graph on the console:
I’d like to animate the mill wheel.
I expected it to be an independent node, but it happens
m_House_Material_#1_0 → object containning only the wheel blades
m_House_Material_#81_0 → object containing the wheel structure and the whole house
Is there a way to somehow split wheel structure from the whole house?
Or should I do it in a 3D editor and export the modified model?
you have to do it in blender. that’s the main downside with gltf, it’s a black box and re-defining its structure is not easy. in the off chance that you use react, this is the only exception that i know of: GitHub - pmndrs/gltfjsx: 🎮 Turns GLTFs into JSX components because there the gltf is being treated like a svg, it is immutable and declarative so you can re-arrange its contents freely. but in vanilla, no chance, use blender.
Agreed that simplifying a model in Blender is a good idea if possible (with any format that supports multiple meshes, not just glTF), especially if you can merge objects and have fewer draw calls.
But if you did want to flatten or rearrange objects in plain three.js you can; the parent.attach() method might be what you’re looking for here.