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

fix invalid bone weights #8316

Merged
merged 3 commits into from
Apr 10, 2023
Merged

fix invalid bone weights #8316

merged 3 commits into from
Apr 10, 2023

Conversation

robtfm
Copy link
Contributor

@robtfm robtfm commented Apr 6, 2023

Objective

when a mesh uses zero for all bone weights, vertices end up in the middle of the screen.

Solution

we can address this by explicitly setting the first bone weight to 1 when the weights are given as zero. this is the approach taken by unity (although that also sets the bone index to zero) and three.js, and likely other engines.

Alternatives

it does add a bit of overhead, and users can always fix this themselves, though it's a bit awkward particularly with gltfs.

(note - this is for work so my sme status shouldn't apply)

@robtfm robtfm added A-Rendering Drawing game state to the screen A-Animation Make things move and change over time labels Apr 6, 2023
@alice-i-cecile alice-i-cecile added the C-Bug An unexpected or incorrect behavior label Apr 6, 2023
Co-authored-by: ira <JustTheCoolDude@gmail.com>
@mockersf mockersf added this pull request to the merge queue Apr 10, 2023
Merged via the queue into bevyengine:main with commit cc8f023 Apr 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Animation Make things move and change over time A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants