Trouble with loading bvh animation, coordinates messed up

I downloaded mixamo dataset from here. which is in bvh format. downloaded standard x bot model from mixamo. which is a fbx file. When I load the bvh file use BVHLoader from “three/examples/jsm/loaders/BVHLoader.js”, the coordinate system got messed up. Any help is appreciated.


BVHLoader just loads a skeleton and animation clip. Please show how you bind the skeleton to the skinned mesh loaded via FBXLoader.

I don’t understand what do you mean by “bind the skeleton to the skinned mesh loaded via FBXLoader .”, the bones in the bvh file should be same as the bones in the FBX file, I just add prefix to it. Here is my code, any other information I can provide?

Promise.all([
			loadFBX(`/fbx/${model}.fbx`),
			loadBVH(`/bvh_no_character/${anim}.bvh`),
		]).then(([fbx_model, bvh_data]) => {
			anim_mixer = new THREE.AnimationMixer(fbx_model);

			threeScene.scene.add(fbx_model);

			const tracks = bvh_data.clip.tracks.map((track) => {
				const new_track = track.clone();

				new_track.name = "mixamorig" + track.name;

				return new_track;
			});

			bvh_data.clip.tracks = tracks;

			console.log(bvh_data.clip);

			anim_action = anim_mixer.clipAction(bvh_data.clip);

			anim_action.reset();

			anim_action.setLoop(THREE.LoopRepeat);

			// keep model at the position where it stops
			anim_action.clampWhenFinished = true;

			anim_action.enabled = true;

			// anim_action.fadeIn(0.5);

			anim_action.play();
		});

I checked the BVH example, here is the result of play the animation on the bvh skeleton. So now the problem is how to map the bones from bhv to another model with the same bone structure; or somehow replace the bones in another model

const result = bvh_data1;

			const skeletonHelper = new THREE.SkeletonHelper(
				result.skeleton.bones[0],
			);
			skeletonHelper.skeleton = result.skeleton;

			var boneContainer = new THREE.Group();
			boneContainer.add(result.skeleton.bones[0]);

			threeScene.scene.add(skeletonHelper);
			threeScene.scene.add(boneContainer);

			// play animation
			anim_mixer = new THREE.AnimationMixer(skeletonHelper);
			anim_action = anim_mixer
				.clipAction(result.clip)
				.setEffectiveWeight(1.0)
				.play();