mrdoob / three.js

JavaScript 3D Library.
https://threejs.org/
MIT License
102.61k stars 35.36k forks source link

Looking for Physics Recording Function #24559

Closed xzhuah closed 2 weeks ago

xzhuah commented 2 years ago

Is your feature request related to a problem? Please describe.

I'm always frustrated when MMD does not provide Physics recording function. MikuMikuMoving has that function but it is noting using the same physics engine as MMD (at least the setting is different), thus we couldn't get the exactly same physics motions. The RGBA physics: https://rgba.blog.jp/archives/10475373.html is an example.

I think with three.js, physics recording could be made possible.

Describe the solution you'd like

I roughly read the code in MMDPhysics.js. I think it is possible to collect all the caculated physics bone's position and agle information at each frame, and write a vmd file at the end to record all motion information of those physics bones. With this file, we essentially recorded all physics calculation and can use it in other program, like blender. Caching these information might be able to save some calculation effort also.

Describe alternatives you've considered

N/A

Additional context

Add any other context or screenshots about the feature request here.

Basically I am looking for the Physics record function in MikuMikuMoving, but based on MMD physics engine (the bullet engine) image

That would be very helpful for MMD makers who currently have to use MMDBridge to bake an alembic file in order to record all the physics effects.

Mugen87 commented 2 years ago

@takahirox What do you think about this?

takahirox commented 2 years ago

Unfortunately I don't have a plan to make MMDPhysics more rich. But if someone makes a PR and the change is simple, I'm willing to accept it.

Mugen87 commented 2 weeks ago

This feature is now out of scope, see #29698.