Skip to content
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

Uvs are flipped when sent to ZB #397

Open
kromar opened this issue Jan 2, 2023 Discussed in #384 · 7 comments
Open

Uvs are flipped when sent to ZB #397

kromar opened this issue Jan 2, 2023 Discussed in #384 · 7 comments
Assignees
Labels

Comments

@kromar
Copy link
Collaborator

kromar commented Jan 2, 2023

Discussed in #384

Originally posted by canderled December 8, 2022
Hello guys, is there an option or a way to avoid aving the UVs being flipped when sent to and imported from ZB using the GOB ? this is specially annoying when working with udim.

UVFlipped

@kromar kromar added the bug label Jan 2, 2023
@kromar kromar self-assigned this Jan 2, 2023
@kromar
Copy link
Collaborator Author

kromar commented Jan 2, 2023

@canderled I changed the way meshes are flipped in the version linked (3.5.99), it would be great if you could give this a try and let me know if it still causes the same uv mirroring for you. Be aware that this is still work in progress and you most likely will encounter some issues with mesh translations.
https://github.com/kromar/blender_GoB/tree/feature/keep-transfomrmations

Note: there are new options in the export/import tabs to specify the model transformations
image

@canderled
Copy link

@kromar Thanks for checking this issue.
Still got the flipped UV in ZBrush.

I also discover another bug but I think it's on GoZ/Zbrush side. Look like GoZ rename - to _ when exporting(Cube-A to Cube_A) so when it got back to Blender, the mesh isn't replaced.

GoB_FlippedUV_02

@kromar
Copy link
Collaborator Author

kromar commented Jan 2, 2023

so as long as you transfer with GoB the UV map is ok but when you export a obj from zbrush to blender you get the flipped uv's? does not sound like its a GoB issue but rather a configuration issue on Zbrush, did you try changing the import/export flip options in zbrush to see if you can resolve this issue?
image

The renaming is a known issue of Zbrush, it can not handle the - and will rename those meshes, unfortunately there is nothing i can do about this since it is closed source from pixologic.

@canderled
Copy link

I think it's a GoZ issue then, not ZBrush. the IFlip will actually flip the mesh not the UVs.
Not sure if it's hard to add but an option in the GoB addon to flip the UVs both at import and export on the Blender side would solve this issue. I tried to make a script/macro for this but I couldn't make it work in the UVeditor .

I'll check with the pixologic team for the - issue.
Thanks

@kromar
Copy link
Collaborator Author

kromar commented Jan 2, 2023

can you upload a .obj or better a .ztl where i can reproduce the issue? so i can export it from zbrush with .obj, import in blender and send it to zbrush again?
If i can reproduce it i think it might be possible to fix it somehow

@canderled
Copy link

In the Zip^you can get the blender file and ZB file. In the ZB file, you'll find one folder with the GoB mesh (with flipped UV) and one folder with the correct mesh imported the regular way.

GOBFlippedUv.zip
GoB_FlippedUV_03

@canderled
Copy link

canderled commented Jan 3, 2023

In case it can help, here is my workaround in the UVeditor. As I said, I tried to make a script with this but it doesn't work. From what I understood, UVeditor doesn't work like 3D viewport, you need extra line to make it work but it goes far beyond my skills...

bpy.ops.object.editmode_toggle()
bpy.ops.uv.select_all(action='SELECT')
bpy.context.space_data.cursor_location[1] = 0.5
bpy.context.scene.tool_settings.use_uv_select_sync = True
bpy.context.space_data.pivot_point = 'CURSOR'
bpy.ops.transform.resize(value=(1, -1, 1), orient_type='GLOBAL', orient_matrix=((1, 0, 0), (0, 1, 0), (0, 0, 1)), orient_matrix_type='GLOBAL', constraint_axis=(False, True, False), mirror=False, use_proportional_edit=False, proportional_edit_falloff='SMOOTH', proportional_size=1, use_proportional_connected=False, use_proportional_projected=False, snap=False, snap_elements={'INCREMENT'}, use_snap_project=False, snap_target='CLOSEST', use_snap_self=True, use_snap_edit=True, use_snap_nonedit=True, use_snap_selectable=False)
bpy.ops.object.editmode_toggle()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants