This proposal is relevant to all Godot projects that involve 3D asset loading and exporting, especially those with a significant number of imported models. The unification of tangent space generation will broadly impact the engine's efficiency and user experience.
Describe the problem or limitation you are having in your project
Reported by Reduz. Tangent space generation (including the generation of normals and tangents) is redundantly implemented in many Godot asset loaders. This redundancy is causing loaders to be slower and more complex than necessary, affecting projects depending on which loader is used.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
The enhancement unifies the tangent space generation across all asset loaders in Godot. By moving the generation of normals and tangent spaces to a common code, we can reduce avoid error, complexity and improve the speed of the individual asset loaders.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Modify each asset loader to load arrays as-is, without performing tangent space optimization.
Move tangent space generation in the scene loader, which processes the raw data from asset loaders. Edited: Could be via the surface tool for exposure to the game developers.
If this enhancement will not be used often, can it be worked around with a few lines of script?
This is an enhancement that cannot be replicated with a script workaround due to its integration with the asset loading pipeline. It's a change that will benefit projects using 3D assets.
Is there a reason why this should be core and not an add-on in the asset library?
This enhancement addresses a core functionality of the Godot engine - the loading and processing of 3D assets. Its implementation will improve the efficiency of the engine's asset loading pipeline, making it a core enhancement rather than an optional add-on.
### Tasks
- [ ] Switch the obj importer to use SurfaceTool::generate_tangents(). Migrate the code from the MikkSpace patch that is stuck.
Describe the project you are working on
This proposal is relevant to all Godot projects that involve 3D asset loading and exporting, especially those with a significant number of imported models. The unification of tangent space generation will broadly impact the engine's efficiency and user experience.
Describe the problem or limitation you are having in your project
Reported by Reduz. Tangent space generation (including the generation of normals and tangents) is redundantly implemented in many Godot asset loaders. This redundancy is causing loaders to be slower and more complex than necessary, affecting projects depending on which loader is used.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
The enhancement unifies the tangent space generation across all asset loaders in Godot. By moving the generation of normals and tangent spaces to a common code, we can reduce avoid error, complexity and improve the speed of the individual asset loaders.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Modify each asset loader to load arrays as-is, without performing tangent space optimization.
Move tangent space generation in the scene loader, which processes the raw data from asset loaders. Edited: Could be via the surface tool for exposure to the game developers.
If this enhancement will not be used often, can it be worked around with a few lines of script?
This is an enhancement that cannot be replicated with a script workaround due to its integration with the asset loading pipeline. It's a change that will benefit projects using 3D assets.
Is there a reason why this should be core and not an add-on in the asset library?
This enhancement addresses a core functionality of the Godot engine - the loading and processing of 3D assets. Its implementation will improve the efficiency of the engine's asset loading pipeline, making it a core enhancement rather than an optional add-on.