-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The upgrade
does not properly handle gltfUpAxis
#165
Comments
I started to create test data for this. The case of a glTF 1.0 asset that uses the I'll attach the current state of the test data (together with the Sandcastle) here: It tries to cover some combinations from
Not all of them will be covered. When there ever is a data set with a glTF 1.0 with x-up (?) that declares The data will probably end up as a set of tests, using the "golden" approach that is already used for the 'migration' specs. ('m glad that I once created that |
This was resolved via #166 . There may still be obscure combinations of legacy features where ~"something does not work as desired", but these should be tracked in own issues if they come up. |
One legacy feature of 3D Tiles (which, I think, even predates 3D Tiles 1.0), was the possibility to specify an "up-axis" for the glTF assets that it referred to (indirectly, e.g. via B3DM). This was originally caused by the lack of an "up-axis" convention in glTF itself.
Now, there may still be legacy tilesets that specify the
gltfUpAxis
like this:Right now, the
upgrade
command does not handle this property at all.The
upgrade
command should check for this property, andasset
The latter is a bit tricky. It is technically simple, or even trivial: Just throw in a few axis conversion matrices here and there. But it is highly error-prone, due to certain corner cases. For example: It might be that a glTF 1.0 asset uses the
CESIUM_RTC
extension, or the batch table defines anRTC_CENTER
(or... maybe even both 🤪 ). These RTC centers are already taken into account during theupgrade
, and they already anticipate the Y-up-to-Z-up conversion of glTF vs. 3D Tiles. So one has to be very, very careful to not mix up some axes when thegltfUpAxis
has to be taken into account in addition to that. The exact order of transformations will have to be derived from the (legacy) specifications (or maybe even from the CesiumJS implementation), and verified with dedicated spec data sets.A very quick draft of handling the case that the input contains
gltfUpAxis=Z
is in the branchup-axis-handling-draft
, with all relevant changes in the commit b5dab25 . But this makes the assumption(!) that the input hasgltfUpAxis=Z
, and is not a general solution.The text was updated successfully, but these errors were encountered: