<h3>Background</h3>
<p>I need to remesh by OpenVDB, like what <a href="https://docs.blender.org/manual/en/dev/modeling/modifiers/generate/remesh.html" rel="nofollow noreferrer">Blender remesh</a> does:</p>
<p><a href="https://i.sstatic.net/CJikC.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/CJikC.png" alt="Blender screenshot" /></a></p>
<blockquote>
<p>Voxel</p>
<p>Uses an OpenVDB to generate a new manifold mesh from the current geometry while trying to preserve the mesh’s original volume.</p>
</blockquote>
<h3>Problem</h3>
<p>The problem is that OpenVDB gets a constant <em>voxel size</em>. But I have meshes with varying polygon density/granularity, i.e. high-detail and low-detail components. To preserve the topology of high-detail components, the <em>voxel size</em> has to be too small for the whole 3d model.</p>
<p><a href="https://i.sstatic.net/jdt0F.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/jdt0F.png" alt="Polygon granularity/density" /></a></p>
<h3>Possible workaround</h3>
<p>A mesh might be broken down into distinct components of higher detail and lower detail.</p>
<h3>Question</h3>
<p>Is there any algorithm or library to help me break down the mesh into distinct components according to level of detail? I looked at <a href="https://doc.cgal.org/latest/Polygon_mesh_processing/index.html" rel="nofollow noreferrer">CGAL</a>, but I couldn't figure out.</p>

CC BY-SA 4.0
2021-03-05T17:01:01.007Z
Mesh density is mostly a function of connected primitive area. So lots of connected triangles all with a "small" relative area equal high density. Bin sorting on triangle area and connectivity generally gives good results.
pmw1234
CC BY-SA 4.0
2021-03-06T08:47:40.153Z
@pmw1234 Thanks :) Just curious, have you done this approach before?
Megidd
CC BY-SA 4.0
2021-03-06T11:32:47.720Z
Yes, its simple enough to code up quickly, and gives reasonable results. If the model is indexed then connectivity is just a matter of spinning looping looking for that index. If the index lives in two bins of the same size group, then the bins can be merged. The, the last step is to merge bins that are below some minimum number of triangles. The downside to this method is that its slow. Oh and to see your bins in action just draw each bin with its own color.
pmw1234
CC BY-SA 4.0
2021-03-06T11:37:05.013Z
@pmw1234 Great! Thanks :) I think your suggested approach could be an answer.
Megidd
<algorithm><computational-geometry><geometry><mesh><polygon>
Divide mesh according to level of detail
Megidd
# Divide mesh according to level of detail

(Asked by: username_0 on 2021-03-03)

### Background

I need to remesh by OpenVDB, like what [Blender remesh](https://docs.blender.org/manual/en/dev/modeling/modifiers/generate/remesh.html) does:

[![Blender screenshot](https://i.sstatic.net/CJikC.png)](https://i.sstatic.net/CJikC.png)

> Voxel
>
> Uses an OpenVDB to generate a new manifold mesh from the current geometry while trying to preserve the mesh’s original volume.

### Problem

The problem is that OpenVDB gets a constant *voxel size*. But I have meshes with varying polygon density/granularity, i.e. high-detail and low-detail components. To preserve the topology of high-detail components, the *voxel size* has to be too small for the whole 3d model.

[![Polygon granularity/density](https://i.sstatic.net/jdt0F.png)](https://i.sstatic.net/jdt0F.png)

### Possible workaround

A mesh might be broken down into distinct components of higher detail and lower detail.

### Question

Is there any algorithm or library to help me break down the mesh into distinct components according to level of detail? I looked at [CGAL](https://doc.cgal.org/latest/Polygon_mesh_processing/index.html), but I couldn't figure out.

**Tags:** algorithm, computational-geometry, geometry, mesh, polygon

> **Comments:**
> **username_1**: Mesh density is mostly a function of connected primitive area. So lots of connected triangles all with a "small" relative area equal high density. Bin sorting on triangle area and connectivity generally gives good results.  
> **username_0**: @username_1 Thanks :) Just curious, have you done this approach before?  
> **username_1**: Yes, its simple enough to code up quickly, and gives reasonable results. If the model is indexed then connectivity is just a matter of spinning looping looking for that index. If the index lives in two bins of the same size group, then the bins can be merged. The, the last step is to merge bins that are below some minimum number of triangles. The downside to this method is that its slow. Oh and to see your bins in action just draw each bin with its own color.  
> **username_0**: @username_1 Great! Thanks :) I think your suggested approach could be an answer.  

---

## 0 answers

