JoseConseco / GoB

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

Blender 3.5 does not export vertex colors to ZBrush #412

Closed FatCatArt closed 1 year ago

FatCatArt commented 1 year ago

I have noticed that Blender 3.5 does not export vertex colors to ZBrush. When I export a model with vertex colors from Blender to ZBrush, the vertex colors are not preserved in the exported file. In Blender 3.4 it works just fine.

brandonlafrance commented 1 year ago

I'm also experiencing this issue, a fix would be great. If you need any additional information or help reproducing this, please reach out! Thanks for all the hard work!

kromar commented 1 year ago

I can not reproduce this, please provide detailed information on the addon settings and the steps to reproduce this issue.

brandonlafrance commented 1 year ago

I can not reproduce this, please provide detailed information on the addon settings and the steps to reproduce this issue.

Thanks for looking into this!

I'm on Blender 3.6.1, ZBrush 2023.1, GoB 3.5.92, and Windows 10. Plugin settings below.

image

All other functions seem to work as expected. Steps to reproduce:

  1. Open a new scene
  2. Select the default cube
  3. Enter Vertex Paint Mode
  4. Apply a vertex color to the entire object
  5. Press "Export" button

Cube is imported into ZBrush, but no Polypaint data is transferred.

Blender, by default, names the mesh's Color Attribute as simply, "Attribute". Renaming the attribute to "Col" does not seem to have any effect.

kromar commented 1 year ago

Thanks for the details, i was able to reproduce the issue. I made a fix for the vertex colors, would be great if you could see if it works for you. It should export the active vertex color attribute but i think the import at the moment creates a new one called Col, i can have a look at that tomorrow and see if i can find some logic to handle the scenario where there is a active vertex color and using that for the import instead of creating a new one.

v3.6.0 https://github.com/kromar/blender_GoB/tree/fix-vertex-colors https://github.com/kromar/blender_GoB/archive/refs/heads/fix-vertex-colors.zip

brandonlafrance commented 1 year ago

@kromar After a bit of testing, it looks like Vertex colors are getting transferred now. Huzzah!

This may be a different bug, but I did notice some weirdness where some values were being imported incorrectly, I think due to the way Polypaint is per vertex, whereas color attributes in Blender are set to "Face Corner" by default. Changing the color attribute from "Face Corner" to "Vertex" seems to fix this inconsistency on import, however exporting throws this error:

image

brandonlafrance commented 1 year ago

Just wanted to add that the inconsistency described above is easiest to observe on the default cube where the corners share different colors. My method to reproduce:

  1. In Blender, set vertex color to red
  2. Export
  3. In ZBrush paint only half verts blue
  4. GoZ

This is probably less noticeable on more complex geometry.

Also one final note, I'm not sure if this is something you fixed since your last post, but it appears that the imported vertex color is being applied to the active color attribute, which is nice.

kromar commented 1 year ago

i pushed a fix for the export issue, let me know if you still have issues with this https://github.com/kromar/blender_GoB/tree/fix-vertex-colors https://github.com/kromar/blender_GoB/archive/refs/heads/fix-vertex-colors.zip

If you still encounter some inconsistencies, please provide some details how to reproduce it as it seems to work correct now on my side.

brandonlafrance commented 1 year ago

@kromar Tested your fix, and it looks like everything is working as expected! Thanks a ton for all of your help! Is there any way I can buy you a coffee and/or beer?

kromar commented 1 year ago

@kromar Tested your fix, and it looks like everything is working as expected! Thanks a ton for all of your help! Is there any way I can buy you a coffee and/or beer?

Im happy to hear that it works now! Thanks for reporting /contributing to the issue, it makes the work a lot easier! Sure here you can buy me a coffee:D https://ko-fi.com/kromar

miaumori commented 1 year ago

hellow, im on blender 3.6.2 and addon ver 3.6.1. ZBrush ver 2023 build 28, when im exporting to ZBrush my mesh vertex colour are wrong, i dont know why though

my colours in blender: изображение

exported to zbrush: изображение

kromar commented 1 year ago

hellow, im on blender 3.6.2 and addon ver 3.6.1. ZBrush ver 2023 build 28, when im exporting to ZBrush my mesh vertex colour are wrong, i dont know why though

hm that does not look right, is it possible for you to share a model which i can use to reproduce the issue?