Closed ghost closed 2 years ago
you can try the "-a" options now, or "--aggressive". and it really is aggressive, i'm a bit scared it could kick something over when making it the default. it goes further than your manual attempt:
<group ref={group} {...props} dispose={null}>
<mesh
geometry={nodes['Icosphere001_mattree-elm_0'].geometry}
material={materials['mat.tree-elm']}
position={[-318.77, 438.34, -322.15]}
rotation={[-Math.PI / 2, 0, 0]}
scale={100}
/>
</group>
Thanks! Tested it with another model and the output is a lot cleaner.
<group ref={group} {...props} dispose={null}>
<mesh geometry={nodes['Icosphere000_mattree-laurel_0'].geometry} material={materials['mat.tree-laurel']} rotation={[-Math.PI / 2, 0, 0]} scale={100} />
</group>
I've noticed after converting that sometimes there are a lot of unused tags.
For example, this tree: https://sketchfab.com/3d-models/elm-tree-low-poly-1445aa109a344dc6963a123fd0fe48ac
results in:
But I've manually cleaned it up to this and it's still working fine.
Using this command for the conversion
npx gltfjsx scene.gltf --types
It could be the result of a 'messy' export or conversion in the model, I've come across this often. Perhaps the tool can do a post cleanup, removing empty/ useless groups.