OBJ 文件是一种简单的文本格式,用于存储 3D 模型信息(顶点、法线、纹理坐标、面连接关系)。

顶点坐标 (Vertex Position)

OBJ
v 0.5 1.0 -3.2    # 顶点 (x, y, z)
v 1.0 2.0 3.0 0.5 # 含 w 值
点击展开查看更多

点法线 (Vertex Normal)

OBJ
vn 0.0 0.0 1.0    # Z 轴正向法线
vn -1.0 0.5 0.2   # 自定义法线方向
点击展开查看更多

纹理坐标 (Texture Coordinate)

OBJ
vt 0.5 1.0        # 标准 UV
vt 0.3 0.4 0.5    # 含 w 值
点击展开查看更多

面索引 (Face Indices)

OBJ
f 1 2 3           # 三角形,仅顶点索引
f 1/1 2/2 3/3     # 顶点+纹理索引
f 1/1/1 2/2/2 3/3/3 # 顶点+纹理+法线索引
f 1//1 2//2 3//3  # 顶点+法线(无纹理)
点击展开查看更多
PLAINTEXT
f 0 1 2
f 1 2 3

0───────1
│     / │
│   /   │
│ /     │
2───────3
点击展开查看更多

版权声明

作者: Chaim

链接: https://chaim.eu.org/posts/wavefront-obj%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84-%E5%9F%BA%E7%A1%80/

许可证: CC BY-NC-SA 4.0

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. Please attribute the source, use non-commercially, and maintain the same license.

开始搜索

输入关键词搜索文章内容

↑↓
ESC
⌘K 快捷键