Skip to content
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

EXT_feature_metadata buffers are not 8-byte aligned #64

Open
nithinp7 opened this issue Dec 2, 2021 · 6 comments
Open

EXT_feature_metadata buffers are not 8-byte aligned #64

nithinp7 opened this issue Dec 2, 2021 · 6 comments

Comments

@nithinp7
Copy link
Contributor

nithinp7 commented Dec 2, 2021

This pertains specifically to #58

I ran into this issue with a cdb-to-3dtiles-next tileset, it seems like sometimes the metadata buffers aren't 8-byte aligned (as the extension spec prescribes). I briefly looked through the cdb-to-3dtiles code and I didn't catch any 8-byte alignment of the metadata buffers, so that seemed to confirm my understanding.

Again I looked only briefly at the code here; the issue may be a bad implementation on my end or a misunderstanding of the spec even, feel free to close this if that is the case!

@sanjeetsuhag

@sanjeetsuhag
Copy link

Do you know which type of GLBs are affected? Is the GSModels or the GTModels?

@nithinp7
Copy link
Contributor Author

nithinp7 commented Dec 2, 2021

I've noticed it with Elevation and GSModels glbs. GTModels are not completely supported yet in cesium-native (at least the instanced ones) so those may secretly have the same issue too even though it's hidden for now.

@nithinp7
Copy link
Contributor Author

nithinp7 commented Dec 2, 2021

I'm not sure if it's related, but I'm going to retile with this branch I opened a while ago just to check: #62.

@sanjeetsuhag
Copy link

@nithinp7 Did retiling on that branch help resolve your issue?

@nithinp7
Copy link
Contributor Author

nithinp7 commented Dec 9, 2021

@sanjeetsuhag I finally got around to retiling again with the branch, the issue seems to still remain. I had to comment out our alignment validation check to get EXT_feature_metadata buffers to work.

@nithinp7
Copy link
Contributor Author

I think the issue is here:

bufferView.byteOffset = bufferSize;

All metadata buffers are just tacked onto the end of the 0th buffer, with no padding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants