bevy/crates/bevy_render/src/mesh
robtfm cc8f023b3a
fix invalid bone weights (#8316)
# 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](https://forum.unity.com/threads/whats-the-problem-with-this-import-fbx-warning.133736/)
(although that also sets the bone index to zero) and
[three.js](94c1a4b86f/src/objects/SkinnedMesh.js (L98)),
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)

---------

Co-authored-by: ira <JustTheCoolDude@gmail.com>
2023-04-10 07:49:53 +00:00
..
mesh fix invalid bone weights (#8316) 2023-04-10 07:49:53 +00:00
shape Fix documentation on RegularPolygon (#8164) 2023-03-22 23:17:13 +00:00
mod.rs bevy_reflect: Register missing reflected types for bevy_render (#6725) 2022-11-23 00:41:21 +00:00