scale GLTF correctly #844
-
How do you scale GLTF model ? const { nodes, materials } = useGLTF("models/kurvStrait.gltf", false) Not scaling |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 7 replies
-
Scale scales the object, all three are correct and will work. Most likely "size" contains wrong data. Btw if size is an array, scale={size} is enough. |
Beta Was this translation helpful? Give feedback.
-
Blue Wire basket: GLTF format 3d max 2017 Units: Lightning Inits: International Dimensions: 1,1,1 Scale factor: 100
Red Wire basket: FBX format 3d max 2017 Units: Lightning Inits: International Dimensions: 1,1,1 FBX format Binery FBX 2014/2015
As you can see Blue wire basket is scaling wrong and has other axis. They are supposed to fit in the Turquoise frame witch is 0.35 in width and 0.4 in depth. This scales and rotate it correct, but then I can't change material or color ! Anyone have any ideas ? |
Beta Was this translation helpful? Give feedback.
-
In my codesandbox: https://codesandbox.io/s/awesome-water-85y6m?file=/src/App3D.js I want them all to be the width and depth of the grey column, because i want to be able to change size of each. The .fbx file scale same as the grey column but rotates the wrong way when i implement it with mesh geometry or bufferGeometry. The .gltf file will not scale as the grey column when i implement it with primitive object, mesh geometry and bufferGeometry. Any tips are appreciated. |
Beta Was this translation helpful? Give feedback.
-
It was the 3d studio max 2017 export problem I fixed the fbx mesh rotation problem by changing the pivot rotation in 3d max like in the video. Then I fixed the gltf file size problem by not exporting it from max but uploading the fbx file to this converter: |
Beta Was this translation helpful? Give feedback.
-
^ This seems to be something not good. |
Beta Was this translation helpful? Give feedback.
It was the 3d studio max 2017 export problem
I fixed the fbx mesh rotation problem by changing the pivot rotation in 3d max like in the video.
https://youtu.be/W4FaK9Rp2Gc?t=46
Then I fixed the gltf file size problem by not exporting it from max but uploading the fbx file to this converter:
https://blackthread.io/gltf-converter
and convert it to gltf.