Git Product home page Git Product logo

Comments (9)

noname0310 avatar noname0310 commented on May 26, 2024 1

I have thought about this problem today, and I have come to the conclusion that it might be difficult to create a simple sample code for it. (It's not simple to load animation data to run, even if it's theoretically possible.)

Furthermore, I plan to support the following features in the near future to enable animation blending.

  • Support for animation blending in MmdRuntimeAnimation.
  • Load VMD files using Babylon.js Animation container.

From the information you've provided, it seems that ultimately you want to utilize MMD characters as player characters or NPC characters.

So, I will also provide automatic retargeting to allow humanoid animations to be used with MMD models.

from babylon-mmd.

noname0310 avatar noname0310 commented on May 26, 2024

MmdRuntime is designed to be compatible with Babylon.js's existing animation system.

It seems that your desired outcome involves manipulating a skinned mesh with MMD's runtime elements such as IK, and Physics and blending them into animations. In this case, by using MmdRuntime.createMmdModel, you can activate MMD's runtime and then utilize Babylon.js's animation system to animate the mesh. This approach would enable animation blending.

In conclusion, Babylon.js's animation system already includes blending, so utilizing it would solve the issue at hand.

If you're planning to blend multiple VMD animations, I can implement animation blending for you.

from babylon-mmd.

noname0310 avatar noname0310 commented on May 26, 2024

If you provide me with detailed information about the problem situation you're currently trying to address and the data you intend to use, I'll be able to consider various solutions.

from babylon-mmd.

jasondalycan avatar jasondalycan commented on May 26, 2024

Here's an example using Three.js MMDLoader where the MMD file transitions from idle -> walking -> running:

chrome-capture-2023-7-7 (1)

This uses animation blending. Are you able to provide sample code showing how using MmdRuntime.createMmdModel() and Babylon's animation blending can do this?

from babylon-mmd.

jasondalycan avatar jasondalycan commented on May 26, 2024

Thanks those will be very useful features.

from babylon-mmd.

noname0310 avatar noname0310 commented on May 26, 2024

Starting from babylon-mmd 0.26.0. It is now possible to blend animation using Babylon.js animation runtime.

There is no document yet and the sample code is here:
https://github.com/noname0310/babylon-mmd/blob/main/src/Test/Scene/babylonAnimationBlendingTestScene.ts

Read the codes and ask any questions

from babylon-mmd.

jasondalycan avatar jasondalycan commented on May 26, 2024

This is great! Thanks!

from babylon-mmd.

noname0310 avatar noname0310 commented on May 26, 2024

Since 0.27.0, it is possible to retarget any humanoid animation to an MMD skeleton.

I implemented this because I thought it might be in your potential requirements.

This will be documented quite a bit later, but if you're interested, ask in an issue and I'll show you how to use it in detail.

And animation blending support in mmd custom animation runtime will be implemented quite later. The reasons are as follows:

  • It's already possible with the animation runtime of babylon.js(and very easy to do since 0.26.0).

  • Since most MMD animations were not designed with animation blending in mind, I figured that very few of the assets distributed in VMD format would be available for animation blending.

from babylon-mmd.

noname0310 avatar noname0310 commented on May 26, 2024

The MMD animation runtime now also supports animation blending since 0.32.0. It's frame-perfect animation blending, so you'll need a bit of code to apply it to locomotion.

Here is an example code if you want to try it out
https://github.com/noname0310/babylon-mmd/blob/main/src/Test/Scene/compositeAnimationTestScene.ts

If you have any questions, please open a new issue :)

from babylon-mmd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.