summaryrefslogtreecommitdiff
path: root/modules/gltf/gltf_state.h
AgeCommit message (Collapse)Author
2023-02-26GLTF: Delete unused skeleton_to_nodeAaron Franke
2023-02-01gltf: Add GLTFHandleBinary::HANDLE_BINARY_EMBED_AS_UNCOMPRESSEDLyuma
This option allows for a safe fallback for embedded gltf textures in cases where VRAM compression is not needed. Add an is_editor_hint guard around GLTFHandleBinary::HANDLE_BINARY_EXTRACT_TEXTURES, to use EMBED_AS_UNCOMPRESSED by default at runtime. This provides an option for pixel art to be stored losslessly. Additionally, respect project importer defaults for texture import settings. Avoid writing and reimporting extracted textures identical to version on disk.
2023-01-27Merge pull request #62499 from fire/gltf-binary-img-compressionRémi Verschelde
Handle gltf binary images
2023-01-27Handle gltf binaryK. S. Ernest (iFire) Lee
[ Ignore and Warn | Extract Textures (default) | Optimize Loading Embedded as Basisu ] Enable compressed mip maps from Basis Universal for faster compressions. Increase the quality of Basis to avoid corruption. To keep compatibility use the first mip of the previous internal Godot format. Because texture names may have invalid filename characters, adds String::validate_filename to sanitize filenames for import pipeline use.
2023-01-26Avoid nested skeletons, and handle skinned meshes with children.Lyuma
Recursively adds child nodes into each skeleton. This should prevent nested skeletons and avoid bone attachments for leaf bones. In cases where a skinned mesh has children, creates two scene nodes with the same name, which both will represent this single gltf node. Because blend shape animations must target the mesh, adds a separate mapping for ImporterMeshInstance3D node references. This change will break existing imported scenes with bone attachments and more than one skeleton. Co-authored-by: K. S. Ernest (iFire) Lee <ernest.lee@chibifire.com>
2023-01-05One Copyright Update to rule them allRémi Verschelde
As many open source projects have started doing it, we're removing the current year from the copyright notice, so that we don't need to bump it every year. It seems like only the first year of publication is technically relevant for copyright notices, and even that seems to be something that many companies stopped listing altogether (in a version controlled codebase, the commits are a much better source of date of publication than a hardcoded copyright statement). We also now list Godot Engine contributors first as we're collectively the current maintainers of the project, and we clarify that the "exclusive" copyright of the co-founders covers the timespan before opensourcing (their further contributions are included as part of Godot Engine contributors). Also fixed "cf." Frenchism - it's meant as "refer to / see".
2022-11-29GLTF: Clean up lots of includesAaron Franke
2022-11-24Cache materials in gltf as the abstract class of MaterialK. S. Ernest (iFire) Lee
Use the abstract material class instead of BaseMaterial3D. This allows inserting ShaderMaterials into gltf. Like in VRM.
2022-10-15Add a way to store additional data in GLTFState and GLTFNodeAaron Franke
2022-10-03GLTF imports & exports material texture filtersThe Tophat Demon
2022-09-19Make used extensions stored in GLTFStateAaron Franke
This allows GLTFDocumentExtension classes to add to the used extensions array.
2022-08-24Replace Array return types with TypedArray 3kobewi
2022-08-10Prevent AnimationPlayer from being added on GLTF import if the option is ↵Hakim
unchecked. Fixes #63954
2022-07-25Code quality: Fix header guards consistencyRémi Verschelde
Adds `header_guards.sh` bash script, used in CI to validate future changes. Can be run locally to fix invalid header guards.
2022-07-24GLTF: Organize structures into a subfolderAaron Franke
2022-07-24GLTF: Move shared defines into a separate gltf_defines.h fileAaron Franke
Also move GLTFDocument's template conversion functions into gltf_template_convert.h
2022-07-23GLTF: Only list used extensions when they're actually usedAaron Franke
2022-05-20Add a new HashSet templatereduz
* Intended to replace RBSet in most cases. * Optimized for iteration speed
2022-05-20Improve gltf extension GLTFDocument api.K. S. Ernest (iFire) Lee
2022-05-16Replace most uses of Map by HashMapreduz
* Map is unnecessary and inefficient in almost every case. * Replaced by the new HashMap. * Renamed Map to RBMap and Set to RBSet for cases that still make sense (order matters) but use is discouraged. There were very few cases where replacing by HashMap was undesired because keeping the key order was intended. I tried to keep those (as RBMap) as much as possible, but might have missed some. Review appreciated!
2022-04-23Discard images from gltf import for the animation library.K. S. Ernest (iFire) Lee
This is an optimization.
2022-01-03Update copyright statements to 2022Rémi Verschelde
Happy new year to the wonderful Godot community!
2021-10-03GLTF for game templates.K. S. Ernest (iFire) Lee
Convert GLTF Document to use ImporterMeshInstance3D. Add a GLTFDocument extension list and an extension for converting the importer mesh instance 3d to mesh instance 3d. Use GLTF module when the editor tools are disabled. Modified the render server to be less restrictive on matching blend arrays and have more logging. Misc bugs with multimesh. Always index the meshes.
2021-09-29gltf export: Fix export of skeletons, skins and blend shapes.Lyuma
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-09-10Remove packed scene gltfK. S. Ernest (iFire) Lee
We determined through discussion that composing the packed scene from a node tree was a better design because it removed duplication of code.
2021-07-15Misc cleanup of header includesRémi Verschelde
Was looking for misuse of module headers without checking that the module is actually enabled and got carried away...
2021-03-24Always have a name for gltf2 mesh, material and skins.K. S. Ernest (iFire) Lee
Co-authored-by: Lcbx <luc.courbariaux@gmail.com>
2021-02-24Relaxes Node naming constraints in glTF documents to match the Editor.abaire
2021-01-01Update copyright statements to 2021Rémi Verschelde
Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
2020-12-22Add exporting glTF2.K. S. Ernest (iFire) Lee
* Support KHR_texture_transform. * Support exporting glTF2 * Support exporting instanced scenes * Extract into a gltf state and gltf document * Add a tools menu for exporting gltf2