Commit Graph

423 Commits

Author SHA1 Message Date
Thaddeus Crews bf3016d9cf Merge pull request #120040 from ArdaE/support-CUSTOM3-in-glTF-importer
Add support for CUSTOM3 shader built-in when importing glTF files, and related improvements
2026-06-22 08:29:43 -05:00
Thaddeus Crews 47789b52be Merge pull request #120303 from nikitalita/fix-blend-export
GLTF: Fix blend shape weights and value tracks not being exported
2026-06-19 15:09:26 -05:00
nikitalita 19b246bbeb GLTF: Fix blend shape value tracks not being exported
Also fix blend weights not being written to export
2026-06-14 11:55:15 -07:00
Aaron Franke a749ebf48f GLTF: Use p_state parameter directly 2026-06-13 21:32:37 -07:00
ArdaE 2f02792721 Add support for Vector4-based _CUSTOM attributes when importing glTF files; enable import into CUSTOM3 shader built-in
Previously, Godot only imported additional UV coordinates (3 to 8) into CUSTOM0, CUSTOM1, CUSTOM2. This commit makes the following changes:

1. Allow import of _CUSTOM0, _CUSTOM1, _CUSTOM2, _CUSTOM3, defined as 4 floating pointer numbers each. These are given priority over UV coordinates as custom attributes.
2. Increase the limit of UV imports from 3 pairs (UV3-UV8) to 4 pairs, so _CUSTOM3 can be supported via UV9 & UV10, if desired. These are imported only if a corresponding _CUSTOMn attribute doesn't exist. Note that Blender only supports 8 UV sets in total; therefore Blender users must use _CUSTOM3, defined as "Color" (so it's 4 floats) to import into Godot's CUSTOM3.
3. Increase the limit of UV exports from 3 pairs to 4 pairs, so that exported glTFs retain all the custom vertex attribute values, and CUSTOM3 will retain its values when the file is reimported. The exporter continues to use UV sets to store the custom attributes, with UV9 & UV10 used for CUSTOM3.

In essence, this commit allows one to define CUSTOM3, while also improving the import options for the other CUSTOM shader built-ins.
2026-06-05 21:17:21 -07:00
aurpine a3bda42c94 Remove unused FileAccess::create calls in GLTFDocument 2026-04-24 11:51:40 -04:00
Thaddeus Crews bafe886286 Merge pull request #115788 from Calinou/gltfdocument-expose-import-flags
Expose import flags in GLTFDocument, mark EditorSceneFormatImporter flags as bitfield
2026-04-13 15:52:10 -05:00
Aaron Franke eb8ec10951 GLTF: Read material texture "texCoord" property on import 2026-04-11 02:21:25 -07:00
StarryWorm 4ae336740d Add missing resource_*.h includes
Add missing `resource_importer.h` includes
Add missing `resource_loader.h` includes
Add missing `resource_saver.h` includes
2026-03-27 07:03:39 -04:00
Lukas Tenbrink 05c33acbb1 Make memnew(RefCounted) return Ref, to force callers to take ownership of it through a reference. 2026-03-18 20:34:08 +01:00
Rémi Verschelde 6d309c858e Remove unused includes in modules with clangd-tidy 2026-03-16 16:40:39 +01:00
Rémi Verschelde 4bee1639b2 Merge pull request #116789 from aaronfranke/gltf-duplicate-doc-ext
GLTF: Duplicate extensions at the start of the import and export process
2026-03-09 11:49:25 +01:00
Aaron Franke f20517380d GLTF: Duplicate extensions at the start of the import and export process 2026-03-07 14:04:04 -08:00
Silc Lizard (Tokage) Renew 73d041dd98 Optimize Animation Resource, Library, Mixer, Player
Co-Authored-By: Silc Lizard (Tokage) Renew <tokage.it.lab@gmail.com>
2026-03-06 16:35:21 -05:00
Rémi Verschelde 765362b033 Explicitly include core/config/engine.h where used 2026-03-04 10:17:10 +01:00
Thaddeus Crews e380a41752 Style: Add class_db.h includes explicitly 2026-02-26 15:50:28 -06:00
Rémi Verschelde f5a290ac46 Move RenderingServer enums to a dedicated RenderingServerEnums (RSE) namespace
A number of headers in the codebase included `rendering_server.h` just for
some enum definitions. This means that any change to `rendering_server.h` or
one of its dependencies would trigger a massive incremental rebuild.

With this change, we decouple a number of classes from `rendering_server.h`,
greatly speeding up incremental rebuilds for that area.

On my machine, this reduces incremental compilation time after an edit of
`rendering_server.h` by 60s (from 2m57s).
2026-02-25 19:43:03 +01:00
nikitalita fc6e8fbd53 GLTF: fix value track interpolation 2026-02-05 10:56:44 +01:00
Hugo Locurcio 97b2c64c2c Expose import flags in GLTFDocument, mark EditorSceneFormatImporter flags as bitfield 2026-02-04 01:38:13 +01:00
Rémi Verschelde 4e18022442 Merge pull request #114581 from nikitalita/gltf-fix-animation-track-path
GLTF: Fix getting animation track path
2026-01-05 11:45:31 +01:00
nikitalita 33ce7441f8 GLTF: fix getting animation track path 2026-01-03 15:51:12 -08:00
Rémi Verschelde f2badb47f1 Merge pull request #114354 from nikitalita/gltf-dupe-images
GLTF: Duplicate images during serialization to prevent segfaults
2026-01-01 16:47:15 +01:00
nikitalita 595807acfb GLTF: dupe images during serialization to prevent segfaults 2025-12-26 12:42:23 -08:00
Manuel Maceira 5d9f5c54ef GLTF: Fix emissive texture import when emissiveFactor is absent 2025-12-12 16:34:36 -03:00
Thaddeus Crews 1577061e3d Merge pull request #113202 from aaronfranke/importer-mesh-convert
Allow converting from Mesh to ImporterMesh
2025-12-02 11:52:03 -06:00
Aaron Franke 1eb4972a5d GLTF: Fix order of operations for buffers and accessors 2025-11-27 09:06:14 -08:00
Aaron Franke 68716b6795 Allow converting from Mesh to ImporterMesh 2025-11-26 11:13:39 -08:00
Lukas Tenbrink 0f047944e4 Statically protect Object::cast_to for unrelated Object types.
Fix a handful of bugs associated with it.
2025-11-24 23:03:22 +01:00
Thaddeus Crews 68410acc61 Merge pull request #111613 from aaronfranke/gltf-obj-model-components
GLTF: Determine the component type when encoding object model properties
2025-11-17 10:57:03 -06:00
aaronp64 5c2d12dea3 Check if scale/offset values are provided in gltf KHR_texture_transform
Update GLTFDocument to check if scale/offset values exist when reading KHR_texture_transform extension
2025-11-16 12:13:02 -05:00
Aaron Franke e9bfc5a346 GLTF: Determine the component type when encoding object model properties 2025-11-14 18:15:59 -08:00
Thaddeus Crews 8ff0683def Merge pull request #110949 from aaronfranke/const-ref-param-gltf
Use const ref parameters in the GLTF module
2025-11-14 14:23:08 -06:00
Thaddeus Crews 0d66b2a9cf Merge pull request #109103 from aaronfranke/gltf-accessor-decode
GLTF: Move accessor decoding functions to GLTFAccessor
2025-11-14 14:22:40 -06:00
Thaddeus Crews 61a1575807 Merge pull request #112137 from aaronfranke/gltf-empty-mat-dict
GLTF: Don't serialize empty material extensions
2025-11-14 14:22:31 -06:00
Aaron Franke 9d0b391d6c GLTF: Move accessor decoding functions to GLTFAccessor 2025-11-14 07:05:04 -08:00
Aaron Franke dcb6431c01 Use const ref parameters in the GLTF module 2025-11-13 18:19:26 -08:00
Thaddeus Crews 12cdb66e33 Merge pull request #108853 from aaronfranke/gltf-accessor
GLTF: Move accessor encoding functions to GLTFAccessor
2025-11-13 12:33:38 -06:00
Thaddeus Crews 3c871084f9 Merge pull request #109446 from aaronfranke/gltf-handle-image-enum
GLTF: Make handle binary image mode enum type-safe
2025-11-11 16:07:52 -06:00
Aaron Franke a5424c321e GLTF: Make handle binary image mode enum type-safe 2025-11-04 10:42:11 -08:00
nikitalita ec9711531d GLTF export: use ORM texture for occlusion/metallicRoughnessTexture if it exists 2025-11-02 12:49:44 -08:00
Aaron Franke 7c55e9e749 GLTF: Don't serialize empty material extensions 2025-10-28 15:19:45 -07:00
Aaron Franke 62acc21bf5 GLTF: Move accessor encoding functions to GLTFAccessor 2025-10-21 08:42:29 -07:00
Thaddeus Crews 7d7d479162 Merge pull request #111615 from aaronfranke/gltf-anim-ptr-int-erpolate
GLTF: Enforce `STEP` interpolation for integer and boolean animations
2025-10-21 10:27:14 -05:00
Thaddeus Crews 80d06f166d Merge pull request #111341 from aaronfranke/gltf-animate-visibility
GLTF: Support animating node visibility
2025-10-21 10:27:11 -05:00
Thaddeus Crews 8f7cb0712a Merge pull request #109475 from nikitalita/preserve-gltf-names
Preserve mesh, material, and texture names in GLTF export
2025-10-21 10:27:00 -05:00
Thaddeus Crews 563036185f Merge pull request #108320 from aaronfranke/gltf-buf-accessor-dict
GLTF: Move accessor and buffer view Dictionary conversion into those classes
2025-10-21 10:26:59 -05:00
Aaron Franke 74a03b4cfa Preserve mesh, material, and texture names in GLTF export 2025-10-15 10:57:11 -07:00
Thaddeus Crews e825169957 Merge pull request #107836 from aaronfranke/gltf-without-nodes
GLTF: Allow parsing glTF files without nodes
2025-10-13 19:29:03 -05:00
Thaddeus Crews 21a6488c7f Merge pull request #109421 from aaronfranke/gltf-export-mesh-name
GLTF: Preserve mesh names on export
2025-10-13 19:28:46 -05:00
Aaron Franke 963b33ac40 GLTF: Enforce STEP interpolation for integer and boolean animations 2025-10-13 12:47:41 -07:00