nutti / Magic-UV

Blender Add-on: Magic UV
http://nutti.github.io/Magic-UV/
Other
631 stars 46 forks source link

(UVs) Flip and Overlap Inspection in 3d #143

Closed mifth closed 3 years ago

mifth commented 3 years ago

Hi. Is it possible to add Flip and Overlap Inspection in 3d? It would be cool.

image

nutti commented 3 years ago

@mifth

I think it is possible. Which idea do you want to introduce to the add-on?

mifth commented 3 years ago

It would be super useful! I think color on the mesh as well as UV Inspection would be nice. In this case it would be possible to deselect all and make some changes in 3d while all colors will be seen.

nutti commented 3 years ago

OK, I try to add this feature. But I need a time because I already have other tasks.

mifth commented 3 years ago

No worries. Thank you a lot!

nutti commented 3 years ago

Sorry for late response. I will tackle this issue from now.

Select the overlapped/flipped faces as well as Select UV

At first, I will add the above feature.

mifth commented 3 years ago

No worries. Thank you a lot. This feature will be very useful.

nutti commented 3 years ago

Select the overlapped/flipped faces as well as Select UV

This one is now merged into master branch. The Selection Method option and Sync Mesh Selection option are added to specify how to select the faces.

I will tackle next one.

Paint color on the mesh as well as UV Inspection

I think this feature needs to be reviewed before merging into master branch.

mifth commented 3 years ago

I have tested. Works nice! You have added a checkbox.

nutti commented 3 years ago

@mifth

Paint color on the mesh as well as UV Inspection

I have finished to implement this feature. Could you try it before merging this feature to the master branch? https://github.com/nutti/Magic-UV/archive/issue_143.zip This feature is in early stage to release, so any feedbacks are welcomed.

I introduced Display View3D option to display overlapped/flipped faces in View3D.

mifth commented 3 years ago

Hi @nutti

Awesome! Some things I would check:

image

I tried to change to bgl.glVertex3f(co1, co2, co3) but I got exception.

mifth commented 3 years ago

tmp3.zip

Here is a model to play with.

mifth commented 3 years ago

Also I could not try to set bgl.glDisable(bgl.GL_DEPTH_TEST) as polygons are drawn in 2d.

nutti commented 3 years ago

Thanks for your feedback! I applied your requests.

I tried to change to bgl.glVertex3f(co1, co2, co3) but I got exception. Also I could not try to set bgl.glDisable(bgl.GL_DEPTH_TEST) as polygons are drawn in 2d.

This is because the compatibility module bglx does not support these API. https://github.com/nutti/Magic-UV/blob/master/src/magic_uv/lib/bglx.py I added these API now, so you can try them now :)

mifth commented 3 years ago

Sorry, I could not handle your code. I had some errors. But I have found an example where is no flickering of polygons. Just press play in my scene. I attached a zip file below.

image

tmp2.zip

nutti commented 3 years ago

@mifth

Thanks for the reference code. This helps me a lot! I applied this code to the add-on and works fine for me. Could you try the add-on again. https://github.com/nutti/Magic-UV/archive/issue_143.zip

The flicking issue comes from the procedures to do occlusion culling manually. I hope the current code works for your environment.

mifth commented 3 years ago

@nutti Awesome! All looks amazing! Thank you a lot.

image

nutti commented 3 years ago

@mifth

Thanks for your feedback and help. I will merge this feature to master branch soon.

mifth commented 3 years ago

Thank you too. Awesome tools!

nutti commented 3 years ago

This feature is now merged to master branch. Thanks for your help @mifth .