sorry for a possible newbie question. I’m using three js in react-js-fiber and the mesh looks distorted after import. I forket this demo r3f bones - CodeSandbox and only changed the mesh and texture and it looks like this (not resembling the original mesh in any way plus the texture seems to be missing too).
the mesh should look like this
I checked my normals, removed doubles, applied rotation, scale etc. Maybe I’m missing something? I’m using blender 2.90.1 and the gltf exporter. The file loads correctly to babylon.js and gltf viewer, only one warning pops up
NODE_SKINNED_MESH_NON_ROOT Node with a skinned mesh is not root. Parent transforms will not affect a skinned mesh. /nodes/410
Could this be the issue? Thanks a lot for any help.
EDIT: I forgot to mention the rig was created with rigify. Maybe that’s causeing the issue?
Seems like the issue was really the rig created by rigify. I made a test rig with one bone and it imports correctly. BUT there still seems to be some issue with the material/texture. There are some weird black spots/patches on the mesh and they don’t disappear even if I change the color of the object.
There should be no doubles or flipped normals, as the mesh looks correctly in babylon/gltf viewer.
I figured it out. I referenced the wrong bone for the primitive component. But still I’m struggling with new and new issues as I go on. I wasn’t able to figure out the solutions yet.
- There are weird patterns/stripes, it looks like light is reflecting the wrong way at those spots.
shape keys are ignored in animation. I make sure I export them in blender but they don’t appear in three js. Do I have to enable them somewhere?
I have a hard time adding a glossy and specular map (in three js it’s called roughness and ambient occlusion map if I’m correct). I’m confused about the instructions - what’s a second set of UV’s? I tried to make a map with data only on the green or red channel for both types of maps but it doesn’t seem to do anything. Is there a working example somewhere?
And one more thing, I’m using hair cards with alpha maps and it behaves unexpected at some faces - some faces are completely transparent but they sould’t be. Looks corrects in blender.
Thank you a lot for any suggestions.
I solved issue 4 with adding depthWrite: false
Oh I noticed in my console an error that has something to do with my shape keys/morph targets. But I don’t know how to interpret it.
THREE.PropertyBinding: Trying to update property for track: horse-mesh.morphTargetInfluences but it wasn't found.