godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.12k stars 69 forks source link

Allow for 3D scene material vertex color to be imported as sRGB by default using import settings #5576

Open Merlin1846 opened 1 year ago

Merlin1846 commented 1 year ago

Describe the project you are working on

A 3D arena fighter making heavy use of gltf voxel models with vertex colors.

Describe the problem or limitation you are having in your project

I have to manually go to each material after I import it and hit vertex color is srgb true. And I plan for these models to be able to be imported this would mean that they would need to be set manually or detected and set automatically.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

If it is in the import menu then it can be saved with the default import settings and applied automatically for every model when imported.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

Click albedo/vertex color is srgb in gltf importer, then material when imported will be saved with srgb == true.

If this enhancement will not be used often, can it be worked around with a few lines of script?

It could be an editor plugin or a bash script that searches all or some directories and externally modifies the variable of any materials found alongside gltf files.

Is there a reason why this should be core and not an add-on in the asset library?

This would make using gltf models easier out of the box rather than having to search for/create a separate program/script to do it or even just manually do it for every single model.

Calinou commented 1 year ago

Should the vertex colors themselves be converted, or should the material have Vertex Color > Is sRGB enabled instead?

Merlin1846 commented 1 year ago

Enableing it would work.

fire commented 1 year ago

There is a test model for this. the previous behavior broke standard models. Need to find them again to see if changes broke them.