OpenDroneMap / Obj2Tiles

Converts OBJ files to OGC 3D tiles by performing splitting, decimation and conversion
GNU Affero General Public License v3.0
196 stars 58 forks source link

[Question] top-level matrix in tileset.json has rotation defined #22

Open Rakiah opened 1 year ago

Rakiah commented 1 year ago

Hello,

thank you for the tool, i'm currently trying to rotate my model once displayed on the map, as such I was playing with the tileset.json file top-level matrice and noticed something strange,

this tool explains that only transformation is applied (to go from local coordinates to ECEF coordinates) however the matrix has predefined values on rotation parts

image

shouldn't the matrix be as following ?

1 0 0 0 0 1 0 0 0 0 1 0 tX tY tZ 1

could you explain why isnt that the case and how would I go about applying custom rotation ?

HeDo88TH commented 1 year ago

Check out the official documentation: https://github.com/CesiumGS/3d-tiles/tree/main/specification#transforms And how the calculations are made by Obj2Tiles: https://github.com/OpenDroneMap/Obj2Tiles#rotating-the-model Some math refresh https://www.brainvoyager.com/bv/doc/UsersGuide/CoordsAndTransforms/SpatialTransformationMatrices.html