-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow mesh Vertex Colors to be imported from Blender file even when not used by material #97984
base: master
Are you sure you want to change the base?
Conversation
…ot used by material
Remember that the definition of vertex color is that it affects the PBR rendering, if you are using it for data or for example visualizing the weight painting it will give invalid pbr results. (Like base color multiplied with the flow map per vertex for example) Also vertex color is most commonly an unused channel because the preferred workflow is uvs and a map [texture]. We have up to 8 uvs. Edited: For the longest time Godot Engine removed vertex colours so adding this should be defaulted to that status quo of removing vertex colors and letting the developer swap to this other mode. Edited: There was a debate about vertex colors on the blender io repository for GLTF, research into the conclusion of may inform our decisions. |
See also #81740 (Enable vertex colors by default on Blender importer settings) |
@fire Perhaps we should change this user-facing boolean to be a dropdown enum? "None", "Material", "All"? |
That might get a bit messy. "None", "Material", "All" only applies to Blender 4.2 and later. Earlier version use a simple boolean value. (eg. from 3.0 |
Correct - I had been using Blender 4.0 as the importer previously (with vertex colors importing correctly) but had to switch over after realizing that sharp edges weren't importing, which was fixed by switching to Blender 4.2.2 (can't find the PR for that, but unrelated) The vertex color bug I reported (#97953) is only present for Blender 4.1 onwards. I believe that's because of this controversial Blender 4.1 PR. Then that default behavior was turned into the export toggle for 4.2 with this PR. The effects of these Blender changes are still felt for Godot's importer because of the lack of an import toggle (like Blender's 4.2 export toggle), or this thread's PR making all active colors imported by default (pre-Blender 4.1 behavior) |
Fixes #97953
Vertex Colours were not being imported in Blender files if they were on meshes that didn't have materials attached. This is because
export_vetex_color
was set toMATERIAL
(see here: https://docs.blender.org/api/current/bpy.ops.export_scene.html ). This PR switches the option toACTIVE
so that Vertex Colors get imported even when the mesh they're on doesn't use a material (check linked Issue for screenshots).