nytimes / aframe-loader-3dtiles-component

A-Frame component using 3D-Tiles
Other
189 stars 27 forks source link

It looks like it doesn't recognize and apply RTC_CENTER #7

Closed cyrilpreiss closed 2 years ago

cyrilpreiss commented 2 years ago

As i'm having issues with my metashape tilesets with this library, i have asked help on the metashape forum.

And here is the answer:

https://www.agisoft.com/forum/index.php?topic=14118.msg62203#msg62203

It looks like aframe doesn't recognize and apply RTC_CENTER property from the Batched 3D Model Feature Table: http://docs.opengeospatial.org/cs/18-053r2/18-053r2.html#141

This property specifies offset that needs to be added to all vertex coordinates, and without this offset vertex coordinates are shifted away from their corresponding bounding volumes.

Could you check this out ?

Avnerus commented 2 years ago

Hey there @cyrilpreiss, Thank you for reporting this issue!

First, just a clarification for further issues, the A-Frame component is wrapper around our three.js library: three-loader-3dtiles, so if you're having general issues viewing tilesets, that would probably be the best place to report them.

To the matter at hand, you're right. I have so far only encountered the RTC_CENTER property in point clouds and it is supported there, but not in mesh tiles (I haven't tested metashape exports as of yet). However, it seems the people at metashape updated the discussion with the following statement:

We updated Cesium 3D tiles export to use root tile transform instead of RTC_CENTER
property in Metashape 1.8.1 build 13915.

This means it might work well now with the updated version of Metashape, are you able to test it? The fact they made this change quickly might mean that the community is converging away from RTC_CENTER and into using transform matrices. However, if we encounter more cases requiring this feature, we could definitely add it.

Let me know how it works! PS. You have another issue still open, could you comment or close that one? Thanks,

/Avner

cyrilpreiss commented 2 years ago

Hi,

First, the guy from metashape wrote Aframe in his answer but he should have wtritten aframe-loader-tiles instead.

In the new metashape version they fixed an issue regarding the max error value that had to be set to 1.

The RTC_center not being applied is specific to your library.

If you need a tileset from metashape for your tests let me know.

Avnerus commented 2 years ago

Hi @cyrilpreiss,

The RTC_center not being applied is specific to your library.

Are you sure they didn't fix it? They specifically mention moving from RTC_CENTER to using tile transforms (latest comment on that thread). Have you tried that build 13915?

As I wrote, I do recognize that this is not applied in our library, however if they did move away from it, a fix might not be as urgent.

cyrilpreiss commented 2 years ago

Yes i tried and it still doesn't work

Télécharger Outlook pour Androidhttps://aka.ms/AAb9ysg


From: Avnerus @.> Sent: Wednesday, February 2, 2022 5:04:45 PM To: nytimes/aframe-loader-3dtiles-component @.> Cc: cyrilpreiss @.>; Mention @.> Subject: Re: [nytimes/aframe-loader-3dtiles-component] It looks like it doesn't recognize and apply RTC_CENTER (Issue #7)

Hi @cyrilpreisshttps://github.com/cyrilpreiss,

The RTC_center not being applied is specific to your library.

Are you sure they didn't fix it? They specifically mention moving from RTC_CENTER to using tile transforms (latest comment on that threadhttps://www.agisoft.com/forum/index.php?topic=14118.msg62354#msg62354). Have you tried that build 13915?

As I wrote, I do recognize that this is not applied in our library, however if they did move away from it, a fix might not be as urgent.

— Reply to this email directly, view it on GitHubhttps://github.com/nytimes/aframe-loader-3dtiles-component/issues/7#issuecomment-1028096420, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ANLBOZ74MY5VN463BOETZRLUZFIZ3ANCNFSM5NEU55JA. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you were mentioned.Message ID: @.***>

Avnerus commented 2 years ago

Got it, If you could please provide me with a tileset created by build 13915 I can check it out. Have you confirmed that the tileset no longer contains the RTC_CENTER property? Thanks!

cyrilpreiss commented 2 years ago

My bad, when i answered you today i was in a plane and i hadn't noticed the last input on the metashape forum about version 13915. I'm sorry, i will check with this new version as soon as possible and let you know

Avnerus commented 2 years ago

No worries! Have safe travels and let me know how it works with the new version.

cyrilpreiss commented 2 years ago

Hi, it seems to work almost fine now.

https://www.gigascope.net/vr/streetart1ok/

(vr floor isn't set yet)

but there is still a small issue, the first tile layer is not aligned: If you open the link above and walk backward until it shows the less defined layer you will see it shows up in a different place and rotated.

Avnerus commented 2 years ago

Hi, Yes I tested this now and I believe the cause is a certain race condition in which the transform matrix of the tileset is being updated before the A-Frame object3D properties are fully applied. I tested out a fix. Could you please try it using the following url?

https://cdn.jsdelivr.net/gh/nytimes/aframe-loader-3dtiles-component@0b2d2bcecf020c8b2b3d31d24e35aab4e1eda31a/dist/aframe-loader-3dtiles-component.min.js
Avnerus commented 2 years ago

@cyrilpreiss I now merged this fix, hope it solved your issue! I am closing this but feel free to re-open if needed.