OpenCTM

OpenCTM

OpenCTM is primarily a file format for storing 3D triangle meshes in a compact yet versatile format. In order to make it easy for software developers and 3D designers to support the format, an easy to use software library is provided that can read and write OpenCTM format files.

OpenCTM 本质上是一种文件格式,用于以紧凑而通用的格式存储 3D 三角形网格。同时为了方便软件开发人员和3D设计人员支持该格式,提供了一个易于使用的软件库,可以读写OpenCTM格式文件。

It is important to understand that OpenCTM is only concerned with managing triangle mesh data. In other words, OpenCTM is not a scene description format. For instance, OpenCTM does not handle multiple meshes, transformation matrices, materials, light sources, physical properties, etc.

了解 OpenCTM 仅与管理存储三角形网格数据有关,这一点很重要。换句话说,OpenCTM 不是场景描述格式。例如,OpenCTM 不处理多个网格、变换矩阵、材质、光源、物理属性等。

While most 3D file formats with scene description capabilites tend to be quite application or technology specific, OpenCTM is suitable for almost any application. Any online e-shopping system, game engine, medical application or phone widget is free to tailor a scene or model description format of their own, and use OpenCTM as the 3D data carrier format. A typical scene file format could be a ZIP archive containing an XML file for the application specific scene and material descriptions, along with several OpenCTM files for the geometry data and JPEG files for the textures.

大多数具有场景描述功能的 3D 文件格式往往是特定于应用程序或技术的,但 OpenCTM 几乎适用于任何应用程序。任何在线电子购物系统、游戏引擎、医疗应用或手机小部件都可以自由定制属于自己的场景或模型描述格式,并使用OpenCTM作为3D数据载体格式。典型的场景文件格式可以是 ZIP压缩文档 ,其中包含用于应用特定场景和材质描述的 XML (或Json)文件,以及用于存储几何数据的多个 OpenCTM文件和用于存储纹理 JPEG 的文件。

文件格式特点

  • 开放的数据格式。
  • 支持存储每个顶点的法线、UV 坐标和自定义顶点属性。
  • 可以存储非常大的几何图形(数十亿个三角形和顶点)。
  • 非常紧凑的3D 三角形几何存储,使用高效的熵减少技术,结合最先进的熵编码 (LZMA)。 STL 文件通常可以压缩到其原始大小的 5-6%。
  • 用户可控精度的无损压缩:真正的无损压缩(IEEE 754 32 位浮点),适用于需要 1:1表示数据的情况。需要出色的压缩比时,具有用户可控精度的固定点表示。

API库的特点

  • 开源,具有非常宽松的许可证(zlib/libpng 许可证)。

  • 易于使用、文档齐全、纯 API(类似于 OpenGL API)。

  • 用 C 编写,易于与其他语言接口。 高度便携。它已经在 Windows、Mac OS X、Linux(32 位和 64 位)和
    OpenSolaris 上使用几种不同的编译器进行了测试。

  • 压缩文件加载速度非常快(AMD X2 64、2.5 GHz、Linux 64位):由 69 K 多边形(斯坦福兔子)组成的模型需要 24 毫秒;对于由 1.4 M 多边形 (male03) 组成的模型,需要0.58 秒。

  • 非常轻巧:没有外部依赖;编译后的共享库在所有测试平台上都小于 100 KB。

3D 文件转换工具

支持以下文件格式(读写):

  • OpenCTM (.ctm)
  • COLLADA 1.4/1.5 (.dae)
  • Stereolithography (.stl)
  • Stanford triangle format (.ply)
  • 3D Studio (.3ds)
  • Wavefront geometry (.obj)
  • LightWave object (.lwo)
  • Geomview object (.off)

3D 文件浏览器

  • OpenGL 加速交互式 3D 视图:基于 GLSL 的 phong 着色;纹理;顶点着色。
  • 快速加载 - 非常适合预览 3D 文件。
  • 可以加载和保存转换器工具支持的所有文件格式的文件,使其作为快速转换工具非常有用。
  • 高度便携(适用于 Windows、Mac OS X、Linux、OpenSolaris 等)。

示例模型

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

自定义三维存储格式

在这里插入图片描述
自定义场景描述文件:

  • *.mesh存储ctm几何数据;
  • png纹理数据;
  • Materials.json : 材质描述文件,引用纹理;
  • Elements.json:带有变换矩阵的场景描述,组合mesh和材质;
  • Project.json:工程性描述属性文件。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值