Issues importing vertex colors from blender

Godot Version

Godot 4.2.1

Question

For details in my game’s environment, I am trying to use vertex colors to add edge wear to an underlying texture. As can be seen below, the vertex colors look normal in Blender (the lighter edges on the model):

However, when imported to Godot, the vertex colors completely freak out and cause this weird effect:

If I could access the shader that Godot is using for this model I could simply set it up in the same way that it is in Blender and add the vertex colors to the image texture. However, I cannot figure out how to do this from a Blender import. How could I go about making the import replicate the Blender screenshot above?

This is the StandardMaterial3D setting that uses vertex colors for albedo, which you might be able to use to make sure that vertex colors look correct:

image

You also need to make sure that “Colors” is checked in import settings:

If you are exporting glTF from blender and importing that, as opposed to importing the blend files directly, you also need to make sure that “Vertex Colors” is checked in the glTF export settings:

But, from the screenshot you shared, this doesn’t look like an issue with vertex colors. This looks like z-fighting with another mesh, maybe an untextured copy of the same mesh. Are you sure there aren’t two overlapping meshes in your scene?

Sometimes with 4.2.1 I’ve had issues where re-importing a changed model causes it to be sort of duplicated until I quit and reopen the project. If there aren’t overlapping meshes in your scene there could possibly be something like that happening, and might be fixed if you quit and reopen?

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.