summaryrefslogtreecommitdiffstats
path: root/editor/import/3d/resource_importer_scene.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge commit godotengine/godot@f128f383e892865379cb8b14e7bcc9858efe2973Spartan3222024-11-271-0/+12
|\
| * Merge pull request #96544 from SaracenOne/import_thumbnailsThaddeus Crews2024-11-271-0/+11
| |\ | | | | | | | | | Generate thumbnails on imported scenes.
| | * Generate editor thumbnails on imported scenes.Saracen2024-11-241-0/+11
| | |
| * | Merge pull request #97824 from TokageItLab/retarget-modifierThaddeus Crews2024-11-261-0/+1
| |\ \ | | |/ | |/| | | | Add RetargetModifier3D for realtime retarget to keep original rest
| | * Add RetargetModifier3D for realtime retarget to keep original restSilc Lizard (Tokage) Renew2024-11-181-0/+1
| | |
* | | Merge commit godotengine/godot@cb411fa960f0b7fdbd97dcdb4c90f9346360ee0eSpartan3222024-11-121-2/+2
|\| |
| * | Merge pull request #97363 from reduz/deterministic-gen-suberesources-idThaddeus Crews2024-11-111-1/+1
| |\ \ | | | | | | | | | | | | Allow passing UID to importer
| | * | Allow passing UID to importerJuan2024-11-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This helps, for importers spitting out new resources to the res:// filesystem to actually hash them to generate deterministic UIDs. This PR also fixes the determinism for translations.
| * | | Core: Integrate `Ref::instantiate` where possibleThaddeus Crews2024-11-101-1/+1
| |/ /
* | | Merge commit godotengine/godot@0f5f3bc9546b46b2029fc8896dc859697f1eab97Spartan3222024-11-111-0/+1
|\| |
| * | GLTF: Preserve node visibility on importAaron Franke2024-11-051-0/+1
| | |
* | | Merge commit godotengine/godot@87318a2fb7fffeb72adca934e31915be077c3d1fSpartan3222024-11-061-2/+2
|\| |
| * | Rewrite index optimization code for maximum efficiencyArseny Kapoulkine2024-11-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While all the previous fixes to optimizeVertexCache invocation fixed the vertex transform efficiency, the import code still was missing two crucial recommendations from meshoptimizer documentation: - All meshes should be optimized for vertex cache (this reorders vertices for maximum fetch efficiency) - When LODs are used with a shared vertex buffer, the vertex order should be generated by doing a vertex fetch optimization on the concatenated index buffer from coarse to fine LODs; this maximizes fetch efficiency for coarse LODs The last point is especially crucial for Mali GPUs; unlike other GPUs where vertex order affects fetch efficiency but not shading, these GPUs have various shading quirks (depending on the GPU generation) that really require consecutive index ranges for each LOD, which requires the second optimization mentioned above. However all of these also help desktop GPUs and other mobile GPUs as well. Because this optimization is "global" in the sense that it affects all LODs and all vertex arrays in concert, I've taken this opportunity to isolate all optimization code in this function and pull it out of generate_lods and create_shadow_mesh; this doesn't change the vertex cache efficiency, but makes the code cleaner. Consequently, optimize_indices should be called after other functions like create_shadow_mesh / generate_lods. This required exposing meshopt_optimizeVertexFetchRemap; as a drive-by, meshopt_simplifySloppy was never used so it's not exposed anymore - this will simplify future meshopt upgrades if they end up changing the function's interface.
* | | Merge commit godotengine/godot@c6c464cf9ae56e8b68620af65125dd980d0e8122Spartan3222024-11-021-13/+1
|\| |
| * | LOD: Remove "Raycast Normals" and associated "Normal Split Angle" settingsArseny Kapoulkine2024-10-281-13/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "Raycast Normals" was introduced in 4.4 dev and defaulted to "false". The limited testing results at the time suggested that raycasting generally reduces normal quality compared to native simplifier results, at the same time increasing vertex memory and import time. To play it safe, we introduced a setting that defaulted to false, with the goal of removing it later in 4.4 development cycle if no regressions are noticed. Since we already had three dev snapshots and no reports, this change removes the setting and associated code. "Normal Split Angle" was only used when raycast normals were enabled; this change removes it from the settings, but keeps it in the script binding for compatibility. Existing meshes import exactly the same after this change (unless they chose to override raycasting which would be surprising). split_normals helper was only used in this code path and is also removed for simplicity; it is unlikely that this code will be useful as is, as it can only regenerate normals without fixing tangents or updating positions.
* | Fix copyright headers referring to GodotSpartan3222024-10-271-2/+2
| |
* | Rebrand preambles to RedotDubhghlas McLaughlin2024-10-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Credits: Co-authored-by: Skogi <skogi.b@gmail.com> Co-authored-by: Spartan322 <Megacake1234@gmail.com> Co-authored-by: swashberry <swashdev@pm.me> Co-authored-by: Christoffer Sundbom <christoffer_karlsson@live.se> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: McDubh <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: radenthefolf <radenthefolf@gmail.com> Co-authored-by: John Knight <80524176+Tekisasu-JohnK@users.noreply.github.com> Co-authored-by: Adam Vondersaar <adam.vondersaar@uphold.com> Co-authored-by: decryptedchaos <nixgod@gmail.com> Co-authored-by: zaftnotameni <122100803+zaftnotameni@users.noreply.github.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: wesam <108880473+wesamdev@users.noreply.github.com> Co-authored-by: Mister Puma <MisterPuma80@gmail.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: SingleError <isaaconeoneone@gmail.com> Co-authored-by: Bioblaze Payne <BioblazePayne@gmail.com>
* | Rebrand Godot to RedotRandolph W. Aarseth II2024-10-111-2/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add Linux Editor tests workflow matrix Add Windows Editor w/ Mono workflow matrix Add Generate Glue Code job to Windows workflow Add Build GodotSharp job to Windows workflow Add godot compatibility version references Add Godot author info Add Godot version compatibility info Add Godot donor info Add Godot authors and donors to editor_about.cpp Credits: Co-authored-by: Skogi <skogi.b@gmail.com> Co-authored-by: Spartan322 <Megacake1234@gmail.com> Co-authored-by: swashberry <swashdev@pm.me> Co-authored-by: Christoffer Sundbom <christoffer_karlsson@live.se> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: McDubh <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: radenthefolf <radenthefolf@gmail.com> Co-authored-by: John Knight <80524176+Tekisasu-JohnK@users.noreply.github.com> Co-authored-by: Adam Vondersaar <adam.vondersaar@uphold.com> Co-authored-by: decryptedchaos <nixgod@gmail.com> Co-authored-by: zaftnotameni <122100803+zaftnotameni@users.noreply.github.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: wesam <108880473+wesamdev@users.noreply.github.com> Co-authored-by: Mister Puma <MisterPuma80@gmail.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: SingleError <isaaconeoneone@gmail.com> Co-authored-by: Bioblaze Payne <BioblazePayne@gmail.com>
* Add "Use Node Type Suffixes" scene import optionAaron Franke2024-09-091-4/+13
|
* Cleanup of raw `nullptr` checks with `Ref`A Thousand Ships2024-08-311-1/+1
| | | | Using `is_valid/null` over checks with `nullptr` or `ERR_FAIL_NULL` etc.
* Merge pull request #96308 from SaracenOne/attempt_to_reset_imported_sceneRémi Verschelde2024-08-301-0/+13
|\ | | | | | | Attempt applying RESET pose during import.
| * Attempt applying RESET pose during import.Saracen2024-08-291-0/+13
| |
* | Import/export GLTF extras to node->metademolke2024-08-291-1/+9
|/ | | | | | | | This is useful for custom tagging of objects with properties (for example in Blender) and having this available in the editor for scripting. - Adds import logic to propagate the parsed GLTF extras all the way to the resulting Node->meta - Adds export logic to save Godot Object meta into GLTF extras - Supports `nodes`, `meshes` and `materials` (in GLTF sense of the words)
* ResourceImporterScene: Replace animation bool with an import type string enumAaron Franke2024-08-271-34/+52
|
* Prevent empty post-import script paths throwing errors.Saracen2024-08-261-3/+3
|
* Add import tab "import_script/path" relative path supportAdam Scott2024-08-251-0/+4
|
* Optimize base and shadow meshes for cacheArseny Kapoulkine2024-08-161-0/+2
| | | | | | | | | | Previously, vertex cache optimization was ran for the LOD meshes, but was never ran for the base mesh or for the shadow meshes, including shadow LOD chain (shadow LOD chain would sometimes get implicitly optimized for vertex cache as a byproduct of base LOD optimization, but not always). This could significantly affect the rendering performance of geometry heavy scenes, especially for depth or shadow passes where the fragment load is light.
* Merge pull request #93727 from zeux/raycast-optRémi Verschelde2024-08-161-1/+7
|\ | | | | | | Disable normal raycaster for LOD generation by default
| * Disable normal raycaster for LOD generation by defaultArseny Kapoulkine2024-07-021-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Normal raycaster makes LOD generation process >2x slower and often generates normals that look significantly worse compared to what the simplifier comes up with by default. This was likely different before last meshoptimizer upgrade, as the attribute metric was not functioning properly, but now it looks like it's doing more harm than good. This change makes it disabled by default but keeps an easy option to re-enable it per mesh using LOD parameters for now until we get more confidence and can remove the code outright. Because the long term plan would be to disable this feature entirely, the scripting API isn't changed, and it's just off-by-default there with no way to re-enable.
* | Merge pull request #93284 from rune-scape/missing-import-settings-crashRémi Verschelde2024-07-311-0/+2
|\ \ | | | | | | | | | Avoid crashing when scene import settings are empty
| * | avoid crashing when scene import settings are emptyrune-scape2024-06-171-0/+2
| | |
* | | Fix missing options in Project Import DefaultsHilderin2024-07-091-2/+6
| | |
* | | Fix default collision shape on imported rigidbodyBastiaan Olij2024-06-241-1/+1
| |/ |/|
* | Retain meta data set on imported nodestamas2024-06-181-0/+22
|/ | | | | | | | | During the import process, many importer nodes are replaced with their engine node counterparts. For example, ImporterMeshInstance3D is replaced with a MeshInstance3D node. Any meta data set on these importer nodes, i.e. through a GLTFDocumentExtension, are lost during the conversion. This change copies over any meta data set on these importer nodes to their engine counterparts.
* Merge pull request #92196 from lyuma/gltf_anim_library_import_as_bonesRémi Verschelde2024-05-231-1/+1
|\ | | | | | | Support Import As Skeleton Bones on glTF and AnimationLibrary import
| * Support Import As Skeleton Bones on glTF and AnimationLibrary importLyuma2024-05-211-1/+1
| |
* | fbx: change import option defaultsLyuma2024-05-211-1/+2
|/ | | | | ufbx has special logic to handle animation/trimming, and most users expect trimming to be on. For existing projects, we should upgrade files0 to FBX2glTF to preserve node compatibility.
* Use Core/Scene stringnames consistentlykobewi2024-05-131-3/+3
|
* Merge pull request #91619 from AThousandShips/find_improveRémi Verschelde2024-05-081-4/+4
|\ | | | | | | Replace `find` with `contains/has` where applicable
| * Replace `find` with `contains/has` where applicableA Thousand Ships2024-05-081-4/+4
| | | | | | | | | | | | | | * Replaces `find(...) != -1` with `contains` for `String` * Replaces `find(...) == -1` with `!contains` for `String` * Replaces `find(...) != -1` with `has` for containers * Replaces `find(...) == -1` with `!has` for containers
* | [Core] Add case-insensitive `String::containsn`A Thousand Ships2024-05-081-2/+2
|/
* Reduce and prevent unnecessary random-access to `List`A Thousand Ships2024-05-041-3/+3
| | | | | | | | | Random-access access to `List` when iterating is `O(n^2)` (`O(n)` when accessing a single element) * Removed subscript operator, in favor of a more explicit `get` * Added conversion from `Iterator` to `ConstIterator` * Remade existing operations into other solutions when applicable
* Merge pull request #89461 from Calinou/3d-import-collision-default-trimeshRémi Verschelde2024-05-041-1/+1
|\ | | | | | | Default to trimesh for generated collision shapes in Advanced Import Settings
| * Default to trimesh for generated collision shapes in Advanced Import SettingsHugo Locurcio2024-03-141-1/+1
| | | | | | | | | | | | This avoids using convex decomposition every time collision is enabled on a mesh, which can be extremely slow on complex meshes (such as entire levels).
* | Set animation step from importers. Increase default step from 10 to 30 FPS.Lyuma2024-04-191-0/+1
| |
* | Remove unused Make Streamable option from scene import dialogHugo Locurcio2024-04-161-2/+1
| |
* | Apply "Remove Immutable Tracks" after post-import.Lyuma2024-03-301-5/+162
| | | | | | | | | | | | Reimplements "Remove Immutable" by comparing to the skeleton rest. It is necessary to delay removing animation tracks until after the correct rest pose is calculated in rest-fixer. Preserves the original implementation in the GLTFDocument / FBXDocument API for compatibility.
* | Merge pull request #88824 from V-Sekai/retarget_silhouette_templateRémi Verschelde2024-03-231-5/+183
|\ \ | | | | | | Retargeting option to use a template for silhouette.
| * | Option to use Animation as skeleton rest silhouette.Lyuma2024-03-231-5/+183
| |/ | | | | | | | | Adds `rest_pose/external_animation_library` advanced option to replace bone rest with an exported Animation before retargeting. Together this allows a purely importer based workflow to transfer a known good pose from one FBX to another.
* / Add option to import skeleton rest as RESET animationLyuma2024-03-191-0/+70
|/ | | | | Also creates an AnimationPlayer if one does not exist. Designed to be used in conjunction with loading rest pose in another importer.