Animating a MakeHuman character using BVH files in Three.js

My goal is to animate a mesh through its skeleton using a BVH file on a webpage. Here's my process:

  1. Create a character in MakeHuman and export it (I find mhx format works best).
  2. Import the character into Blender.
  3. Retarget the character to a BVH using the MakeWalk plugin for Blender.
  4. Export the character to JSON using the Three.js exporter.
  5. Export the BVH file (not sure if this step is necessary, but I want to ensure the BVH matches the retargeted skeleton).
  6. Load the character onto a webpage using Three.js
  7. Animate the character using a BVH file.

The animation looks great in Blender. My issue arises when I try to utilize the JavaScript BVH viewer code mentioned here. I modified the code to use the MakeHuman skeleton instead of creating one from the BVH data, but when I attempt to animate the character on the webpage, it becomes distorted.

Here is how the animation should look (more or less) as rendered from Blender:

And here is the distorted result displayed on the webpage:

Clearly, the animation is completely off. I even had to zoom out significantly to view the entire image.

I have tried various rigs, file formats, resaving the BVH after retargeting, among other solutions. I also attempted to follow the example provided here, but encountered issues when deleting armature modifiers as instructed - this resulted in no bones being exported and Three.js throwing an error.

I am stuck at this point. Is there an updated example available that demonstrates how to achieve what I am attempting to do?

Answer №1

I encountered a similar issue while transferring files from Blender to Three.js. To resolve the problem, I found success by double-checking in Blender that all object rotations had been applied (using ctrl-a) after following step 3 on your list. Essentially, both the skeleton and mesh should not have any extra rotations or scaling applied.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

I find it hard to understand AngularJS $scope

I've been struggling with this for hours and could really use some help. I have a .json file containing 100 products structured like this: [{ "ean": "3613132010420", "brand": "NewBrand", "desc": "A description", "feature1": "", "f ...

When navigating through a view in backbone.js, ensure to include an argument in the routing process

Looking to include an argument while routing within a Backbone.js application Below is the script: var AppRouter = Backbone.Router.extend({ routes: { 'toolSettings/(:action)' : 'toolSettings' } }); var initialize = function ...

Creating a form in Vue that dynamically generates checkbox options

In my Vue application, I have a dynamically generated form with v-models within a loop. Everything is working correctly except for checkboxes. The issue I am facing is that the v-model is affecting all the loops instead of just one, unlike with the input t ...

What is the best way to stop a vimeo video within a dynamic iframe?

I have a collection of items that trigger the loading of an iframe when clicked. I want to ensure that only one iframe is open at a time, and when a new one is opened, the previous one should pause if it is playing. Although I have attempted to implement ...

Retrieve the value of the object within the mysterious index loop in JavaScript

I have retrieved search results from the data, and each time the index of my search result varies. At one point, the result may appear in the 4th index, while at another time it might be in the 100th index. How can I retrieve the rank value from within t ...

Having trouble getting ThreeJs OrbitControls to function properly in ReactJs

import { OrbitControls } from "three/examples/jsm/controls/OrbitControls"; extend({ OrbitControls }); const Orbit = () => { const { camera, gl } = useThree(); return <OrbitControls args={[camera, gl.domElement]} />; }; function App ...

Which is better: JavaScript, Json, or Html?

When working with an ASP.NET MVC view and using jQuery AJAX to update a div, the decision on whether to use a controller that returns a PartialView or JSON can depend on various factors. Consideration for both user experience and system performance is im ...

What is the best way to sift through an array containing arrays?

Looking for help with filtering and pushing data from a JSON array? Specifically, I need to filter arrays where the data's attrs property includes a src attribute. It's proving challenging for me, so any assistance would be greatly appreciated. ...

Vue 3 gracefully handles errors by displaying an alternative component

I am currently developing a rendering library for my Vue 3 + Vite project. Essentially, I have a JSON array of products which I pass to a special <Render :products /> component. This Render component reads all the JSON products and converts them in ...

Ways to prevent the use of the JavaScript increment (++) or decrement (--)

I have created two functions for a multi-step configuration on a webpage. protected clickNext(event:any, config:any) : any{ this.activeIndex++; } protected clickPrev(event:any, config:any) : any{ this.activeIndex--; } Here are the buttons: < ...

Is there a way to determine if a JavaScript method is compatible with my current Node.js version?

Looking to implement the reduce() method in my Node.js application, but I'm unsure if it's compatible with my current version 4.2.6. Is there a way to safely determine if I can use this method without causing any issues? Appreciate any help on t ...

Using JWT for my React-Redux application's server side authentication

As a newcomer to the world of react and redux, I have been searching for answers but all I find is information on server-side rendering. However, that's not what I'm looking for (please correct me if I'm mistaken). What I really need help wi ...

Styling Result received from Web API call within an array

I am currently working on a function call that retrieves the result of an SQL query in an array format. app.get('/alluser', (req, res) => { console.log("All Users") user.getAllUsers(function (err, result) { if (!err) ...

Navigating with React Links in the wrong context is not possible

Currently in the process of setting up react-router, I have encountered an error stating Uncaught Error: <Link>s rendered outside of a router context cannot navigate.. Despite scouring through various resources on Github and here, none of the solutio ...

JavaScript allows the "Enter" key to perform a specific action

Currently utilizing Bootstrap and jQuery for my project. Encountering an issue where pressing the enter key after filling in the tracking field does not trigger any action, as I am not using the form attribute. However, when I input something and click the ...

Pressing an HTML button can enable and disable the pause and resume functions

Currently, I am working on an audio player where I need to implement functionality to pause and resume the playback. I have already set up the pause() and resume() functions in my script. The issue I am facing is related to the HTML button that triggers th ...

Fetching all data from a SQLite database in a Listview using React Native

I have been utilizing the library found at https://github.com/andpor/react-native-sqlite-storage in my react native project. To retrieve a single row from the database, I use the following code: db.transaction((tx) => { tx.executeSql('SEL ...

Strip all null entries from the URL string

I'm attempting to eliminate all empty parameters from a URL string. This is how my URL appears: http://localhost/wm/frontend/www/?test=&lol=1&boo=2 The desired output from my code should be: http://localhost/wm/frontend/www/?lol=1&boo=2 ...

The functionality of the jQuery .click method appears to be malfunctioning within the Bootstrap

It seems like my JQuery.click event is not functioning as expected when paired with the corresponding button. Any ideas on what might be causing this issue? Here's the HTML CODE snippet: <button id="jan7" type="button" class="btn btn-dark btn-sm"& ...

Save JSON data from Javascript to a file on the server without using a server-side application

I am currently working with a .js client and need to save an object to a file on the server. This is new to me as I am not familiar with file i/o using JavaScript. My plan is to utilize jquery and json for this task, and I am using java serverside. Althoug ...