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

VRMUtils.combineMorphs #1546

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from
Open

VRMUtils.combineMorphs #1546

wants to merge 5 commits into from

Conversation

0b5vr
Copy link
Contributor

@0b5vr 0b5vr commented Dec 2, 2024

This will resolve #1369

This PR will add VRMUtils.combineMorphs.

This function will prevent shader errors caused by the limitation of the number of morph targets, especially on mobile devices.
This might potentially improve the performance when using models with a lot of unnecessary morphs.

This PR also exposes VRMExpression.binds and adds VRMExpression.deleteBind().
These were required to implement VRMUtils.combineMorphs.

This function will prevent shader errors caused by the limitation of the number of morph targets, especially on mobile devices

I'm yet to do the sufficient behavior verification

expose `VRMExpression.binds`, add `VRMExpression.deleteBind()`
Was not working on some VRoid models; it attempted to access `morphAttributes.position` where it doesn't exist
@0b5vr 0b5vr added bug Something isn't working enhancement New feature or request performance Performance issue labels Dec 2, 2024
@0b5vr 0b5vr added this to the next milestone Dec 2, 2024
@0b5vr 0b5vr self-assigned this Dec 2, 2024
@0b5vr 0b5vr changed the title VRMUtils.combineMorphs, to VRMUtils.combineMorphs Dec 2, 2024
@0b5vr
Copy link
Contributor Author

0b5vr commented Dec 3, 2024

Since morph targets will be written into a data texture array, it don't have to be an interleaved buffer.

https://github.com/mrdoob/three.js/blob/dev/src/renderers/webgl/WebGLMorphtargets.js#L62

@0b5vr 0b5vr requested a review from yue4u December 3, 2024 06:01
morphTargetsRelative should be always false when we're loading glTF models but just in case
also added a doc comment to `VRMExpression.addBind`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request performance Performance issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing head in a specific VRM model in specific Android devices
1 participant