Open 48design opened 3 years ago
The Remesher supports point and edge constraints, see this blog post for more details: https://www.gradientspace.com/tutorials/2018/7/5/remeshing-and-constraints
But it sounds like you mean something more like "weights" than "constraints". One way to do this is to make the Remesher MinEdgeLength/MaxEdgeLength something you compute relative to the local geometry (in Remesher::ProcessEdge), instead of fixed constants. So for example you could compute the deviation in normals between the vertices/faces/etc that are being processed, and use that to modulate a fixed min/max edge length. This kind of thing works pretty well. Another more flexible way is to precompute a 'weight map' ahead of time and store it in the mesh vertex colors, and then sample that to determine the target density.
Thank you very much for your answer.
The project I need this for has been on hold since I asked this question. I managed to make a little progress then, but wasn't really satisfied with the results. I have already pre-calculated the border distance for each vertex, but couldn't figure out where exactly I need to use this.
Has someone implemented adaptive tessellation/subdivision that can be used with this library? I don't know where to start.
The remeshing class is awesome but it would be perfect to specify vertices (like constraints) or to use the boundaries to allow smaller edge lengths when getting closer. This way one could better reproduce fine details.
I tried a naive approach by iteratively splitting edges one ring around the boundaries but the control I was getting on how the edges align isn't that great and the resulting meshes are not really useful this way.