-
-
Notifications
You must be signed in to change notification settings - Fork 36.1k
fix mmd ikbone bug, mmd parser #21249
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
Conversation
|
Thanks for the bug report. The files under In this case, Regarding TextDecoder stuff, if I remember correctly there is a reason why I made my own text encoder/decoder, not use And for both 1 and 2 problems, would you mind if sharing the model files with me? I would like to investigate the root issues. |
I suspect it was because not many browsers supporter |
Yeah, as I updated the comment, it seems true. |
First of all, I used same model in both problem. https://bowlroll.net/file/155105 And, First problem is char code not in table. And second problem is after I use CCIDKSolver, in my case, model's leg is moving with target. ex) Sorry for my bad English. thanks. |
|
Regarding the problem 1, probably I remembered the reason and it looks the time to switch to Regarding the problem 2. Thanks for sharing the model. Let me test with it to figure out the root issue. Note that I'm hospitalized now so it may take time.
No worry! I know mine is bad! |
|
@takahirox |
|
@ingbunga Thanks. I will review there hopefully soon. |
|
@takahirox The diff is now very tiny. |
|
A bit confusing... Which is this change for, optimization or fixing ik? |
The first commit was fixed the ikbone bug. In nutshell, it can be both of all |
|
Hi, thanks for the explanation. But to be honest I don't think ignoring negative ratio is a true solution because authors can set negative ratio in MMD. I speculate the root issue is this line because the second argument of Quaternion.slerp() accepts [0, 1] so we may need to lerp differently for negative ratios. |
|
I agree. |
3.5times faster than first commit
almost same performance with first version!
i misunderstood about it.
|
Hello, I had many test and commit. I think it's works well. Can you review it? this is performance of how long taking one frame.( ms ) performance before PR: performance after latest commit: how I performance Testvar sum = 0;
var count = 0;
function animate() {
requestAnimationFrame(animate);
var start = performance.now();
helper.update( clock.getDelta() );
sum += performance.now() - start;
count ++;
if( count === 10000 ) {
console.log( sum / 10000 );
}
renderer.render( scene, camera );
controls.update();
}; |
|
Thanks for the updating and notification. I'm checking the PMX animation system specification and thinking how the right and best solution should be. The PMX animation system is a bit too complex so give me more time to review... |
|
This is screen shot of I kinda bug isn't fixed. Actually IK solved well, result is good. And you didn't fixed code on How about divide bone to IK related bone and normal bone, and solve grant IK related bone first and solve normal bone last ( after solve IK )? In test, I only change s2uTable to TextDecoder because if I don't change code, it makes error while loading files |
|
Thanks for the test. Can you share your tests online? I want to locally test more deeply.
TBH, I don't think it's a good idea because I don't want
Would you elaborate more for me why it would resolve the problem?
What's platform do you use? I couldn't reproduce the error although I loaded the models you pointed out. |
OK! I understand.
I think error from VMD or VPD. I uploaded all of folder.
OK! First of all, you should focus on It's parent bone is Out of this bone, when the mmd model turn its body,leg turn too. But
In this case, in my idea is
In my test, this worked. |
|
Thanks for the explanation. I confirmed the commit still doesn't resolve the problems in your tests. I made a new commit to follow the PMX Animation system more properly. I confirmed it resolves the problems. If you have other tests, models, or animations, would you mind if trying to test again? (I added a new Thanks for sharing your solution idea. I would like to start with simulating PMX animation system as much as possible, and then I would like to think of optimization like your idea. |
|
All bones working well, Avg 1 frame ms: I keep on testing, Should I close this PR? |
|
Thanks for testing.
Yeah... I wanted to respect your PR but the change of the solution ended up being much bigger than I thought so it would be better to close this PR and I make a new PR, sorry. Instead I would like to ask the Change log editor (@Mugen87 ?) for adding your name next to me in r127 Change log. |
|
Thank you so much! |
Noted! |









Related issue: --
Description
There are two problems.
Shift jis to utf table isn't work with some model. ( mmdparser.module.js )

I use Textdecoder instead of shift jis to utf table.
bone that relative with IKbone go to the wrong place. ( MMDAnimationHelper.js )


before:
after fix GrantSolver:
I just fixed a simple mistake.