3d tiles disappearing with camera move

**Hi all, **

**I generated a 3d tileset using (https://github.com/Oslandia/py3dtiles ). I am generating 3d multipolygons from 2d polygons and by using py3dtiles export models. (There is a sample model in the attachment). I am able to view the tileset, however models are disappearing with camera movements(zoom , pan etc.). You can find a gif in the attachment. **

**Is this behaviour related to the models? Is there a way to avoid it? **

1.b3dm (48.8 KB)

**Sorry about the attachment :slight_smile: Uploading video version. **

cesium.mp4 (1.21 MB)

There are a lot of validation errors for the embedded glb file, some of which suggest the accessor min/max values are incorrect, which may lead the culling issues seen in the video. The results from the glTF validator are below. You may have to open a bug report in py3dtiles.

{

“uri”: “1.glb”,

“mimeType”: “model/gltf-binary”,

“validatorVersion”: “2.0.0-dev.2.0”,

“validatedAt”: “2018-04-10T23:15:32.531Z”,

“issues”: {

“numErrors”: 15,

“numWarnings”: 0,

“numInfos”: 1,

“numHints”: 0,

“messages”: [

{

“code”: “NODE_MATRIX_DEFAULT”,

“message”: “Do not specify default transform matrix.”,

“severity”: 2,

“pointer”: “/nodes/0/matrix”

},

{

“code”: “ACCESSOR_MIN_MISMATCH”,

“message”: “Declared minimum value for this component (1991.44189453125) does not match actual minimum (-8570.9814453125).”,

“severity”: 0,

“pointer”: “/accessors/0/min/0”

},

{

“code”: “ACCESSOR_ELEMENT_OUT_OF_MIN_BOUND”,

“message”: “Accessor contains 1740 element(s) less than declared minimum value 1991.44189453125.”,

“severity”: 0,

“pointer”: “/accessors/0/min/0”

},

{

“code”: “ACCESSOR_MIN_MISMATCH”,

“message”: “Declared minimum value for this component (100) does not match actual minimum (1375.197021484375).”,

“severity”: 0,

“pointer”: “/accessors/0/min/1”

},

{

“code”: “ACCESSOR_MIN_MISMATCH”,

“message”: “Declared minimum value for this component (-7382.7958984375) does not match actual minimum (0).”,

“severity”: 0,

“pointer”: “/accessors/0/min/2”

},

{

“code”: “ACCESSOR_MAX_MISMATCH”,

“message”: “Declared maximum value for this component (1375.197021484375) does not match actual maximum (-7382.7958984375).”,

“severity”: 0,

“pointer”: “/accessors/0/max/0”

},

{

“code”: “ACCESSOR_MAX_MISMATCH”,

“message”: “Declared maximum value for this component (0) does not match actual maximum (1991.44189453125).”,

“severity”: 0,

“pointer”: “/accessors/0/max/1”

},

{

“code”: “ACCESSOR_ELEMENT_OUT_OF_MAX_BOUND”,

“message”: “Accessor contains 1740 element(s) greater than declared maximum value 1375.197021484375.”,

“severity”: 0,

“pointer”: “/accessors/0/max/1”

},

{

“code”: “ACCESSOR_MAX_MISMATCH”,

“message”: “Declared maximum value for this component (-8570.9814453125) does not match actual maximum (100).”,

“severity”: 0,

“pointer”: “/accessors/0/max/2”

},

{

“code”: “ACCESSOR_ELEMENT_OUT_OF_MAX_BOUND”,

“message”: “Accessor contains 1740 element(s) greater than declared maximum value 1375.197021484375.”,

“severity”: 0,

“pointer”: “/accessors/0/max/2”

},

{

“code”: “ACCESSOR_MIN_MISMATCH”,

“message”: “Declared minimum value for this component (-1) does not match actual minimum (-0.9999330043792725).”,

“severity”: 0,

“pointer”: “/accessors/1/min/0”

},

{

“code”: “ACCESSOR_MIN_MISMATCH”,

“message”: “Declared minimum value for this component (-1) does not match actual minimum (-0.9999942779541016).”,

“severity”: 0,

“pointer”: “/accessors/1/min/1”

},

{

“code”: “ACCESSOR_MIN_MISMATCH”,

“message”: “Declared minimum value for this component (-1) does not match actual minimum (0).”,

“severity”: 0,

“pointer”: “/accessors/1/min/2”

},

{

“code”: “ACCESSOR_MAX_MISMATCH”,

“message”: “Declared maximum value for this component (1) does not match actual maximum (0.9999657273292542).”,

“severity”: 0,

“pointer”: “/accessors/1/max/0”

},

{

“code”: “ACCESSOR_MAX_MISMATCH”,

“message”: “Declared maximum value for this component (1) does not match actual maximum (0.999946117401123).”,

“severity”: 0,

“pointer”: “/accessors/1/max/1”

},

{

“code”: “ACCESSOR_MAX_MISMATCH”,

“message”: “Declared maximum value for this component (20) does not match actual maximum (19).”,

“severity”: 0,

“pointer”: “/accessors/2/max/0”

}

],

“truncated”: false

},

“info”: {

“version”: “2.0”,

“generator”: “py3dtiles”,

“resources”: [

{

“pointer”: “/buffers/0”,

“mimeType”: “application/gltf-buffer”,

“storage”: “glb”,

“byteLength”: 48720

}

],

“hasAnimations”: false,

“hasMaterials”: true,

“hasMorphTargets”: false,

“hasSkins”: false,

“hasTextures”: false,

“hasDefaultScene”: true,

“primitivesCount”: 1,

“maxAttributesUsed”: 3

}

}

``

Thanks for the reply Sean,

I updated the accessor values and the tiles are not disappearing any more. Now some surfaces are not drawn properly. However wireframe seems valid. There is only one note in Gltf validator. (NODE_MATRIX_DEFAULTDo not specify default transform matrix./nodes/0/matrix)

Is this about the transform matrix?

It’s most likely due to incorrect winding order for some of the triangles. By default triangles whose winding order is clockwise will not be rendered. For more info see: https://www.khronos.org/opengl/wiki/Face_Culling.

To fix this, either make sure the triangles have consistent winding order…

Or add

doubleSided : true

``

to the glTF material, which will prevent back facing triangles from being culled.