Magic-UV icon indicating copy to clipboard operation
Magic-UV copied to clipboard

Texture Lock issues 2#

Open NO4ME opened this issue 6 years ago • 12 comments

Hi,

I have found new important issues.

  1. merging uvs if mesh is connected
  2. can't move group vertices for longer distances
  3. undo creates artefacts

Video: https://uloz.to/!gTFFZO0AL35G/issues-mkv

Please ask any questions and thank you.

NO4ME avatar Jun 12 '18 10:06 NO4ME

merging uvs if mesh is connected

Can you tell me the situation more detail. What is the situation "mesh is connected"?

can't move group vertices for longer distances

Sorry, Texture Lock is only expected for the usage to tweak the vertices. Texture Lock does not support to move longer distance.

undo creates artefacts

What is the expectation of this? I think undo shouldn't the UV breakage.

nutti avatar Jun 12 '18 11:06 nutti

Arent the UV destroyed because you cut and mirror them? I dont think Lock UV can ever work when you change the mesh while its locked.

schroef avatar Jun 13 '18 01:06 schroef

ok, so "What is the situation "mesh is connected"?" -Lets say you have created a cylinder with UVs. Now you want to move vertex but It connects to itself and makes unexpected behavior. There is just no way to use texture lock - and so it makes it impractical. This is comparison between Blender and Maya (and i want to use Blender ;) ). move

"Sorry, Texture Lock is only expected for the usage to tweak the vertices. Texture Lock does not support to move longer distance."

  • I'm sorry but it should. Perserve Uvs works that way and its expected to just move any distances. So many times you need to move whole object. Its useful feature. Is possible to use texture lock for UVs in the future? Maybe like second mode :D "What is the expectation of this? I think undo shouldn't the UV breakage."
  • Undo returns vertex position but it mess up mapping. The expectation is to undo last operation user did (not computer) and that is return vertex position with mapping

"Arent the UV destroyed because you cut and mirror them? I dont think Lock UV can ever work when you change the mesh while its locked." -It was basic situation when UVs are at different positions then vertices

I work in game industry and those are things you need for work.

Thank you guys for making Blender better.

NO4ME avatar Jun 13 '18 08:06 NO4ME

Before answering, I would like to say that Blender has a limitation which Maya does not have. From the technical speaking, some feature can not be realized completely.

Lets say you have created a cylinder with UVs. Now you want to move vertex but It connects to itself and makes unexpected behavior. There is just no way to use texture lock

I think this is the one of the limitation of Magic UV. Texture Lock can remain UV only when the moved vertex whose UV is connected to adjacent vertex.

I'm sorry but it should. Perserve Uvs works that way and its expected to just move any distances.

I think so. I engaged to realize this feature for long term, but I could not realize this feature. If I could check the Maya's algorithm, I may able to realize. But I'm not sure.

Undo returns vertex position but it mess up mapping. The expectation is to undo last operation user did (not computer) and that is return vertex position with mapping

Got it. I'll check it.

nutti avatar Jun 13 '18 10:06 nutti

I think this is the one of the limitation of Magic UV. Texture Lock can remain UV only when the moved vertex whose UV is connected to adjacent vertex.

I understand and hope there is a way to achieve the same or better result

I think so. I engaged to realize this feature for long term, but I could not realize this feature. If I could check the Maya's algorithm, I may able to realize. But I'm not sure.

Thank you. Unfortunately I can't give you any code from Maya.

Got it. I'll check it.

Awesome and thanks :)

NO4ME avatar Jun 13 '18 13:06 NO4ME

undo creates artefacts

I checked this one. I found that two operations are executed while Texture Lock is enabled.

  • Move Vertex
  • Move UV

So, this problem is solved by applying undo twice.

nutti avatar Jun 18 '18 02:06 nutti

So, this problem is solved by applying undo twice.

Is there a way to solve it by applying undo only once?

NO4ME avatar Jun 18 '18 06:06 NO4ME

Is there a way to solve it by applying undo only once?

Currently, I have no idea to realize it. In Blender, There are two operations in Texture Lock. If I revised the Blender itself, I will do. But I could not realize this only from add-on.

All you reported on this issue. I will remain this issue as opened and help wanted. I'll wait the contribution everyone.

nutti avatar Jun 18 '18 07:06 nutti

For everyone,

The below issues are contribution welcomed.

  • [ ] Merge UV if mesh is connected
  • [ ] Move group vertices for longer distances
  • [ ] Undo support (Only one undo returns UV as well)

Feel free to send me pull request, or suggestions. Thanks.

nutti avatar Jun 18 '18 07:06 nutti

I am getting an error when using texture lock on Blender 2.8. Happens sometimes when the Unlock button is pressed- Traceback (most recent call last): File "C:\Users\John\Desktop\blender-2.80.0-git.66684bdff30f-windows64\2.80\scripts\addons\magic_uv\op\texture_lock.py", line 367, in execute ll, uv_layer, verts_orig, v, ini_geom) File "C:\Users\John\Desktop\blender-2.80.0-git.66684bdff30f-windows64\2.80\scripts\addons\magic_uv\op\texture_lock.py", line 138, in _get_target_uv phi0 = theta0 * ini_geom["phi0"] / ini_geom["theta0"] ZeroDivisionError: float division by zero

johnrossporter avatar Jul 12 '19 23:07 johnrossporter

Implemented in Blender https://projects.blender.org/blender/blender/issues/78416

EugeneDudavkin avatar Mar 22 '23 06:03 EugeneDudavkin

@EugeneDudavkin

Thanks for your information. I think current Magic UV implementation is bad for the cost and the completion. So, I will remove this feature from Magic UV in Version 6.8.

nutti avatar Mar 22 '23 09:03 nutti