CesiumGS / cesium

An open-source JavaScript library for world-class 3D globes and maps :earth_americas:
https://cesium.com/cesiumjs/
Apache License 2.0
12.73k stars 3.45k forks source link

A bug about the 3dtiles model is offset in 2d view #10817

Open Eva-Skye opened 1 year ago

Eva-Skye commented 1 year ago

My English is poor, the following is the translation When the original point of the model is inconsistent with the actual center point of the model, when switching from SCENE3D view to SCENE2D view, the model is offset, and errors are eliminated. Zooming and panning will make the model display incomplete。 Is it true that the center point of the model is not at the origin when doing ortho correction

lilleyse commented 1 year ago

@Eva-Skye could you try constructing the tileset with projectTo2D: true. This option was added in Cesium JS 1.97.

Eva-Skye commented 1 year ago

Thank you for your timely reply, but after using projectTo2D, the problem seems even worse.

This is the effect of projectTo2D: false c8fa27f3acdf08d098f3df21ee08349

This is the effect of projectTo2D: true 2347aec2f6dd64c3aca762b9cb88840

I will show their origin and center point, which can better reflect the problems caused by their different distance 38a2fbbe4ad6a2705c49571b2765619

Eva-Skye commented 1 year ago

The latest test shows that the exception of projectTo2D may not be related to the origin and center point. Is this related to the texture format processed by cesiumlab? image

lilleyse commented 1 year ago

@Eva-Skye Would you be able to share the tileset you're using so we can help debug?

Eva-Skye commented 1 year ago

@lilleyse The data file has a certain degree of privacy. I don't know how to transfer it to you. I created a private library and invited you to download the data l use there. There may be a time difference of several hours between us, sorry to bother you. The url is:https://github.com/Eva-Skye/test-3dtiles

Eva-Skye commented 1 year ago

@lilleyse My login to github is limited. I failed to upload data several times 10 hours ago. It was late at night, so I had to go to bed.

Eva-Skye commented 1 year ago

@lilleyse From the perspective of data, I found that there is a common feature in the files that will make mistakes when using projectTo2D. When a json file loads multiple b3dms, the mesh displays normally. When a json file and b3dms correspond one by one, the mesh displays incorrectly. Hope this information will help solve the case.

yuz1 commented 1 year ago

@lilleyse From the perspective of data, I found that there is a common feature in the files that will make mistakes when using projectTo2D. When a json file loads multiple b3dms, the mesh displays normally. When a json file and b3dms correspond one by one, the mesh displays incorrectly. Hope this information will help solve the case.

The same display error will be displayed wiith :“RTC_CENTER".

point cloud data not only one json file but also use “RTC_CENTER": https://sandcastle.cesium.com/index.html?src=3D%20Tiles%20Point%20Cloud.html viewer.scene.mode = 1;

yuz1 commented 1 year ago

@lilleyse From the perspective of data, I found that there is a common feature in the files that will make mistakes when using projectTo2D. When a json file loads multiple b3dms, the mesh displays normally. When a json file and b3dms correspond one by one, the mesh displays incorrectly. Hope this information will help solve the case.

The same display error will be displayed wiith :“RTC_CENTER".

point cloud data not only one json file but also use “RTC_CENTER": https://sandcastle.cesium.com/index.html?src=3D%20Tiles%20Point%20Cloud.html viewer.scene.mode = 1;

use projectTo2D: true Fixed