Skip to content

gltfpack: Double precision support for node translation values #583

Open
@sweco-sekrsv

Description

@sweco-sekrsv

Hi!

I noticed that the translation values of my matrix lacks the original precision after gltfpack have been applied.
I'm using these options when compressing the asset (gltfpack 0.19): -noq -cc -kn

My original matrix is:

            "matrix": [
                1,
                0,
                0,
                0,
                0,
                0,
                -1,
                0,
                0,
                1,
                0,
                0,
                3133805.225747891,
                5447439.535584584,
                -992857.7233499398,
                1
            ]

The matrix after gltfpack:

      "matrix": [
        1,
        0,
        0,
        0,
        0,
        0,
        -1,
        0,
        0,
        1,
        0,
        0,
        3133805.25,
        5447439.5,
        -992857.75,
        1
      ]

Is this possibly a bug or can I solve this somehow with the settings? The asset that are being compressed is to be used as an asset in 3D Tiles and the translation values in the matrix is important to move the asset to the correct real world location.

I attach a example.
matrix_precision.zip

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions