mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
Allow non-normalized weights in glTF models (#15310)
We are being lax here, but the glTF specification just requires that "when the weights are stored using float component type, their linear sum SHOULD be as close as reasonably possible to 1.0 for a given vertex" In particular weights > 1 and weight sums well below or above 1 can be observed in models exported by Blender if they aren't manually normalized. These fail the glTF validator but Irrlicht normalizes weights itself so we can support them just fine. The docs have been updated to recommend normalizing weights (as well as documenting the status of interpolation support). Weights < 0, most of them close to 0, also occur. Consistent with Irrlicht, we ignore them, but we also raise a warning.
This commit is contained in:
parent
3e10d9ccf5
commit
05d31222f7
3 changed files with 33 additions and 17 deletions
|
@ -309,17 +309,24 @@ it unlocks no special rendering features.
|
|||
Binary glTF (`.glb`) files are supported and recommended over `.gltf` files
|
||||
due to their space savings.
|
||||
|
||||
This means that many glTF features are not supported *yet*, including:
|
||||
Bone weights should be normalized, e.g. using ["normalize all" in Blender](https://docs.blender.org/manual/en/4.2/grease_pencil/modes/weight_paint/weights_menu.html#normalize-all).
|
||||
|
||||
You can use the [Khronos glTF validator](https://github.com/KhronosGroup/glTF-Validator)
|
||||
to check whether a model is a valid glTF file.
|
||||
|
||||
Many glTF features are not supported *yet*, including:
|
||||
|
||||
* Animations
|
||||
* Only a single animation is supported, use frame ranges within this animation.
|
||||
* Only linear interpolation is supported.
|
||||
* Cameras
|
||||
* Materials
|
||||
* Only base color textures are supported
|
||||
* Backface culling is overridden
|
||||
* Double-sided materials don't work
|
||||
* Alternative means of supplying data
|
||||
* Embedded images
|
||||
* Embedded images. You can use `gltfutil.py` from the
|
||||
[modding tools](https://github.com/minetest/modtools) to strip or extract embedded images.
|
||||
* References to files via URIs
|
||||
|
||||
Textures are supplied solely via the same means as for the other model file formats:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue