The 3DTG tool will process textured 3D meshes (and soon point clouds) and convert them into the Cesium 3D Tiles standard used for streaming large datasets on the web. Also see 3D Tiles Overview
make
, cmake
and g++
commands should be available on your OS.
Also, posix
threads should be available for the C++ compiler.
make
command can be provided through the GNU Makecmake
command can be provided through the CMakeg++
command can be provided through the MinGW
During the MinGW installation posix
should be selected as a threads
module.
make
command can be provided through thebrew install make
cmake
command can be provided through thebrew install cmake
g++
command should be available after XCode is installed or throught thebrew install gcc
make
command can be provided through thebrew install make
cmake
command can be provided through the both aapt install cmake
or abrew install cmake
g++
command can be provided through theapt-get install g++-version
- Build all the dependencies through the appropriate batch file (
depsWin.bat
ordepsUnix.sh
depending on your OS) from root folder of the project. - Build main app by running
make
or by entering into "build/" subfolder and running from therecmake ..
Command | Reuired | Initial value | Description |
---|---|---|---|
-h, --help | No | List all of the available commands for the current program version. | |
-i, --input | Yes ✅ | Input model path | |
-o, --output | No | ./exported | Output directory |
-l, --limit | No | 2048 | Polygons limit (only for Voxel, Regular split alorithms) |
-g, --grid | No | 64 | Grid resolution (only for Voxel algorithm) |
--iso | No | Currently unused | |
-a, --algorithm | No | voxel | Split algorithm to use |
--algorithms | No | Available algorithms list | |
-f, --format | No | b3dm | Model format to export |
--formats | No | Available formats list | |
--compress | No | Enables Draco compressing | |
--texlevels | No | 8 | Number of texture LOD levels (0 - disables texture LOD generation) |
Prints an application help message into the CLI.
Input model path
Example
3dtg -i ./someFolder/myModel.obj
This option can be used in a positional way as a first argument
3dtg ./someFolder/myModel.obj
Output directory path
Example
3dtg ./someFolder/myModel.obj -o ./outdir
This option can be used in a positional way as a second argument
3dtg ./someFolder/myModel.obj ./outdir
Polygons limit until model will be split
Example
3dtg ./someFolder/myModel.obj ./outdir -l 4096
Grid size that is used to decimate voxelized meshes.
Should be set as a single value. The higher is value the higher is the output resolution.
Default value is 64 which means [x, y, z] => [64, 64, 64]
Example
3dtg ./someFolder/myModel.obj ./outdir -g 32
Algorithm to use to split mesh
Default value is voxel
Example
3dtg ./someFolder/myModel.obj ./outdir -a regular
Model format to use to save models
Default value is b3dm
Example
3dtg ./someFolder/myModel.obj ./outdir -f glb
Enables Draco compression
Example
3dtg ./someFolder/myModel.obj ./outdir --compress
Texture LOD levels count
Pass 0 if you want to disable texture LOD generation.
Default value is 8
Example
3dtg ./someFolder/myModel.obj ./outdir --texlevels 4
Currently the tool only accepts textured OBJ files, and simplifies the geometry using a voxel decimation algorithm. The output is a 3d tiles.
Syntax:
3dtg.exe -i path\to\input\obj -o path\to\3d-tile\folder
A rough estimate of memory usage can be calculated by adding up the number of textures and the size of the uncompressed 3d mesh. 16k textures use about 1GB ram 8k textures use about 0.25 GB of ram (256MB) 4k textures use about 0.06 GB ram (64MB)
System ram usage = (Mesh_in_OBJ_format) + (#_of_textures * Texture_Resolution)
This will provide a rough ballpark on the amount of system ram required for processing your textured mesh.
This is a list (in no particular order) of improvements that can be made:
- Caching mechanism (C++ equivalent to Caffeine caching in Java)
- alternate decimation/simplification algorithms
- alternate texture baking/transfer algorithms in the creation of LODs
- Optomizations for increased processing performance
- GPU acceleration for faster overall processing
- Multiple input file formats (FBX, DAE/ZAE, GLTF/GLB)
- KTX 2.0 Basis texture encoding for better texture compression (better then jpg)
- Support point clouds (las/laz, e57 and other formats)
- add your own!
- GLTF : GLTF structures for encoding/decoding both a GLTF and a B3DM.
- draco : Draco compression lib for GLTF compression.
- rapidjson : JSON generation, used internally in GLTF lib to generate GLTF models.
- json : JSON generation, used primarily.
- stb/images : Image module for encoding/decoding various image data formats.
- cxxopts : CLI options parser.
- glm : Math library for graphics.