Closed chenkianwee closed 3 years ago
That implementation note is mainly geared towards data in WGS84 ECEF coordinates, whereas yours is in a local ENU reference frame.
The changes you made to the glTF are still good, but the tile transform should be a matrix that transforms from local space back to global space, which will include a rotational component.
This sandcastle takes the center point and creates a fixed frame matrix: Sandcastle. If you use that transform as the tile transform it should be positioned better. You may need to make adjustments to the center point to have it be lined up perfectly.
One other thing to note is that the y-up to z-up transform happens automatically by the runtime engine so you don't need to include it in your tile transform.
Thanks for the clarification. I have never worked with ECEF CS and this answer is really helpful in my understanding. Thanks!
transformation_confusion.zip This is the quote in the specification document.
I am working with inherently z-up data. Following the suggestion, I have applied a z-up to y-up transformation in the gltf file.
"nodes": [ { "mesh": 0, "matrix": [1,0,0,0, 0,0,-1,0, 0,1,0,0, 0,0,0,1] } ],
In my tile, as suggested I applied a transformation to flip the y-up to z-up, which should cancel out the transformation. I have also transformed my tile to my geo-location with the following.
However, the result of this is confusing as shown in the image below. It is tilted at this 45 degree angle and it is not flat. I am confused with the transformation. Am I doing something wrong and mis-reading the instruction? I have attached my 3dtiles here if it helps. Thanks in advance.