Automatically assign PBR textures from base texture name in BaseMaterial3D#99838
Automatically assign PBR textures from base texture name in BaseMaterial3D#99838Calinou wants to merge 1 commit intogodotengine:masterfrom
Conversation
|
Love this! Does this also work when drag-dropping from the FileSystem? |
|
Since this is a hidden feature, can you add some documentation for it in the editor? |
aa445d7 to
d436854
Compare
This currently doesn't apply to either drag-and-dropping onto an object in the 3D viewport, or drag-and-dropping onto a material property in the inspector. It only applies to drag-and-dropping onto a texture property in a material resource in the inspector. I remember editing the drag-and-drop code at some point, so maybe it should be feasible to implement.
Done. |
4b7201f to
9083c87
Compare
Perfect! That's what I meant! :)
I assume here you mean drag dropping a single texture onto a meshinstance or material property, and it setting up a StandarMaterial3D/ORM for you with the complete textureset? If that's the case, I assume it would be a unique material every time? (Seems like a hard problem to solve otherwise) |
|
Sounds neat but please not as a hidden miracle. Make this texture auto behavior an Editor setting that can be enabled by default but has the option to be disabled. Some people get annoyed by the extra clicks of adding textures but I get at least equally annoyed when I have to stare at a frozen Godot due to texture load and add that blocks me from doing anything while firing its selective convenience feature that I dont need. I regularly only want to drag in the albedo texture for a quick model test, not loading all the other textures on purpose because it is so slow. I dont want to rename all those files just to avoid a hidden miracle feature. |
Yes, but it's already the case with how the feature works currently. |
9083c87 to
10d1f02
Compare
1bb24da to
ea23454
Compare
There was a problem hiding this comment.
This note is so much. It would be so INSANELY annoying to read and localize for absolutely everything where this applies. I also am not sure if most of this is necessary, given the setting is enabled by default, and the editor tells you about this action happening. I think the information of what naming standards automatically enable this feature need a better place to exist.
ea23454 to
9635cf0
Compare
…ial3D This works based on a common set of texture name conventions that most texture sites out there follow. It works with both StandardMaterial3D and ORMMaterial3D. If mismatched textures are detected (compared to the current material type), a notice is displayed. Since this is implemented in EditorInspectorPluginMaterial, this only affects textures set in the inspector, similar to the existing behavior where `roughness` and `metallic` are automatically set to `1.0` when assigning a texture to them.
9635cf0 to
3349749
Compare
|
I agree with @smix8 that this feature shouldn't be a hidden miracle, but disabling it by default hurts discoverability a lot. |


This works based on a common set of texture name conventions that most texture sites out there follow. It works with both StandardMaterial3D and ORMMaterial3D. If mismatched textures are detected (compared to the current material type), a notice is displayed.
Since this is implemented in EditorInspectorPluginMaterial, this only affects textures set in the inspector, similar to the existing behavior where
roughnessandmetallicare automatically set to1.0when assigning a texture to them.Testing project: test_pbr_autofill.zip
Preview
editor_pbr_autofill.mp4
TODO
std::initializer_listconstructor for Dictionary. #99751 so the dictionary assignment can be performed statically and moved to the header (since it's read from a static method).