Closed AlexanderProd closed 3 years ago
try using
const { scene } = useGLTF(url)
return <primitive object={scene} />
and see if the model shows correctly. if not the error must be with the c4d import. if it does show i would be glad if i could get that model so i can run tests.
try using
const { scene } = useGLTF(url) return <primitive object={scene} />
and see if the model shows correctly. if not the error must be with the c4d import. if it does show i would be glad if i could get that model so i can run tests.
Thank you, when I import the model like this it does show indeed.
I've attached the model as FBX and the GLTF export from Cinema. Archiv.zip
EDIT: Reuploaded the archive with the native C4D file.
just a precision issue, the model is tiny, so it cuts off digits.
npx gltf-pipeline -i UR3e.gltf -o scene.glb --draco.compressionLevel=10
npx gltfjsx scene.glb -p=6
(added draco here to shrink it, 4mb was quite big)
https://codesandbox.io/s/basic-demo-forked-dp92s?file=/src/App.js
@drcmda Thanks a lot! I spend two days trying to figure out whats wrong with my model. It works perfectly now, out of curiousity, what was the problem with the joints?
As I said, precision. If you look over your code you'll see scale={0} so it practically hid them. It uses two digits after the point by default, so 0.00123 end up being 0. By increasing digits this goes away. I'd still rather increase the model in the modeling software though.
I've got a rigged model which includes a lot of joint objects, unfortunately I've noticed that all the objects which are behind a joint are not visible in the scene. They become visible when I delete the joint.
This is what my model looks like
This is what the object tree looks like in Cinema 4D.
The Child objects are regular Polygon objects.
This is what my model looks like in the browser when I load the generated JSX file. As you can see only the part which is not a child of a joint is visible.
I'm not sure if theyre not even included in the generated JSX file or simply not shown in the browser.
I'm wondering how I can fix this since I need the joints for an animation.
I can upload the model as Cinema 4D, FBX, OBJ or GLTF file.