xuzhusheng / gltf-to-3d-tiles

Convert glTF model to Glb, b3dm and 3D tiles format.
MIT License
133 stars 38 forks source link

simple model: too many operations #17

Closed skemaikin closed 1 year ago

skemaikin commented 1 year ago

Hi! I have a GLB-file with cube model that I want view in the cesium (cube.glb). Trying to generate tiles produces the result:

{
    "asset": {
        "version": "1.0",
        "tilesetVersion": "1.0.0.0"
    },
    "geometricError": 6.928203230275509,
    "root": {
        "boundingVolume": {
            "box": [
                0.0, 0.0, 0.0,
                2.0, 0, 0,
                0, 2.0, 0,
                0, 0, 2.0
            ]
        },
        "geometricError": 6.928203230275509,
        "refine": "ADD",
        "children": [
            {
                "boundingVolume": {
                    "box": [
                        0.0, 0.0, 0.0,
                        1.0, 0, 0,
                        0, 1.0, 0,
                        0, 0, 1.0
                    ]
                },
                "geometricError": 6.928203230275509,
                "transform": [
                    2.0, 0.0, 0.0, 0.0, 
                    0.0, 2.0, 0.0, 0.0,
                    0.0, 0.0, 2.0, 0.0,
                    0.0, 0.0, 0.0, 1.0
                ],
                "content": {
                    "uri": "0.b3dm"
                }
            }
        ]
    }
}

Q: Is the transform section positioned correctly?

In order to get the correct result in a cesium, I have to generate a b3dm file (b3dm mode), replace name inside uri section and move the transform section to the correct place and change it's content. It seems to me that there are too many operations.

xuzhusheng commented 1 year ago

haven't support the glb format input yet

skemaikin commented 1 year ago

yes, I know it. I convert glb to gltf before generatin tileset.