【问题标题】:MeshLabServer - Simplification : Quadric Edge Collapse Decimation (WITH TEXTURE) FailureMeshLabServer - 简化:Quadric Edge Collapse Decimation (WITH TEXTURE) 失败
【发布时间】:2020-05-26 21:53:46
【问题描述】:

我测试了一些抽取/简化工具,以减少许多以编程方式表示 3D 模型的 OBJ 文件的三角形数量。

我对 MeshLab 中的“简化:二次边折叠抽取(带纹理)”功能有疑问。

当我运行该函数时,我收到消息: Filter failure message

我在 IDE 中找到了一种解决方法,我应用了 Filters / Texture / Converts PerVertex UV into PerWedge UV 功能,然后应用了简化滤镜... 但是在 MeshLabXML api 中我找不到转换 UV 纹理坐标的过滤器...

有人遇到过问题吗?并解决了吗?

【问题讨论】:

    标签: meshlab uv-mapping decimation


    【解决方案1】:

    您有两种选择:

    首先需要两个步骤:

    1. 使用命令meshlabserver -i inputMesh.obj -o tmpMesh.obj -m wt 将网格转换为每个楔形纹理
    2. 使用meshlabserver -i tmpMesh.obj -o outputMesh.obj -m wt -s myScript.mlx 应用您的其他过滤器

    第二种选择是一步完成所有操作,在调用 Simplification: Quadric Edge ... 之前在您的 mlx 脚本中调用过滤器 Convert PerVertex UV into PerWedge UV。另外,我建议理智地致电Remove Unreferenced Vertices。

    尝试将此脚本保存到名为textureSimplify.mlx的文件中

    <!DOCTYPE FilterScript>
    <FilterScript>
     <filter name="Remove Unreferenced Vertices"/>
     <filter name="Convert PerVertex UV into PerWedge UV"/>
     <filter name="Simplification: Quadric Edge Collapse Decimation (with texture)">
      <Param value="3000" name="TargetFaceNum" description="Target number of faces" isxmlparam="0" tooltip="" type="RichInt"/>
      <Param value="0" name="TargetPerc" description="Percentage reduction (0..1)" isxmlparam="0" tooltip="" type="RichFloat"/>
      <Param value="0.3" name="QualityThr" description="Quality threshold" isxmlparam="0" tooltip="" type="RichFloat"/>
      <Param value="1" name="Extratcoordw" description="Texture Weight" isxmlparam="0" tooltip="" type="RichFloat"/>
      <Param value="false" name="PreserveBoundary" description="Preserve Boundary of the mesh" isxmlparam="0" tooltip="" type="RichBool"/>
      <Param value="1" name="BoundaryWeight" description="Boundary Preserving Weight" isxmlparam="0" tooltip="" type="RichFloat"/>
      <Param value="true" name="OptimalPlacement" description="Optimal position of simplified vertices" isxmlparam="0" tooltip="" type="RichBool"/>
      <Param value="true" name="PreserveNormal" description="Preserve Normal" isxmlparam="0" tooltip="" type="RichBool"/>
      <Param value="true" name="PlanarQuadric" description="Planar Simplification" isxmlparam="0" tooltip="" type="RichBool"/>
      <Param value="false" name="Selected" description="Simplify only selected faces" isxmlparam="0" tooltip="" type="RichBool"/>
     </filter>
    
    </FilterScript>
    
    

    编辑 &lt;Param value="3000" name="TargetFaceNum" 行,将值 3000 更改为所需的面数,然后使用以下命令执行脚本:

    > meshlabserver -i inputMesh.obj -o outputMesh.obj -m wt -s textureSimplify.mlx
    

    【讨论】:

    • 感谢您的回复。有用。但它很难自动化,因为你必须检查 OBJ 文件是在 PerVertex UV 中还是在 PerWedge UV 中,否则命令会崩溃,我需要处理许多文件......没有纹理,使用 PerVertex UV 或在 PerWedge UV ...
    猜你喜欢
    • 2018-07-09
    • 2018-01-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-05-05
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多