zoukankan      html  css  js  c++  java
  • 使用开源OpenCTM进行常用三维格式互导

    1. 支持导入的三维格式有:

    OpenCTM(.ctm)、Stanford triangle format(.ply)、Stereolitography(.stl)、3D Studio(.3ds)、COLLADA(.dae)、

    Wavefront geometry file(.obj)、LightWave object(.lwo)、Geomview object file format(.off)

    2. 支持导出的三维格式有:

    OpenCTM(.ctm)、Stanford triangle format(.ply)、Stereolitography(.stl)、3D Studio(.3ds)、COLLADA(.dae)、

    Wavefront geometry file(.obj)、LightWave object(.lwo)、Geomview object file format(.off)、VRML 2.0(.wrl)

    3. 纹理贴图格式:JPEG、PNG

    4. 使用命令行工具ctmconv.exe进行批量转换

    示例:ctmconv Infinite-Level_02.3ds Infinite-Level_02.obj

    详细参数如下:

    Usage: ctmconv infile outfile [options]

    Options:

    Data manipulation (all formats)
    --scale arg Scale the mesh by a scalar factor.
    --upaxis arg Set up axis (X, Y, Z, -X, -Y, -Z). If != Z, the mesh will
    be flipped.
    --flip Flip triangle orientation.
    --calc-normals If the source file does not contain any normals, calculate
    them.
    --no-normals Do not export normals.
    --no-texcoords Do not export texture coordinates.
    --no-colors Do not export vertex colors.

    OpenCTM output
    --method arg Select compression method (RAW, MG1, MG2)
    --level arg Set the compression level (0 - 9)

    OpenCTM MG2 method
    --vprec arg Set vertex precision
    --vprecrel arg Set vertex precision, relative method
    --nprec arg Set normal precision
    --tprec arg Set texture map precision
    --cprec arg Set color precision

    Miscellaneous
    --comment arg Set the file comment (default is to use the comment
    from the input file, if any).
    --texfile arg Set the texture file name reference for the texture
    (default is to use the texture file name reference
    from the input file, if any).

    Supported file formats:

    OpenCTM (.ctm)
    Stanford triangle format (.ply)
    Stereolithography (.stl)
    3D Studio (.3ds)
    COLLADA 1.4/1.5 (.dae)
    Wavefront geometry file (.obj)
    LightWave object (.lwo)
    Geomview object file format (.off)
    VRML 2.0 (.wrl) - export only

    更多请参考:http://openctm.sourceforge.net/

  • 相关阅读:
    总结一下HtmlAgilityPack
    sql server中获得刚刚插入的记录的主键ID
    关于存储过程的一点总结
    asp.net 中System.Web.UI.Page子类的成员变量的生存周期
    sql server存储过程模板
    第三方库HtmlAgilityPack的一个Bug
    如何在存储过程内部调用另一个存储过程 EXEC
    C#中的哈希表和字典的区别
    Android Intent的几种用法全面总结
    个人练习:ListView绑定数据和显示的几种方式
  • 原文地址:https://www.cnblogs.com/kekec/p/2326739.html
Copyright © 2011-2022 走看看