[Addon] Mesh Utils

Hello guys,

Up to date list of tools:

  • select overlapping based on KDTree/BVHTree
  • select interior faces based on AO map baking
  • select CREASE/BEVEL/SEAM/SHARP/FREESTYLE by trait instead of similarity(doesn’t require edge preselect)
  • mesh from UVs

Since there’s no easy way of selecting ovelapping geometry in blender I decided to write my own script for this purpose. It’s useful in boolean workflows when you want to select duplicated inner faces as a result of boolean slice, but it can be usefull in other situations when dealing with overlapping geometry.

The script is context sensitive to VERT/EDGE/FACE mode in order to properly select only the geomery you need.

Features:

  • select doubles VERT/EDGE/FACE
  • select intesecting faces
  • select coplanar intersecting faces

Implementation wise: it’s based on KDTree and BVHTree with some improvements and workarounds. More details are available on github.

So, here it is: https://github.com/rpopovici/mesh-utils

If you have any idea about how to improve it, feel free to C&C

Also, in the near future I will try to write something similar for UV overlapping Looks like there are some solutions for UV overlapping in Magic UV and TextTools. No need to reinvent the wheel

Here is a clean up example for lots of boolean slices:

Hi-poly with multiple materials

Before: triangulated lo-poly

Overlapped selected

After: overlapping detele and face clean up with limited disolve

13 Likes

v0.2 released

  • context sensitive UI
  • force context update in edit mode for recently modified geometry

v0.3

  • fix coplanarity detection for oposite angles(180 deg)

v0.4

  • exclude hidden from selection

v05

  • add select interior
  • select CREASE/BEVEL/SEAM/SHARP/FREESTYLE by trait instead of similarity
  • add UV to mesh operator with interpolation

v0.7

  • performance boost for select interior
  • expand range in hit_test
  • ignore hidden faces

v0.8

  • diffuse baking as an alternative to AO(works better with holes)
  • expose diffuse baking bounces
  • turn off caustics
  • better noise reduction algorithm

v0.9

  • fix after latest blender 2.8 updates
1 Like

I wll give it a try but if it does what I am thinking it does, it can be very useful for selecting those overlaps and put them in a group and add some relax/smoothing to push them away.

Simpler use cases

3 Likes

Cool already useful :smile:
it’s acts strangely when you hide an element https://blenderartists.org/uploads/default/original/4X/b/d/8/bd866a505823a57b27d3fe2b5b8dd05b5945cba9.mp4

@Kouza_Nagi it should be fixed in v0.4, and thanks for pointing that out

2 Likes

I have added some new tools to my addons project

Select interior faces quick example:
Before:

After:

This solution is based on Cycles map baking (DIFFUSE or AO). UV unwrapping is NOT required for this tool to work. The mesh is automaticaly unwrapped with smart project into a separate UV layer. Normaly you would want to do a “bake to vertex” but this is not possible right now in b2.8. So, I am baking to image and then I am interpolating face/vertex position inside the UV map. Everything completely black in the AO map is hidden behind some geometry.
For some reason, the baker is leaking light sometimes in areas where it should not be. You might get some false positive selection there. I am still trying to figure this one out…
As an workaround to this problem:

  • you can try to run this tool in DIFFUSE mode
  • higher resolution baking = slower
  • increase the number of bounces
  • run multiple times until no inner face remains(requires visual inspection :slight_smile:
6 Likes

Hopefully these tools can be fixed for the recent API changes! It’s something I use daily.

I’l try to fix it as soon as possible

1 Like

Done. v0.9 should work as expected

1 Like