You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This proposal aims to improve the usability of the MeshLibrary system in Godot by streamlining the process of adding, managing, and previewing meshes. Key features include automating preview generation, adding methods to remove specific items, and improving the overall workflow to make it more intuitive and efficient.
Describe the problem or limitation you are having in your project
The current MeshLibrary workflow in Godot is functional but cumbersome, particularly when dealing with larger libraries. Specific issues include:
Complex item addition: Users must manually add a Mesh and configure its preview texture, making the process time-consuming and error-prone.
Lack of basic management tools: There is no direct method to remove a specific item or reorder items in the library, complicating library maintenance.
Manual preview creation: Preview textures must be manually generated and assigned, even though this step could be automated by the engine.
Mesh scaling issues: Currently, there is no integration between MeshLibrary and GridMap to automatically adjust mesh sizes to match the grid size. Users must manually ensure their meshes are scaled properly, leading to inconsistencies.
These issues limit the usability of MeshLibrary, especially for beginners or projects requiring large numbers of meshes.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Introduce a more intuitive mechanism for adding items to the MeshLibrary:
Add a button labeled "Add Item" to the MeshLibrary inspector.
Prompt the user to select a Mesh file through a file dialog.
Automatically assign a unique ID, link the mesh, and generate its preview.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Implement a system to generate previews directly from the provided Mesh. This could utilize Godot’s rendering pipeline to automatically render the mesh in a Viewport and use the resulting texture as the preview.
Automatically Adjust Mesh Size to GridMap Cell Size
Introduce functionality to dynamically adjust the size of meshes in the MeshLibrary to match the cell size of the associated GridMap.
Implementation Steps:
Add a method to the MeshLibrary API to retrieve the GridMap’s cell size.
Automatically scale meshes when they are added to the library to fit the grid dimensions.
When a Mesh is added to the library, the editor checks the associated GridMap and adjusts the mesh size accordingly.
A toggle in the MeshLibrary inspector allows users to enable or disable automatic size adjustment.
An additional example with a custom feature:
custom_mesh_library.mp4
If this enhancement will not be used often, can it be worked around with a few lines of script?
Can it be worked around with a few lines of script?
Yes, the issues outlined can be partially addressed with custom scripts or add-ons. For example:
Automating preview generation can be achieved with a small script that renders meshes in a Viewport to produce textures.
Adding or removing items programmatically can be done with basic scripting.
However, these solutions require extra work from users for what should ideally be built-in functionality. Integrating these features into the core would provide a unified, consistent, and out-of-the-box experience.
Is there a reason why this should be core and not an add-on in the asset library?
Core relevance: MeshLibrary is an integral part of Godot’s 3D workflow, particularly for GridMap usage. Improving its usability aligns with Godot’s philosophy of providing powerful, intuitive tools natively.
Ease of use: A built-in solution ensures that all users benefit from these enhancements without needing to install or maintain external add-ons.
Standardization: Making this part of the core ensures a consistent experience for all users and avoids potential compatibility issues that might arise with third-party add-ons.
The text was updated successfully, but these errors were encountered:
Calinou
changed the title
Improving MeshLibrary Usability in Godot
Add automatic preview generation, item removal/reordering and automatic mesh scaling to the MeshLibrary editor
Jan 5, 2025
Lack of basic management tools: There is no direct method to remove a specific item or reorder items in the library
There already is a method to remove items though? Or, do you mean a method to remove items by name?
About reordering: I assume that's not available because of how GridMap relies on item ID to work. So if you reordered the MeshLibrary item IDs, a GridMap that uses said MeshLibrary would repaint cells with different meshes.
Automatically Adjust Mesh Size to GridMap Cell Size
A toggle in the MeshLibrary inspector allows users to enable or disable automatic size adjustment.
I imagine a minority of meshes would benefit from this, it seems too specific.
Also, generally Resources have no awareness of the Nodes using them, so a setting to make the MeshLibrary adjust its meshes based on the GridMap's cell size is odd.
If the meshes are potentially changing based on the GridMap, might as well make this a GridMap option. That would make more sense, even though I still think it's a functionality with limited impact on usability.
Describe the project you are working on
This proposal aims to improve the usability of the MeshLibrary system in Godot by streamlining the process of adding, managing, and previewing meshes. Key features include automating preview generation, adding methods to remove specific items, and improving the overall workflow to make it more intuitive and efficient.
Describe the problem or limitation you are having in your project
The current MeshLibrary workflow in Godot is functional but cumbersome, particularly when dealing with larger libraries. Specific issues include:
These issues limit the usability of MeshLibrary, especially for beginners or projects requiring large numbers of meshes.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Introduce a more intuitive mechanism for adding items to the MeshLibrary:
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Removing items by ID:
Reordering items:
Implement a system to generate previews directly from the provided Mesh. This could utilize Godot’s rendering pipeline to automatically render the mesh in a Viewport and use the resulting texture as the preview.
Introduce functionality to dynamically adjust the size of meshes in the MeshLibrary to match the cell size of the associated GridMap.
Implementation Steps:
Editor Integration:
When a Mesh is added to the library, the editor checks the associated GridMap and adjusts the mesh size accordingly.
A toggle in the MeshLibrary inspector allows users to enable or disable automatic size adjustment.
An additional example with a custom feature:
custom_mesh_library.mp4
If this enhancement will not be used often, can it be worked around with a few lines of script?
Can it be worked around with a few lines of script?
Yes, the issues outlined can be partially addressed with custom scripts or add-ons. For example:
However, these solutions require extra work from users for what should ideally be built-in functionality. Integrating these features into the core would provide a unified, consistent, and out-of-the-box experience.
Is there a reason why this should be core and not an add-on in the asset library?
The text was updated successfully, but these errors were encountered: