-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
3D tiles - tiles invisible and cut #4333
Comments
Thanks for the letting us know about these issues. Would you be able to send over the tileset so that we can debug them? |
i'm not sure I can publish it because it's ICGC model. but I can share it with you in private via email dropbox etc. |
Ok, you can send a dropbox link to slilley@agi.com |
shared! If anyone else want this model write your mail here and ill send it ASAP |
BTW, this model is generated by acute and was converted from dae to glTF using the COLLADA2GLTF and from glTF to b3dm by this |
Quick update: I noticed that the bounding spheres generated for the underlying model are not aligned properly, which causes the view frustum near plane to be incorrect (causing problem 1) and is probably related to problem 2. Would you also be able to also send over one of the original dae models through Dropbox? |
I don't have the dae, only the glTF files, I'll send you them shortly. As part of the b3dm convert process I have gone threw every vertex (in the POSITION accessor) and multiplied it by the transition matrix. because before the multiplication the model was directed by the Cartesian plane and not the cartographic. This might have been the problem.
this is the code that "fixed" the POSITION accessor: for (let i = 0; i < count; i++) {
tempCartesian3.x = buffer.readFloatLE(12 * i + offset);
tempCartesian3.y = buffer.readFloatLE(12 * i + offset + 4);
tempCartesian3.z = buffer.readFloatLE(12 * i + offset + 8);
addPointToExtent(tempCartesian3,currentExtent);
Cesium.Matrix4.multiplyByPoint(transformMatrix, tempCartesian3, tempCartesian3);
Cesium.Cartesian3.subtract(tempCartesian3, centerRtc, tempCartesian3);
buffer.writeFloatLE(tempCartesian3.x, 12 * i + offset);
buffer.writeFloatLE(tempCartesian3.y, 12 * i + offset + 4);
buffer.writeFloatLE(tempCartesian3.z, 12 * i + offset + 8);
} |
I've added the the gltf files to the shared dropbox |
Thanks I'll check them out soon. The bounding spheres are calculated from the min/max of the position accessor, so if those aren't updated as well that could be a problem. Since you are transforming the positions, you may also need to transform the min and max. So you tried using a To show the bounding spheres, in As a side note, I noticed that each of your tiles contains two meshes associated with it. One with POSITION, TEXCOORD_0, and BATCHID, and another with just POSITION and BATCHID. So in Cesium your tileset is actually rendering twice the number of commands than it needs. Anyways I'll take a closer look at the glTFs when I have a chance and get back to you. |
Seems that the min-max values was the issue. thanks for your help. Continue to do the great things you do! |
Nice! I'm glad it works now. |
I've tried to convert the gltf model of the old city Girona, Spain from here and recreated it as b3dm (by adding rtc_center, data as binary, batchId and b3dm header). The tileset that contains all these files has a root tile and 42 children that uses "replace" refine
There are 2 problems in the tile loading and view (both has video below)
(1)
(2)
The text was updated successfully, but these errors were encountered: