There is no way how to provide bounding volume via the API since the the library generates bounding volumes (both OBB and MBS) for each node on its own.
Bounding volume of a non-empty node is computed only from node's mesh (vertices) and ignores bounding volumes/geometries of node's subtree. If a more detailed nodes are larger than the their parent nodes then they are not properly visualized (at least in AGOL) because the renderer does not descend to subtree of a node that is outside of viewport.
Also, the scene's extent in 3dSceneLayer.json does not cover whole scene.
When we process a library-generated SLPK file by the ArcGIS Pro Upgrade Scene Layer tool the upgraded SLPK file does not suffer with these problems. Node's bounding volume covers node and whole its subtree. Also, the scene's extent is correct.
So, current layer export via i3s-lib is broken and deviates from the functionality provided by the ArcGIS Pro.
We have generated a sample SLPK dataset via the i3s-lib library, where:
Level 1 has a simple mesh of a cube (12 faces), with 10 meter half-axis.
At each subsequent level the cube's half-axis grows by 10 meters.
Bottom of the tree ends up at level 41 with cube with 410 meter half-axis.
All cubes share common center.
Library generated dataset suffers from the above described problems: root node has OBB with halfSize = [10, 10, 10] and MBS radius = 17.32, i.e. covering only the top-level 20x20x20 m cube.
ArcGIS Pro re-generated (upgraded) dataset has correct node bounding volumes: root node has OBB with halfSize = [410, 410, 410] and MBS radius = 710.14, i.e. covering whole subtree including the bottom 820x820x820 m cube.
There is no way how to provide bounding volume via the API since the the library generates bounding volumes (both OBB and MBS) for each node on its own.
Bounding volume of a non-empty node is computed only from node's mesh (vertices) and ignores bounding volumes/geometries of node's subtree. If a more detailed nodes are larger than the their parent nodes then they are not properly visualized (at least in AGOL) because the renderer does not descend to subtree of a node that is outside of viewport.
Also, the scene's
extent
in3dSceneLayer.json
does not cover whole scene.When we process a library-generated SLPK file by the ArcGIS Pro Upgrade Scene Layer tool the upgraded SLPK file does not suffer with these problems. Node's bounding volume covers node and whole its subtree. Also, the scene's
extent
is correct.So, current layer export via i3s-lib is broken and deviates from the functionality provided by the ArcGIS Pro.
We have generated a sample SLPK dataset via the
i3s-lib
library, where:Library generated dataset suffers from the above described problems:
root
node has OBB withhalfSize
=[10, 10, 10]
and MBS radius =17.32
, i.e. covering only the top-level 20x20x20 m cube.ArcGIS Pro re-generated (upgraded) dataset has correct node bounding volumes:
root
node has OBB withhalfSize
=[410, 410, 410]
and MBS radius =710.14
, i.e. covering whole subtree including the bottom 820x820x820 m cube.