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

springbone 初期化の修正。 #2459

Merged
merged 1 commit into from
Oct 11, 2024

Conversation

ousttrue
Copy link
Contributor

@ousttrue ousttrue commented Oct 11, 2024

tail の初期位置が原点から始まって開始時にはねる。
tail の初期化経路が変わったからかもしれない。
#2440 v0.126 は関係あるかもしれないが、別件かもしれない。

@ousttrue ousttrue added bug Something isn't working SpringBone labels Oct 11, 2024
@ousttrue ousttrue added this to the SpringBone runtime interface milestone Oct 11, 2024
@ousttrue ousttrue requested a review from Santarh October 11, 2024 06:35
Copy link
Contributor

@Santarh Santarh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

これは何が問題だったんでしょう?

localScale = transform.localScale,
localToWorldMatrix = transform.localToWorldMatrix,
worldToLocalMatrix = transform.worldToLocalMatrix
}).ToArray(), Allocator.Persistent);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ほかの NativeArray もそうですが List -> Array -> NativeArray と変遷するとそこそこ大きな GC Alloc になるので、変更が落ち着いたころに最適化したいところですね

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/vrm-c/UniVRM/blob/master/Assets/UniGLTF/Runtime/SpringBoneJobs/FastSpringBoneConbinedBuffer.cs#L337

の入力値を作っているところで、verlet の初期位置が原点になってました。
原点から実位置の delta が大きくなるので 2フレーム目で必ずはねるという挙動に。

@ousttrue ousttrue merged commit 62b6572 into vrm-c:master Oct 11, 2024
1 of 4 checks passed
@ousttrue ousttrue deleted the fix/fastspringbone_init_tailpos branch October 11, 2024 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants