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

After version 1.96 some 3dtiles display is not normal #11115

Open hemincan opened 1 year ago

hemincan commented 1 year ago

Sandcastle example:this is example image

image

But it is displayed normally in 1.96 and below. image

ggetz commented 1 year ago

Thanks for the report @hemincan. I can confirm this is a bug after we overhauled glTF loading.

jinjun1994 commented 1 year ago

same problem

jinjun1994 commented 1 year ago

How to fix this bug? I am in a hurry. @ggetz

jinjun1994 commented 1 year ago

I want to fix this bug, could you give me some clues as I cannot locate it? Thank you very much! @ggetz

ggetz commented 1 year ago

Hi @jinjun1994, this would likely need further debugging to determine the exact issue. I would begin looking in GltfLoader which loads the glTF embedded in the tile, and creates the resources needed to render the glTF. Then ModelSceneGraph prepares the resources for rendering.

jinjun1994 commented 1 year ago

@ggetz
image image

The issue may be related to the size of the index buffer? Under the new glTF loader architecture, the glTF file is not displayed. The command is "drawElements: TRIANGLES, 269259, 5125 (UNSIGNED_INT), 0". However, when changed to "UNSIGNED_SHORT", although the object is deformed, it is displayed.

luolihui119 commented 1 year ago

Hi @jinjun1994 ,Have you found a solution yet?Cesium version is 1.102

luolihui119 commented 1 year ago

This issue is related to the index buffer.This could be the reason: GltfLoader Line 1253 : indices.count = accessor.count; this count is not equal to indexBufferLoader.buffer.numberOfIndices;

MSNjojo commented 1 year ago

This issue is related to the index buffer.This could be the reason: GltfLoader Line 1253 : indices.count = accessor.count; this count is not equal to indexBufferLoader.buffer.numberOfIndices;

yes, here is my work around context.js count = defaultValue(count, indexBuffer.numberOfIndices); => count = indexBuffer.numberOfIndices;

I guess there are some errors in model loader or the process of parsing data. It results in numberOfIndices not equal to count