Commit graph

17 commits

Author SHA1 Message Date
Rémi Verschelde
e4996887ca
Merge pull request #48625 from The-O-King/compression_options 2021-11-02 08:58:22 +01:00
Lyuma
e575b27b15 3.x backport glTF: Fix override materials and non-empty arrays
Keep track of MeshInstance and GeometryInstance override materials in the GLTFMesh object.
Ensure all arrays are non-empty to conform with "minItems":1 in glTF spec.
2021-11-01 23:40:12 -07:00
Omar El Sheikh
203295f17d Added Mesh Compression Import Options
Fleshed out the "Optimize Mesh" options found in the mesh import UI
Gave a checkbox to every vertex attribute that can be compressed

Surfaced option to enable/disable Octahedral compression for
normal/tangent vectors

Also surfaces the vertex position compression option which previously
inaccessible because the defaults did not compress vertex positions

Supports all current importers (obj, fbx, collada, gltf)
2021-11-01 12:54:28 -04:00
Rémi Verschelde
42d385b312
clang-format: Disable alignment of operands, too unreliable
Sets `AlignOperands` to `DontAlign`.

`clang-format` developers seem to mostly care about space-based indentation and
every other version of clang-format breaks the bad mismatch of tabs and spaces
that it seems to use for operand alignment. So it's better without, so that it
respects our two-tabs `ContinuationIndentWidth`.
2021-10-28 13:23:38 +02:00
Lyuma
e49f8c5823 3.x: Fix validation errors due to chunk padding and empty skins.
GLB chunk padding length calculation was backwards and missing for the BIN chunk.
Fixed error caused by "skins":[] when no skins were present.
Finally, encode animations before textures to avoid accessor misalignment due to texture byteLength.
2021-10-25 21:17:13 -07:00
Lyuma
3cdaaffb54 Backport to 3.x "gltf export: Fix export of skeletons, skins and blend shapes."
Create GLTFSkeleton at the same time we create GLTFNode objects.
Create GLTFSkin at the same time we export MeshInstance3D
Fixes export of blend shape arrays for meshes with multiple surfaces.
Fixes array indexing issues in export of glTF morph target animations.

Converts BoneAttachment3D nodes during normal node creation: this avoids
special cases during mesh export, and especially exporting skeletons or meshes
which are children of BoneAttachment3D.

Co-authored-by: K. S. Ernest (iFire) Lee <ernest.lee@chibifire.com>
2021-10-05 14:14:28 -07:00
Rémi Verschelde
e31a10da98
Merge pull request #52274 from aaronfranke/3.x-gltf-noregex 2021-10-05 12:40:12 +02:00
Rémi Verschelde
dbe0e4613a
Merge pull request #53140 from V-Sekai/gltf_naming_fix 2021-09-28 08:40:54 +02:00
SaracenOne
c6387e58e9 Fixes naming conflict in GLTF importer 2021-09-27 18:07:50 +01:00
Aaron Franke
85eb6b6352
[3.x] Make the GLTF module not depend on the RegEx module 2021-09-15 09:19:06 -05:00
Lyuma
79b016adad Assign the min values in gltf accessors 2021-08-19 09:30:05 +01:00
K. S. Ernest (iFire) Lee
beb3a6859d
Continue when glTF2 lights fail to parse.
(cherry picked from commit 0c79a8fa22)
2021-08-12 16:42:16 +02:00
K. S. Ernest (iFire) Lee
8f592d50c3
glTF2 fallback load PNG and JPG
(cherry picked from commit ddff1c10c3)
2021-08-03 09:15:34 +02:00
K. S. Ernest (iFire) Lee
6ba37005d1
In glTF2 animations, log spam less when running.
(cherry picked from commit 882f7d9bdf)
2021-08-03 09:15:34 +02:00
K. S. Ernest (iFire) Lee
42ad091738
Make curve interpolate crash less.
(cherry picked from commit d67c5afa95)
2021-08-03 09:15:33 +02:00
Lyuma
d699600ec7 gltf: Fix mesh nodes which are also bones.
Fix issue when two skeletons end up directly parented.
Prevent animating TRS for skinned Mesh node.
Fix animating weights on meshes with targets but no weights.
2021-05-31 13:18:10 -07:00
K. S. Ernest (iFire) Lee
6ec9468e75 Backport gltf2 module from master. 2021-05-31 13:18:06 -07:00