Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I drive the model #4

Closed
spencer17x opened this issue Jul 6, 2023 · 12 comments
Closed

How do I drive the model #4

spencer17x opened this issue Jul 6, 2023 · 12 comments
Labels
question Further information is requested

Comments

@spencer17x
Copy link

If I have some data about my face and body, how do I drive the model

@noname0310
Copy link
Owner

I don't know what data you're talking about. You need to be more specific.

Everything loaded by the loader conforms to the specifications of Babylon.js.
Therefore, most of the things you want can be solved based on the documentation of Babylon.js.

@spencer17x
Copy link
Author

Whether a general method can be provided for manipulating bone or deformation,like:https://github.com/virtual-cast/babylon-vrm-loader/tree/master

@noname0310
Copy link
Owner

That is the interface that is possible because the vrm bone structure is guaranteed to be constant.

PMX cannot create such an interface because of its free bone structure, and even if it can, such an interface adversely affects performance and bundle size.

@noname0310
Copy link
Owner

@noname0310 noname0310 added the question Further information is requested label Jul 6, 2023
@spencer17x
Copy link
Author

spencer17x commented Jul 6, 2023

What does 'the vrm bone structure is guaranteed to be constant.' and 'PMX cannot create such an interface because of its free bone structure, and even if it can, such an interface adversely affects performance and bundle size.' mean?

@noname0310
Copy link
Owner

https://docs.unity3d.com/ScriptReference/HumanBodyBones.html
VRM Loader allows static mapping based on name because it ensures a bone hierarchy that follows the structure of HumanBodyBones.

https://github.com/virtual-cast/babylon-vrm-loader/blob/master/src/humanoid-bone.ts
And that functionality is naturally implemented through hardcoding, merely mapping bone names. Therefore, the absence of that feature does not cause any issues in manipulating PMX models.

@spencer17x
Copy link
Author

The mmd plugin for threejs supports this feature, would you consider supporting it

@noname0310
Copy link
Owner

I've never heard of it. I don't even know what exactly you're talking about.
can you give me a related reference?

@spencer17x
Copy link
Author

Just like the vrm loader, it drives the face and bones

@noname0310
Copy link
Owner

noname0310 commented Jul 17, 2023

As I said above, all operations are already possible with the feature of Babylon.js.

Bone / Skeleton manipulate is possible through the Bone and Skeleton class in Babylon.js, and for MorphTargetManager class in the case of MorphTarget.
https://doc.babylonjs.com/features/featuresDeepDive/mesh/bonesSkeletons
https://doc.babylonjs.com/features/featuresDeepDive/mesh/morphTargets

And you can also manipulate morphs that operate at mmd runtime through MmdModel.morph.

@spencer17x
Copy link
Author

Okay, thank you

@noname0310
Copy link
Owner

There is no further discussion, so I will close the issue. If you have any other questions, please feel free to post new issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants