FBX Animation
#1349
Replies: 1 comment 4 replies
-
gltf has a different workflow than fbx. you can do useLoader(FBXLoader, url) but the output is not the same as for gltfloader. i think it just returns the scene. useLoader in general is just using plain three.loaders, all it does is that it wraps it into suspense but otherwise it is the same thing. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
I have been attempting to import an FBX model following this tutorial on mixamo / blender. https://codeworkshop.dev/blog/2021-01-20-react-three-fiber-character-animation/
When I import my glb file into the gltfjsx package (https://www.npmjs.com/package/@react-three/gltfjsx), it seems like the upload doesn't work. My glb file is using the exact same export settings as in the video, but I am not sure if my FBX is set up correctly to be imported this way. I am able to successfully import my FBX animation and model using Three.js, using the THREE.FBXLoader and THREE.AnimationMixer.....
import React, { useRef, useEffect } from 'react'
import { useGLTF, useAnimations } from '@react-three/drei'
export default function Model(props) {
const group = useRef()
const { nodes, materials, animations } = useGLTF('/tauntTESTtwo.glb')
const { actions } = useAnimations(animations, group)
useEffect(() => {
console.log(actions);
actions.taunt.play();
});
return (
<group ref={group} {...props} dispose={null}>
<group rotation={[Math.PI / 2, 0, 0]} scale={[0.01, 0.01, 0.01]}>
)
}
useGLTF.preload('/tauntTESTtwo.glb')
I import my animated character into the scene using Suspense
Beta Was this translation helpful? Give feedback.
All reactions