| Name | ||
|---|---|---|
|
62a116b · 6 years ago
|
||
|
|
6 years ago
|
|
|
|
6 years ago
|
|
|
|
6 years ago
|
|
|
|
6 years ago
|
|
|
|
6 years ago
|
|
|
|
6 years ago
|
|
|
|
6 years ago
|
|
|
|
6 years ago
|
|
|
|
6 years ago
|
|
|
|
6 years ago
|
|
|
|
6 years ago
|
|
|
|
6 years ago
|
|
|
|
6 years ago
|
|
存储库文件导航
基于 Assimp 网格库和 Google Draco 网格压缩库的网格格式转换的命令行工具。
MeshSmith 是开源软件,是史密森尼 3D 基金会项目的一部分。该工具集成在史密森尼的 3D 处理管道库克中。
- 从/转换为所有可用的 Assimp 格式(OBJ、FBX、PLY、Collada 等)
- 导出压缩的 glTF 和 glb 文件(格式和
gltfxglbx) - 简单的网格作,例如坐标重排、缩放、平移
- 检查功能生成 JSON 格式的网格统计信息
命令行选项
MeshSmith.exe [OPTION...]
-c, --config arg JSON configuration file
-i, --input arg Input file name
-o, --output arg Output file name
-f, --format arg Output file format
-j, --joinvertices Join identical vertices
-n, --stripnormals Strip normals
-u, --striptexcoords Strip texture coords
-z, --swizzle arg Swizzle coordinates
-s, --scale arg Scale scene by given factor
--flipuv Flip UV y coordinate
-a, --diffusemap arg Diffuse map to be included (gltfx/glbx only)
-b, --occlusionmap arg Occlusion map to be included (gltfx/glbx only)
-m, --normalmap arg Normal map to be included (gltfx/glbx only)
-e, --embedmaps Embed maps (gltfx/glbx only)
-t, --objectspacenormals Use object space normals (gltfx/glbx only)
-p, --compress Compress mesh data using Draco (gltfx/glbx only)
-r, --report Print JSON-formatted report
-l, --list Print JSON-formatted list of export formats
-v, --verbose Print log messages to std out
-h, --help Displays this message
无需在命令行上指定所有参数,而是可以通过参数指定 JSON 配置文件。--config
如果命令行选项和具有相同选项的配置文件同时存在,则命令行选项优先。请注意,一些高级选项只能通过配置文件获得。
{
"input": "input-mesh.obj",
"output": "output.glb",
"format": "glbx",
"verbose": false,
"report": false,
"list": false,
"joinVertices": false,
"stripNormals": false,
"stripTexCoords": false,
"swizzle": "X+Y+Z+",
"scale": 1.0,
"translate": [ 0.0, 0.0, 0.0 ],
"alignX": 0, // 0 = center, -1 = minimum, 1 = maximum
"alignY": -1,
"alignZ": 1,
"flipUV": false,
"matrix": [ 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 ],
"gltfx": {
"metallicFactor": 0.1,
"roughnessFactor": 0.8,
"diffuseMap": "diffuse.jpg",
"occlusionMap": "occlusion.jpg",
"emissiveMap": "emissive.jpg",
"metallicRoughnessMap": "metallic-roughness.jpg",
"normalMap": "normals.jpg",
"zoneMap": "zones.jpg",
"objectSpaceNormals": true,
"embedMaps": false,
"useCompression": true
},
"compression": {
"positionQuantizationBits": 14,
"texCoordsQuantizationBits": 12,
"normalsQuantizationBits": 10,
"genericQuantizationBits": 8,
"compressionLevel": 8
}
}
打印所有可用的输入和输出格式(JSON 格式)
MeshSmith.exe --list
MeshSmith.exe --config my_config.json
MeshSmith.exe -i input.obj -o output.ply -f plyb
MeshSmith.exe -i input.obj -o output.obj -f objnomtl -s 0.1
MeshSmith.exe -i mesh.obj -a diffuse.jpg -f gltfx
MeshSmith.exe -i mesh.obj -a diffuse.jpg -b occlusion.jpg -m normals.jpg --compress --embedmaps -f glbx
自行构建 MeshSmith 需要有关使用 CMake 和 Visual Studio 构建和维护 C++ 项目的基本知识。目前唯一支持的作系统是 Windows。
Assimp 是一个用于导入和导出各种 3D 模型格式的库,包括场景后处理以生成缺失的渲染数据。
MeshSmith 使用 Assimp 的修改版本,其中包含许多用于处理大型 OBJ 文件的修复程序。
天龙座
Draco 是一个用于压缩和解压缩 3D 几何网格和点云的库。它旨在改进 3D 图形的存储和传输。
Assimp 和 Draco 作为子模块包含在 MeshSmith 存储库中。它们可以在子文件夹中找到。为了正确克隆子模块,您需要使用MeshSmith 使用选项。libs--recurse-submodules
git clone --recurse-submodules https://github.com/Smithsonian/dpo-meshsmith
为方便起见,MeshSmith 根文件夹中提供了生成脚本。它要求将 Visual Studio 2019 安装在其默认位置。打开命令提示符并输入以下内容:
.build-libs-win64.bat
构建库后,可以按如下方式启动应用程序构建(调试和发布版本):
.build-app-win64.bat
- 调试版本:
bindebug - 发布版本:
binrelease
2. 分享目的仅供大家学习和交流,请不要用于商业用途!
3. 如果你也有好源码或者教程,可以到用户中心发布,分享有积分奖励和额外收入!
4. 本站提供的源码、模板、插件等等其他资源,都不包含技术服务请大家谅解!
5. 如有链接无法下载、失效或广告,请联系管理员处理!
6. 本站资源售价只是赞助,收取费用仅维持本站的日常运营所需!
7. 如遇到加密压缩包,默认解压密码为"gltf",如遇到无法解压的请联系管理员!
8. 因为资源和程序源码均为可复制品,所以不支持任何理由的退款兑现,请斟酌后支付下载
声明:如果标题没有注明"已测试"或者"测试可用"等字样的资源源码均未经过站长测试.特别注意没有标注的源码不保证任何可用性
GLB下载网 - GLB/GLTF模型与格式资源免费下载,支持在线浏览与转换 » 网格转换工具,包括 glTF/GLB 支持和 Draco 网格压缩
常见问题FAQ
- 免费下载或者VIP会员专享资源能否直接商用?
- 本站所有资源版权均属于原作者所有,这里所提供资源均只能用于参考学习用,请勿直接商用。若由于商用引起版权纠纷,一切责任均由使用者承担。更多说明请参考 VIP介绍。
- 提示下载要提取码
- 分享过期和重复下载怎么办
- 模型和平台不兼容怎么办