本文主要是介绍【三维视觉】TetWild / fTetWild学习:将任意mesh处理成流形水密的mesh,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
项目地址
TetWild - Tetrahedral Meshing in the Wild
快速版本:Fast Tetrahedral Meshing in the Wild
2D版本:
TriWild: Robust Triangulation With Curve Constraints
快速版本的fTetWild
输入与输出
输入:任意网格:.off/.obj/.stl/.ply format
输出:保证是水密的
其中.msh文件可以用gmesh打开
这里的面片颜色代表的是每个面片与原始网格的误差,通过设置stop-energy
来调节,默认的是8,当所有面片的最大误差都小于stop-energy
时停止优化
参数含义
float-tetwild
Usage: ./FloatTetwild_bin [OPTIONS]Options:-h,--help Print this help message and exit-i,--input TEXT:FILE Input surface mesh INPUT in .off/.obj/.stl/.ply format. (string, required)-o,--output TEXT Output tetmesh OUTPUT in .msh format. (string, optional, default: input_file+postfix+'.msh')--tag TEXT:FILE Tag input faces for Boolean operation.--op INT Boolean operation: 0: union, 1: intersection, 2: difference.-l,--lr FLOAT ideal_edge_length = diag_of_bbox * L. (double, optional, default: 0.05)-e,--epsr FLOAT epsilon = diag_of_bbox * EPS. (double, optional, default: 1e-3)--max-its INT (for debugging usage only)--stop-energy FLOAT Stop optimization when max energy is lower than this.--stage INT (for debugging usage only)--stop-p INT (for debugging usage only)--postfix TEXT (for debugging usage only)--log TEXT Log info to given file.--level INT Log level (0 = most verbose, 6 = off).-q,--is-quiet Mute console output. (optional)--skip-simplify skip preprocessing.--no-binary export meshes as ascii--no-color don't export color--not-sort-input (for debugging usage only)--correct-surface-orientation(for debugging usage only)--envelope-log TEXT (for debugging usage only)--smooth-open-boundary Smooth the open boundary.--export-raw Export raw output.--manifold-surface Force the output to be manifold.--coarsen Coarsen the output as much as possible.--csg TEXT:FILE json file containg a csg tree--use-old-energy (for debugging usage only)--disable-filtering Disable filtering out outside elements.--use-floodfill Use flood-fill to extract interior volume.--use-general-wn Use general winding number.--use-input-for-wn Use input surface for winding number.--bg-mesh TEXT:FILE Background mesh for sizing field (.msh file).--max-threads UINT Maximum number of threads used
-
Smoothing open regions
Our method can fill gaps and holes but the tetmesh faces on those parts could be bumpy. We provide users an option to do Lapacian smoothing on those faces to get a smoother surface. -
Envelope of size epsilon
Using smaller envelope preserves features better but also takes longer time. The default value of epsilon is b/1000, where b is the length of the diagonal of the bounding box. -
Ideal edge length
Using smaller ideal edge length gives a denser mesh but also takes longer time. The default ideal edge length is b/20 -
Filtering energy
Our mesher stops optimizing the mesh when maximum energy is smaller than filtering energy. Thus, larger filtering energy means less optimization and sooner stopping. If you do not care about quality, then give a larger filtering energy would let you get the result earlier. The energy we used here is conformal AMIPS whose range is from 3 to +inf. The default filtering energy is 10.
💡 We suggest not to set filtering energy smaller than 8 for complex input. -
Maximum number of optimization passes
Our mesher stops optimizing the mesh when the maximum number of passes is reached. The default number is 80. -
bg-mesh
Sizing field Users can provide a background tetmesh in .msh format with vertex scalar field values stored. The scalar field values is used for controlling edge length. The scalars inside an element of the background mesh are linearly interpolated.
💡 Here is an example including input surface mesh, background mesh and output tetmeshes with/without sizing control. -
Smoothing open regions
Our method can fill gaps and holes but the tetmesh faces on those parts could be bumpy. We provide users an option to do Lapacian smoothing on those faces to get a smoother surface.
我的私人总结
–no-color don’t export color, 这里的颜色指的是给每个面片记录浮点的filtering energy
处理得到neural subdivision surfaces的输入网格的参数设置
./FloatTetwild_bin -i input_mesh_path -o output_mesh_path_no_postfix -l 0.05 --e 0.0002 --manifold-surface --smooth-open-boundary
–l 0.05:更小的边长更精细,实测(0.05不到1min, 0.01需要2-3min, 0.005需要10+min)
Ideal edge length
Using smaller ideal edge length gives a denser mesh but also takes longer time. The default ideal edge length is b/20
–e 0.0002: 更小的值更好地保留特征
Envelope of size epsilon
Using smaller envelope preserves features better but also takes longer time. The default value of epsilon is b/1000, where b is the length of the diagonal of the bounding box.
–manifold-surface:保证流形,否则会出现非流形的顶点
–smooth-open-boundary:使用拉普拉斯平滑来平滑孔洞填充后的面
原始网格
没有平滑
有平滑
这篇关于【三维视觉】TetWild / fTetWild学习:将任意mesh处理成流形水密的mesh的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!