# Feature request: add ACVD uniform remeshing filter

**URL:** <https://discourse.vtk.org/t/feature-request-add-acvd-uniform-remeshing-filter/10346>\
**Category:** Development\
**Created:** [December 31, 2022, 2:50pm UTC](https://discourse.vtk.org/t/feature-request-add-acvd-uniform-remeshing-filter/10346 "2022-12-31T14:50:55Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![lassoan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lassoan/32/50_2.png) [@lassoan](https://discourse.vtk.org/u/lassoan)\
**Post date:** [December 31, 2022, 2:50pm UTC](https://discourse.vtk.org/t/feature-request-add-acvd-uniform-remeshing-filter/10346/1 "2022-12-31T14:50:55Z")

</div>

A robust, high-quality uniform remeshing filter is an essential tool in any mesh modelling library. I know that VTK was originally not meant for modelling and probably there was no known open-source algorithm for uniform remeshing. But VTK has some excellent modelling tools now, VTK is widely used for modelling, and the open-source ACVD algorithm has proven to work _very well_ for generating high quality uniform meshes.

Therefore, it would be time to add [ACVD remeshing](https://github.com/valette/ACVD) to VTK.

It has a BSD-type license. There is also a simplified implementation (uniform remeshing only) in Python (pyacvd), which would be sufficient.

We have recently made available this pyacvd implementation in 3D Slicer and it works amazingly well and it is already brought very significant improvements into several mesh modeling workflows. Here is a quick comparison with fast quadric decimation:

 ![image](https://discourse.vtk.org/uploads/default/original/2X/1/124372e76aa5172dfe96de930b1f97c8592c2bcd.jpeg)

I know that I cannot “request” a feature without offering funding or contribution, I just wanted to bring this algorithm into VTK core developers’ attention. When a funded project requires high-quality uniform meshes then adding an ACVD might be added to the scope, as it may very significant quality improvements in any case when uniform point distribution on a surface mesh is needed.

@cory.quammen @Yohann_Bearzi @banesullivan @akaszynski

---

<div class="post-metadata">

**Author:** ![will.schroeder](https://discourse.vtk.org/user_avatar/discourse.vtk.org/will.schroeder/32/233_2.png) [@will.schroeder](https://discourse.vtk.org/u/will.schroeder)\
**Post date:** [December 31, 2022, 3:48pm UTC](https://discourse.vtk.org/t/feature-request-add-acvd-uniform-remeshing-filter/10346/2 "2022-12-31T15:48:50Z")

</div>

Andras, thanks for the heads up, this looks interesting. I assume you’ve tried this on topology / Euler numbers != 2 etc. – any unusual experiences or limitations that you’ve encountered would be interesting to me (before I dig into the paper(s)).

Others such as [@Bob O’Bara](mailto:bob.obara@kitware.com) and [@Spiros Tsalikis](mailto:spiros.tsalikis@kitware.com) may be interested as well.

---

<div class="post-metadata">

**Author:** ![lassoan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lassoan/32/50_2.png) [@lassoan](https://discourse.vtk.org/u/lassoan)\
**Post date:** [December 31, 2022, 4:03pm UTC](https://discourse.vtk.org/t/feature-request-add-acvd-uniform-remeshing-filter/10346/3 "2022-12-31T16:03:53Z")

</div>

I only have first-hand experience with the simplified pyacvd implementation and it is very robust. It works well for open surfaces or surfaces with holes, too.

Left: original surface (11.4k points). Right: pyacvd result (1k points).

 ![image](https://discourse.vtk.org/uploads/default/original/2X/4/466d3d4e6d2ddae578372588aaf82345dfcf36a2.jpeg)

Disconnected meshes are handled correctly:

 ![image](https://discourse.vtk.org/uploads/default/original/2X/3/3de0e97a90e450e6d13cad32c7c7217dd211548a.jpeg)

Even works for a Klein bottle:

 ![image](https://discourse.vtk.org/uploads/default/original/2X/5/5e381864929b7bbe07463b4077cee32957498d26.jpeg)

Complex meshes with non-manifold edges don’t seem to cause any problems either:

 ![image](https://discourse.vtk.org/uploads/default/original/2X/0/09458bbbe6cd8f5f231e542da70ce6a68583466e.jpeg)

---

<div class="post-metadata">

**Author:** ![banesullivan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/banesullivan/32/7143_2.png) [@banesullivan](https://discourse.vtk.org/u/banesullivan)\
**Post date:** [December 31, 2022, 4:24pm UTC](https://discourse.vtk.org/t/feature-request-add-acvd-uniform-remeshing-filter/10346/4 "2022-12-31T16:24:40Z")

</div>

This would be a great addition to VTK! I want to provide a link to the mentioned pyacvd which @akaszynski implemented: [GitHub - pyvista/pyacvd: Python implementation of surface mesh resampling algorithm ACVD](https://github.com/pyvista/pyacvd)

This Python package works within PyVista’s ecosystem and thus works very well with VTK in Python. However, having this directly in VTK and in C++ would be much better

---

<div class="post-metadata">

**Author:** ![akaszynski](https://discourse.vtk.org/user_avatar/discourse.vtk.org/akaszynski/32/10751_2.png) [@akaszynski](https://discourse.vtk.org/u/akaszynski)\
**Post date:** [January 2, 2023, 3:56pm UTC](https://discourse.vtk.org/t/feature-request-add-acvd-uniform-remeshing-filter/10346/5 "2023-01-02T15:56:53Z")

</div>

> There is also a simplified implementation (uniform remeshing only) in Python (pyacvd)

My implementation is somewhat less stable than [ACVD](https://github.com/valette/ACVD), but it should work. If you’re going to implement a solution directly within VTK, I’d go with using ACVD.

---

<div class="post-metadata">

**Author:** ![will.schroeder](https://discourse.vtk.org/user_avatar/discourse.vtk.org/will.schroeder/32/233_2.png) [@will.schroeder](https://discourse.vtk.org/u/will.schroeder)\
**Post date:** [January 6, 2023, 4:35pm UTC](https://discourse.vtk.org/t/feature-request-add-acvd-uniform-remeshing-filter/10346/6 "2023-01-06T16:35:03Z")

</div>

I checked out a few papers last night, this is definitely a valuable piece of work and would be a good addition to VTK. My only grumble is that the algorithm is referred to as “fast” in the literature but from the data sizes, timings, etc. I think it’s slow (although relative to other remeshers etc, it may be fast, but I bet we could do 10x or better - although it’d be tricky to multithread).

---

<div class="post-metadata">

**Author:** ![toddy](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/t/edb3f5/32.png) [@toddy](https://discourse.vtk.org/u/toddy)\
**Post date:** [January 7, 2023, 10:45pm UTC](https://discourse.vtk.org/t/feature-request-add-acvd-uniform-remeshing-filter/10346/7 "2023-01-07T22:45:55Z")

</div>

Does this work with quadratic or cubic elements?

---

<div class="post-metadata">

**Author:** ![will.schroeder](https://discourse.vtk.org/user_avatar/discourse.vtk.org/will.schroeder/32/233_2.png) [@will.schroeder](https://discourse.vtk.org/u/will.schroeder)\
**Post date:** [January 8, 2023, 12:32pm UTC](https://discourse.vtk.org/t/feature-request-add-acvd-uniform-remeshing-filter/10346/8 "2023-01-08T12:32:23Z")

</div>

Triangle meshes…

---

<div class="post-metadata">

**Author:** ![toddy](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/t/edb3f5/32.png) [@toddy](https://discourse.vtk.org/u/toddy)\
**Post date:** [January 9, 2023, 2:37am UTC](https://discourse.vtk.org/t/feature-request-add-acvd-uniform-remeshing-filter/10346/9 "2023-01-09T02:37:49Z")

</div>

@will.schroeder Triangles, yes, but can they be higher order than just linear?

---

<div class="post-metadata">

**Author:** ![mwestphal](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mwestphal/32/19_2.png) [@mwestphal](https://discourse.vtk.org/u/mwestphal)\
**Post date:** [May 30, 2023, 7:26am UTC](https://discourse.vtk.org/t/feature-request-add-acvd-uniform-remeshing-filter/10346/10 "2023-05-30T07:26:34Z")

</div>

FYI @Charles_Gueunet
