Closed julienduroure closed 1 month ago
Im not an expert but this looks like the optimal solution for everyone. I would say the "export all vertex colors" should include the alpha channel of the VC as well. thank you! Im sure game engines will eventually switch to using custom attributes instead for vertex colors, but who knows how long that will be. (unreal might already but still supports VC)
I think you've covered all the bases and the extra explanation for the feature is important and helpful, thanks!
History of this PR:
Even if we truly think we need to put energy setting a global solution around custom attributes (When we say globally, it means from Blender, Unity, Godot, UE, threejs, Babylonjs, etc...), we also know that you have some pipeline and workflow already in production right now, and that the ideal solution will take some time to be implemented in all these softwares.
So here is our proposition:
This PR add a new panel with more options to choose at export:
This PR adds an option to export active VC as COLOR_0, even if not use in node tree as a multiplier of base color. The generated glTF can look wrong in viewer that are fully compliant with glTF, as the VC will be a multiplier of base color, where it is not in Blender viewport.
The default value is still "MATERIAL", as this is the option fully compliant with glTF Specification
When choosing ACTIVE, a warning will explaining that your workflow can be more robust with another solution:
You can also choose to never export VC:
You can now choose to export additional VC as COLOR_1, COLOR_2, etc...
This also add an option to choose what to do when there is no material. You can now choose to export active VC as COLOR_0, or not export any VC.