GithubHelp home page GithubHelp logo

qqliyan / hierarchical-3dtiles-builder Goto Github PK

View Code? Open in Web Editor NEW

This project forked from giserwyj/hierarchical-3dtiles-builder

0.0 0.0 0.0 8 KB

tool for building hierarchical 3D tiles

JavaScript 100.00%

hierarchical-3dtiles-builder's Introduction

hierarchical-3dtiles-builder

Tool for building hierarchical 3D tiles

Core Features

  • Converting multiple 3d models into one or more 3D tilesets
    • .obj format supported
  • Supporting hierarchical LOD structure.
    • each level's content could be set in the same tileset, or be divided into different tilesets and connect each other by url field
    • settings for each level:
      • geometricError
      • externalChildSet : whether the next level's content should be stored in another tileset or not
  • Supporting transformation
    • scale, rotatation, translation, and shearing could be set by a 4 x 4 matrix in settings

Setting options inherited from objTo3d-tiles

  • model origin's position
    • latitude
    • longitude
    • height
  • type of bounding volume
    • region
    • box
    • sphere

Input and Settings

Available settings options:

  1. hierarchyFile : path to a json file describing hierarchy of models
  2. transform: a transform matrix represented by one dimensional array
  3. levels:
    • geometricError
    • externalChildSet

sample:

{
    "hierarchyFile": "./altizure_hierarchy.json",
    "transform": [
        1, 0, 0, 0,
        0, -1, 0, 0,
        0, 0, -1, 0,
        0, 0, 0, 1
    ],
    "levels": [
        {
            "level": 0,
            "geometricError": 8,
            "externalChildSet": false
        },
        {
            "level": 1,
            "geometricError": 4,
            "externalChildSet": false
        },
        {
            "level": 2,
            "geometricError": 2,
            "externalChildSet": true
        },
        {
            "level": 3,
            "geometricError": 1,
            "externalChildSet": false
        },
    ]
}

Keys in Hierarchy File

  • models: models' tree
    • level
    • filename
    • children
  • basePath: base path of model file

sample:

{
  "basePath": "/home/user/models",
  "models": [
    {
      "level": 0,
      "filename": "tile_0_0_0_tex.obj",
      "children": [
        {
          "level": 1,
          "filename": "tile_1_0_0_tex.obj",
          "children": [
            {
              "level": 2,
              "filename": "tile_2_0_0_tex.obj",
              "children": []
            },
            {
              "level": 2,
              "filename": "tile_2_0_64_tex.obj",
              "children": []
            },
            {
              "level": 2,
              "filename": "tile_2_64_0_tex.obj",
              "children": []
            },
            {
              "level": 2,
              "filename": "tile_2_64_64_tex.obj",
              "children": []
            }
          ]
        },
        {
          "level": 1,
          "filename": "tile_1_128_0_tex.obj",
          "children": [
            {
              "level": 2,
              "filename": "tile_2_128_0_tex.obj",
              "children": []
            },
            {
              "level": 2,
              "filename": "tile_2_128_64_tex.obj",
              "children": []
            },
            {
              "level": 2,
              "filename": "tile_2_192_0_tex.obj",
              "children": []
            },
            {
              "level": 2,
              "filename": "tile_2_192_64_tex.obj",
              "children": []
            }
          ]
        }
      ]
    }
  ]
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.