All Projects → PrincessGod → Objto3d Tiles

PrincessGod / Objto3d Tiles

Licence: apache-2.0
Convert obj model file to 3d tiles

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Objto3d Tiles

3dtilesrendererjs
Renderer for 3D Tiles in Javascript using three.js
Stars: ✭ 333 (-30.62%)
Mutual labels:  gltf, cesium
Cesium
An open-source JavaScript library for world-class 3D globes and maps 🌎
Stars: ✭ 8,095 (+1586.46%)
Mutual labels:  gltf, cesium
FlightAirMap-3dmodels
3D models used by FlightAirMap with Cesium
Stars: ✭ 23 (-95.21%)
Mutual labels:  cesium, gltf
reearth
Free, open, highly extensible WebGIS platform
Stars: ✭ 121 (-74.79%)
Mutual labels:  cesium
Gltf Vscode
This is an extension for Visual Studio Code to add support for editing glTF files.
Stars: ✭ 259 (-46.04%)
Mutual labels:  gltf
Fx Gltf
A C++14/C++17 header-only library for simple, efficient, and robust serialization/deserialization of glTF 2.0
Stars: ✭ 257 (-46.46%)
Mutual labels:  gltf
Vulkan Gltf Pbr
Physical based rendering with Vulkan using glTF 2.0 models
Stars: ✭ 438 (-8.75%)
Mutual labels:  gltf
MeshIO
CloudCompare plugin for loading COLLADA, glTF, and IFC-SPF 3D models
Stars: ✭ 14 (-97.08%)
Mutual labels:  gltf
Flightairmap
Open source project displaying live aircrafts, ships or trackers on 2D/3D map. Browse through the data based on a particular aircraft, airline, airport, tracker or vessel to search through the database or see extensive statistics. Can use ADS-B in SBS1 format (dump1090, Radarcape,...), VRS, VA (VATSIM, IVAO whazzup.txt, phpvms,...), ACARS (acarsdec, acarsdeco2), APRS, AIS as datasource.
Stars: ✭ 366 (-23.75%)
Mutual labels:  cesium
Spoke
Easily create custom 3D environments
Stars: ✭ 321 (-33.12%)
Mutual labels:  gltf
Xeokit Sdk
Open source JavaScript SDK for viewing high-detail, full-precision 3D BIM and AEC models in the Web browser.
Stars: ✭ 316 (-34.17%)
Mutual labels:  gltf
Loaders.gl
Loaders for big data visualization. Website:
Stars: ✭ 272 (-43.33%)
Mutual labels:  gltf
Examplesforcesium
My personal examples for Cesium, hopefully may it help you to build this beautiful world~
Stars: ✭ 350 (-27.08%)
Mutual labels:  cesium
Xbsjearthui
XbsjEarthUI是基于Cesium和EarthSDK的三维GIS/BIM的UI模板,可以基于此定制自己的三维App
Stars: ✭ 373 (-22.29%)
Mutual labels:  cesium
Resium
React components for 🌏 Cesium
Stars: ✭ 356 (-25.83%)
Mutual labels:  cesium
Gltf Sdk
glTF-SDK is a C++ Software Development Kit for glTF (GL Transmission Format -https://github.com/KhronosGroup/glTF).
Stars: ✭ 312 (-35%)
Mutual labels:  gltf
orkid
Orkid Media Engine (C++/Lua/Python3/Linux/MacOs/OpenVR/Qt5)
Stars: ✭ 20 (-95.83%)
Mutual labels:  gltf
Gltfutility
Simple GLTF importer for Unity
Stars: ✭ 305 (-36.46%)
Mutual labels:  gltf
Mars3d
Mars3D三维地球平台软件 主仓库,包含示例及引导
Stars: ✭ 332 (-30.83%)
Mutual labels:  cesium
Castle Engine
Cross-platform (desktop, mobile, console) 3D and 2D game engine supporting many asset formats (glTF, X3D, Spine...) and using modern Object Pascal
Stars: ✭ 475 (-1.04%)
Mutual labels:  gltf

objTo3d-tiles

WARNING: THIS REPO IS NO LONGER MAINTANING, MAYBE NOT SUPPORT NEWERST CESIUM.

Node command line tool and module convert obj model file to 3D Tiles, based on obj2gltf.

Online Demonstration

简体中文

NOTE: Only support .b3dm and .i3dm for now!

Please use Cesium after v1.37, cause this 3d tile use glTF2.0.

Getting Start

Make sure you have Node installed, and then

npm install -g obj23dtiles

Basic Usage

  • Convert .obj to .gltf
obj23dtiles -i ./bin/barrel/barrel.obj
// Export barrel.gltf at obj folder.
  • Convert .obj to .glb
obj23dtiles -i ./bin/barrel/barrel.obj -b
// Export barrel.glb at obj folder.

NOTE: More detial to convert .gltf and .glb can find at obj2gltf.

NOTE: If your model have tarnsparency texture please add --checkTransparency parameter.

NOTE: If your model using blinn-phong material, and use occlusion when convert to PBR material, the model will looks darker. The useOcclusion default is false, remember adding --useOcclusion if your model using PBR material. Here are some showcase about it.

  • Convert .obj to .b3dm with default BatchTable, which have batchId and name property, and name is model's name.
obj23dtiles -i ./bin/barrel/barrel.obj --b3dm
// Export barrel.b3dm at obj folder.
  • Convert .obj to .b3dm with default BatchTable and export default BatchTable (a JSON file). Maybe get information for custom BatchTable.
obj23dtiles -i ./bin/barrel/barrel.obj --b3dm --outputBatchTable
// Export barrel.b3dm and barrel_batchTable.json at obj folder.
obj23dtiles -i ./bin/barrel/barrel.obj -c ./bin/barrel/customBatchTable.json --b3dm
// Export barrel.b3dm with custom batch table at obj folder.
obj23dtiles -i ./bin/barrel/barrel.obj -f ./bin/barrel/customFeatureTable.json --i3dm
// Export barrel.i3dm at obj folder.
obj23dtiles -i ./bin/barrel/barrel.obj -f ./bin/barrel/customFeatureTable.json
-c ./bin/barrel/customI3dmBatchTable.json --i3dm
// Export barrel.i3dm with BatchTable at obj folder.

FeatureTable support following parameters : position, orientation, scale.

Create Tileset

  • Create a single tileset with .b3dm tile.
obj23dtiles -i ./bin/barrel/barrel.obj --tileset
// Export ./Batchedbarrel folder at obj folder which is a tileset.
  • Create a single tileset with .b3dm tile and custom tileset options, custom BatchTable.
obj23dtiles -i ./bin/barrel/barrel.obj --tileset
-p ./bin/barrel/customTilesetOptions.json -c ./bin/barrel/customBatchTable.json
// Export ./Batchedbarrel folder at obj folder which is a tileset with custom tileset options.
  • Create a single tileset with .i3dm tile.
obj23dtiles -i ./bin/barrel/barrel.obj --tileset --i3dm
-f ./bin/barrel/customFeatureTable.json
// Export ./Instancedbarrel folder at obj folder which is a tileset.
  • Create a single tileset with .i3dm tile and custom tileset options, custom BatchTable.
obj23dtiles -i ./bin/barrel/barrel.obj --tileset --i3dm
-f ./bin/barrel/customFeatureTable.json -p ./bin/barrel/customTilesetOptions.json
-c ./bin/barrel/customI3dmBatchTable.json
// Export ./Instancedbarrel folder at obj folder which is a tileset.

The customTilesetOptions.json can have options bellow, and these are fake values, please only add properties you need, other value will be auto calculate through .obj file.

{
    "longitude":      -1.31968,     // Tile origin's(models' point (0,0,0)) longitude in radian.
    "latitude":       0.698874,     // Tile origin's latitude in radian.
    "transHeight":    0.0,          // Tile origin's height in meters.
    "region":         true,         // Using region bounding volume.
    "box":            false,        // Using box bounding volume.
    "sphere":         false         // Using sphere bounding volume.
}

NOTE: If you are not specify the transHeight option, your model will be place at earth ground surface, which means no matter what the height your models are, the lowerest point of your models will be place at height = 0.0 on the earth. But if you want keep origin heigth you just need specify transHeight = 0.0.

Here are different bounding volumes.

Combine tilesets

You can combine tilesets into one tileset.json as external tileset.

obj23dtiles combine -i ./bin/barrel/output

Using as node module

If you want to use this tool in node or debug, check out how to use as node module.

Test

Navigate to this project folder and run

npm run test

Troubleshooting

First, make sure your .obj file is complete, normally include .obj, .mtl and textures like .jpg or .png. You can preview your .obj model via "Mixed Reality Viewer" if you are in windows 10. Otherwise you can use this online viewer.

Second, export .glb and check if it display correctly. You can use Cesium or Three.js gltf viewer.

In the end, just export .b3dm or tileset and load in Cesium.

Sample Data

Sample data under the .bin\barrel\ folder.

barrel\
    |
    - barrel.blend              --
    |                             |- Blender project file with texture.
    - barrel.png                --
    |
    - barrel.obj                --
    |                             |- Obj model files.
    - barrel.mtl                --
    |
    - customBatchTable.json     ---- Custom batchtable for b3dm.
    |
    - customTilesetOptions.json ---- Custom tileset optional parameters.
    |
    - customFeatureTable.json   ---- Custom FeatureTable for i3dm.
    |
    - customI3dmBatchTable.json ---- Custom BatchTable for i3dm.
    |
    - output\                   ---- Export data by using upper files.
        |
        - barrel.glb
        |
        - barrel.gltf
        |
        - barrel_batchTable.json    ---- Default batch table.
        |
        - Batchedbarrel\            ---- Tileset use b3dm
        |   |
        |   - tileset.json
        |   |
        |   - barrel.b3dm
        |
        - Instancedbarrel\          ---- Tileset use i3dm
        |   |
        |   - tileset.json
        |   |
        |   - barrel.i3dm
        |
        - BatchedTilesets\          ---- Tileset with custom tileset.json
            |
            - tileset.json
            |
            - barrel_withDefaultBatchTable.b3dm
            |
            - barrel_withCustonBatchTable.b3dm

Resources

Credits

Great thanks to Sean Lilley(@lilleyse) for helping and advising.

Thanks AnalyticalGraphicsInc provide a lot of open source project (like Cesium and 3D Tiles) and creat a great GIS environment.

License

Apache License 2.0

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].