{"id":13678841,"url":"https://github.com/fanvanzh/3dtiles","last_synced_at":"2025-05-15T05:07:51.522Z","repository":{"id":38870596,"uuid":"120919743","full_name":"fanvanzh/3dtiles","owner":"fanvanzh","description":"The fastest tools for 3dtiles convert in the world!","archived":false,"fork":false,"pushed_at":"2025-03-31T08:17:27.000Z","size":71145,"stargazers_count":2049,"open_issues_count":98,"forks_count":609,"subscribers_count":77,"default_branch":"master","last_synced_at":"2025-04-14T08:11:25.625Z","etag":null,"topics":["3d-tiles","3dtiles","b3dm","cesium-3dtiles","gltf","osgb"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fanvanzh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-02-09T15:07:43.000Z","updated_at":"2025-04-13T10:03:41.000Z","dependencies_parsed_at":"2022-07-12T17:39:50.496Z","dependency_job_id":"1cf33ddb-c858-4f89-a510-a7e0ea8d2a4c","html_url":"https://github.com/fanvanzh/3dtiles","commit_stats":{"total_commits":206,"total_committers":15,"mean_commits":"13.733333333333333","dds":0.2669902912621359,"last_synced_commit":"f3d6f9ce211e16b429ec8fd6dd979ad14fcaa81c"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fanvanzh%2F3dtiles","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fanvanzh%2F3dtiles/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fanvanzh%2F3dtiles/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fanvanzh%2F3dtiles/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fanvanzh","download_url":"https://codeload.github.com/fanvanzh/3dtiles/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254276447,"owners_count":22043867,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3d-tiles","3dtiles","b3dm","cesium-3dtiles","gltf","osgb"],"created_at":"2024-08-02T13:00:58.931Z","updated_at":"2025-05-15T05:07:46.507Z","avatar_url":"https://github.com/fanvanzh.png","language":"C++","funding_links":[],"categories":["Tools","Tile creation (Community)","Data Processing"],"sub_categories":["3D Model Converting"],"readme":"**English | [简体中文](#简介)** \n\n# Introduction\n\n[![glTF status](https://img.shields.io/badge/glTF-2%2E0-green.svg?style=flat)](https://github.com/KhronosGroup/glTF)\n[![Action status](https://github.com/fanvanzh/3dtiles/actions/workflows/linux.yml/badge.svg)](https://github.com/fanvanzh/3dtiles/actions/workflows/linux.yml)\n[![Action status](https://github.com/fanvanzh/3dtiles/actions/workflows/windows.yml/badge.svg)](https://github.com/fanvanzh/3dtiles/actions/workflows/windows.yml)\n\n3D-Tiles convertion:\n\n- `Osgb(OpenSceneGraph Binary)` to `3D-Tiles`: convert huge of osgb file to 3D-Tiles.\n\n- `Esri Shapefile` to `3D-Tiles`: convert shapefile to 3D-Tiles.\n\n- `Fbx` to `3D-Tiles`: convert fbx file to 3D-Tiles, include auto_lod\\texture convertion etc.\n\n\nYou may intereted in: \n\n- [How to build?](https://github.com/fanvanzh/3dtiles/wiki/How-to-build)\n\n- [How to debug?](https://github.com/fanvanzh/3dtiles/wiki/How-to-debug)\n\n- [Download Windows Pre-build](https://github.com/fanvanzh/3dtiles/releases/download/v0.4/3dtile.zip)\n\n- [Docker Image](https://hub.docker.com/r/winner1/3dtiles)\n\n# Build\n## Ubuntu\n```\nsudo apt-get update\nsudo apt-get install -y g++ libgdal-dev libopenscenegraph-dev cargo\ngit clone https://github.com/fanvanzh/3dtiles\ncd 3dtiles\ncargo build --release\n```\n## Centos\n```\nsudo yum install -y gdal-devel cargo g++\ngit clone https://github.com/fanvanzh/3dtiles\ncd 3dtiles\ngit clone https://github.com/microsoft/vcpkg.git\n./vcpkg/bootstrap-vcpkg.sh\n./vcpkg/vcpkg install osg:x64-linux-release\ncargo build --release\n```\n## Windows\n```\ncurl https://sh.rustup.rs -sSf -o rustup-init.exe\n./rustup-init.exe -y\ngit clone https://github.com/fanvanzh/3dtiles\ncd 3dtiles\ngit clone https://github.com/microsoft/vcpkg.git\n./vcpkg/bootstrap-vcpkg.bat\n./vcpkg/vcpkg install osg:x64-windows-release\n./vcpkg/vcpkg install gdal:x64-windows-release\ncargo build --release\n```\n# Usage\n\n## ① Command Line\n\n```sh\n_3dtile.exe [FLAGS] [OPTIONS] --format \u003cFORMAT\u003e --input \u003cPATH\u003e --output \u003cDIR\u003e\n```\n\n## ② Examples\n\n```sh\n# from osgb dataset\n_3dtile.exe -f osgb -i E:\\osgb_path -o E:\\out_path\n_3dtile.exe -f osgb -i E:\\osgb_path -o E:\\out_path -c \"{\\\"offset\\\": 0}\"\n# use pbr-texture\n_3dtile.exe -f osgb -i E:\\osgb_path -o E:\\out_path -c \"{\\\"pbr\\\": true}\"\n\n# from single shp file\n_3dtile.exe -f shape -i E:\\Data\\aa.shp -o E:\\Data\\aa --height height\n\n# from single osgb file to glb file\n_3dtile.exe -f gltf -i E:\\Data\\TT\\001.osgb -o E:\\Data\\TT\\001.glb\n\n# from single obj file to glb file\n_3dtile.exe -f gltf -i E:\\Data\\TT\\001.obj -o E:\\Data\\TT\\001.glb\n\n# convert single b3dm file to glb file\n_3dtile.exe -f b3dm -i E:\\Data\\aa.b3dm -o E:\\Data\\aa.glb\n```\n---\n\n**[English](#Introduction) | 简体中文**\n\n\u003ch1 id=\"intro\"\u003e简介\u003c/h1\u003e\n\n3D-Tile 转换工具集，高效快速的 3D-Tiles 生产工具。\n\n提供了如下的子工具：\n\n- `Osgb(OpenSceneGraph Binary)` 转 `3D-Tiles`\n\n- `Esri Shapefile` 转 `3D-Tiles`\n\n- `Fbx` 转 `3D-Tiles`\n- ...\n\n# 编译\n## Ubuntu\n```\nsudo apt-get update\nsudo apt-get install -y g++ libgdal-dev libopenscenegraph-dev cargo\ngit clone https://github.com/fanvanzh/3dtiles\ncd 3dtiles\ncargo build --release\n```\n## Centos\n```\nsudo yum install -y gdal-devel cargo g++\ngit clone https://github.com/fanvanzh/3dtiles\ncd 3dtiles\ngit clone https://github.com/microsoft/vcpkg.git\n./vcpkg/bootstrap-vcpkg.sh\n./vcpkg/vcpkg install osg:x64-linux-release\ncargo build --release\n```\n## Windows\n```\ncurl https://sh.rustup.rs -sSf -o rustup-init.exe\n./rustup-init.exe -y\ngit clone https://github.com/fanvanzh/3dtiles\ncd 3dtiles\ngit clone https://github.com/microsoft/vcpkg.git\n./vcpkg/bootstrap-vcpkg.bat\n./vcpkg/vcpkg install osg:x64-windows-release\n./vcpkg/vcpkg install gdal:x64-windows-release\ncargo build --release\n```\n## MacOS\n```\n#install brew first\nbrew install rust gdal open-scene-graph\ngit clone https://github.com/fanvanzh/3dtiles\ncd 3dtiles\ncargo build --release\n```\n# 使用说明\n\n## ① 命令行格式\n\n```sh\n_3dtile.exe [FLAGS] [OPTIONS] --format \u003cFORMAT\u003e --input \u003cPATH\u003e --output \u003cDIR\u003e\n```\n\n## ② 示例命令\n\n```sh\n# from osgb dataset\n_3dtile.exe -f osgb -i E:\\osgb_path -o E:\\out_path\n_3dtile.exe -f osgb -i E:\\osgb_path -o E:\\out_path -c \"{\\\"offset\\\": 0}\"\n\n# from single shp file\n_3dtile.exe -f shape -i E:\\Data\\aa.shp -o E:\\Data\\aa --height height\n\n# from single osgb file to glb file\n_3dtile.exe -f gltf -i E:\\Data\\TT\\001.osgb -o E:\\Data\\TT\\001.glb\n\n# from single obj file to glb file\n_3dtile.exe -f gltf -i E:\\Data\\TT\\001.obj -o E:\\Data\\TT\\001.glb\n\n# convert single b3dm file to glb file\n_3dtile.exe -f b3dm -i E:\\Data\\aa.b3dm -o E:\\Data\\aa.glb\n```\n\n## ③ 参数说明\n\n- `-c, --config \u003cJSON\u003e` 在命令行传入 json 配置的字符串，json 内容为选配，可部分实现\n\n  json 示例：\n\n  ``` json\n  {\n    \"x\": 120,\n    \"y\": 30,\n    \"offset\": 0,\n    \"max_lvl\" : 20\n  }\n  ```\n\n\n- `-f, --format \u003cFORMAT\u003e` 输入数据格式。\n\n  `FORMAT` 可选：osgb, shape, gltf, b3dm\n\n  `osgb` 为倾斜摄影格式数据, `shape` 为 Shapefile 面数据, `gltf` 为单一通用模型转gltf, `b3dm` 为单个3dtile二进制数据转gltf\n\n- `-i, --input \u003cPATH\u003e` 输入数据的目录，osgb数据截止到 `\u003cDIR\u003e/Data` 目录的上一级，其他格式具体到文件名。\n\n- `-o, --output \u003cDIR\u003e` 输出目录。输出的数据文件位于 `\u003cDIR\u003e/Data` 目录。\n\n- `--height` 高度字段。指定shapefile中的高度属性字段，此项为转换 shp 时的必须参数。\n\n\n\n# 数据要求及说明\n\n### ① 倾斜摄影数据\n\n倾斜摄影数据仅支持 smart3d 格式的 osgb 组织方式：\n\n- 数据目录必须有一个 `“Data”` 目录的总入口；\n- `“Data”` 目录同级放置一个 `metadata.xml` 文件用来记录模型的位置信息；\n- 每个瓦片目录下，必须有个和目录名同名的 osgb 文件，否则无法识别根节点；\n\n正确的目录结构示意：\n\n```\n- Your-data-folder\n  ├ metadata.xml\n  └ Data\\Tile_000_000\\Tile_000_000.osgb\n```\n\n### ② Shapefile\n\n目前仅支持 Shapefile 的面数据，可用于建筑物轮廓批量生成 3D-Tiles.\n\nShapefile 中需要有字段来表示高度信息。\n\n### ③ 通用模型转 glTF：\n\n支持 osg、osgb、obj、fbx、3ds 等单一通用模型数据转为 gltf、glb 格式。\n\n转出格式为 2.0 的gltf，可在以下网址验证查看： https://pissang.github.io/clay-viewer/editor/\n\n### ④ B3dm 单文件转 glb\n\n支持将 b3dm 单个文件转成 glb 格式，便于调试程序和测试数据\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffanvanzh%2F3dtiles","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffanvanzh%2F3dtiles","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffanvanzh%2F3dtiles/lists"}