JoseConseco / GoB

Fork of original GoB script (I just added some fixes)
GNU General Public License v3.0
648 stars 78 forks source link

Vertex Color/Polypaint Round Trip Issues (with v3_6_0) #427

Closed LordNed closed 1 year ago

LordNed commented 1 year ago

I saw there were some other Issues touching on the same topic but the users hadn't tried the update.

Before 3.6.0 I could paint in zBrush, GoB it to Blender, and I would get vertex colors on meshes, but I could not round-trip - sending it back to zBrush resulted in a white painted mesh in zBrush.

After installing 3.6.0, Materials are not automatically being created in Blender which makes it appear that importing vertex colors does not work.

Repro: Set the following GoB settings: image image

In ZBrush, insert a PolyMesh3D star to your sub-tool list. Go to "Color" and then "Fill Object" (after choosing a non-white color) GoZ it to Blender. In Blender, switch the Viewport to Material Preview. Click your PolyMesh3D star. Check that it has a "Col" Color Attributes group, but no material is assigned. image

Make a mesh edit (such as changing a vertex location), and Export it back to zBrush. Note that the colors correctly round-tripped (even if you couldn't see them in Blender). image

If you make a material and assign the Color Input, then you can see vertex colors. image

Side note: I had some confusion after upgrading, existing meshes that I had been working with were only partially round-tripping (which is why I've edited this Issue 3 times now 😄). When I started with a new mesh in zBrush and imported it into a new object in Blender, that exposed only the Material issue, the actual vertex colors correctly round-trip regardless of the material. So users may run into confusion if they upgrade and then try using it on a project that was already WIP.

Blender 3.6.2 GoB: 3.6.0 zBrush: 2022.0.6

kromar commented 1 year ago

Thanks for reporting, this looks like the material creation is not working any longer for vertex colors. Just to verify that i understand correctly, the confusion comes from the missing material which should be created from importing with the "Import material from polypaint" option?

kromar commented 1 year ago

I made a fix for this issue in v3.6.1 let me know if you run into some other issues https://github.com/kromar/blender_GoB/archive/refs/heads/fix-import-material-from-polypaint.zip

LordNed commented 1 year ago

@kromar That version fixes the issue, and I can successfully round-trip from zBrush -> Blender -> zBrush, thank you!

kromar commented 1 year ago

@LordNed version 3.6.1 has the latest fixes, it is not yet back in master since there have been other issues discovered with polypaint so im looking into that. This is the issue where it is mentioned: https://github.com/JoseConseco/GoB/issues/412