Comments (9)
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.
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.
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.
Here's an example using Three.js MMDLoader where the MMD file transitions from idle -> walking -> running:
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.
Thanks those will be very useful features.
from babylon-mmd.
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.
This is great! Thanks!
from babylon-mmd.
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.
-
Here is the code that uses the
AnimationRetargeter
to retarget the mixamo animation to the MMD skeleton and then serialize it to JSON to save it:
https://github.com/noname0310/babylon-mmd/blob/main/src/Test/Scene/humanoidAnimationTestScene.ts -
And here's the code to load the json serialized
AnimationGroup
into the mmd skeleton:
https://github.com/noname0310/babylon-mmd/blob/main/src/Test/Scene/babylonAnimationLoadTestScene.ts -
Here is what the retargeted animation looks like. The mixamo skeleton is on the right and the mmd skeleton is on the left:
2023-09-15.13-20-37.mp4
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.
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)
- Whether there are plans to support vmd animation HOT 5
- The project won't work HOT 16
- How do I drive the model HOT 12
- Physical engine drive problem HOT 14
- A Big Shoutout to the Amazing babylon-mmd Repository! HOT 1
- Whether there are plans to support the pmd format HOT 4
- Model texture .tga format supports HOT 9
- Uncaught TypeError: Cannot read properties of undefined (reading 'errorTextureDatas') at _MmdAsyncTextureLoader._addErrorTextureReferenceCount HOT 3
- Texture load/shader compilation delay HOT 17
- The model in the form of file cannot be loaded normally HOT 1
- Whether other character models can load vmd animation format HOT 3
- Submesh optimization HOT 3
- About Light Sources HOT 4
- Is there a way to bind or attach a pmx model to the bones of a character model? HOT 1
- Animation timescale modification HOT 1
- Integrating BPMX Model Files into Private PNG Chunks to Display Previews HOT 4
- Hair is flying arbitrarily around HOT 5
- BPMX and BVMD directly from the application HOT 2
- Original MmdMesh Object Fails isMmdSkinnedMesh Check After Creating MmdModel HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from babylon-mmd.