Incomplete b3dm map problem

I installed cesium for unity following the instructions on the official site

and added the correct path to tileset.json using the local URL.
However, b3dm files, which are 3D maps, were not output properly.
Only a portion of the entire map is displayed.

The composition is as follows.
2024-07-09 13 47 50

2024-07-09 13 48 11

In the console tab, the following two types of logs are repeated.

====first log===============================================================
[2024-07-09 13:46:24.349] [warning] [ErrorList.h:91] Warning when loading file:///C:/Users/test/Downloads/combine_b3dm_no_optimize/BlockXYBXA/BlockXYBXA_L15_8.b3dm:

  • indices accessor doesn’t match with decoded Draco indices
  • Attribute accessor.count doesn’t match with number of decoded Draco vertices.
  • Attribute accessor.count doesn’t match with number of decoded Draco vertices.

UnityEngine.Debug:Log (object)
Reinterop.ReinteropInitializer:UnityEngine_Debug_CallLog_FA05wu8x__otZNsgdHTnU9A (intptr) (at ./Library/PackageCache/com.cesium.unity@1.11.0/Runtime/generated/Reinterop/Reinterop.RoslynSourceGenerator/ReinteropInitializer.cs:61421)
Reinterop.ReinteropInitializer/ActionNativeFunction:Invoke () (at ./Library/PackageCache/com.cesium.unity@1.11.0/Runtime/generated/Reinterop/Reinterop.RoslynSourceGenerator/ReinteropInitializer.cs:58147)
System.Threading._ThreadPoolWaitCallback:PerformWaitCallback ()

====second log============================================================

[2024-07-09 13:46:24.303] [warning] [ErrorList.h:91] Warning when loading file:///C:/Users/test/Downloads/combine_b3dm_no_optimize/BlockXYBXA/BlockXYBXA_L15_6.b3dm:

  • Attribute accessor.count doesn’t match with number of decoded Draco vertices.
  • Attribute accessor.count doesn’t match with number of decoded Draco vertices.
  • Attribute accessor.count doesn’t match with number of decoded Draco vertices.
  • Attribute accessor.count doesn’t match with number of decoded Draco vertices.
  • Attribute accessor.count doesn’t match with number of decoded Draco vertices.
  • Attribute accessor.count doesn’t match with number of decoded Draco vertices.

UnityEngine.Debug:Log (object)
Reinterop.ReinteropInitializer:UnityEngine_Debug_CallLog_FA05wu8x__otZNsgdHTnU9A (intptr) (at ./Library/PackageCache/com.cesium.unity@1.11.0/Runtime/generated/Reinterop/Reinterop.RoslynSourceGenerator/ReinteropInitializer.cs:61421)
Reinterop.ReinteropInitializer/ActionNativeFunction:Invoke () (at ./Library/PackageCache/com.cesium.unity@1.11.0/Runtime/generated/Reinterop/Reinterop.RoslynSourceGenerator/ReinteropInitializer.cs:58147)
System.Threading._ThreadPoolWaitCallback:PerformWaitCallback ()

this is sample b3dm file
BlockXYYXB_L20_3.zip (245.3 KB)

What did I miss or make a mistake?

Please help.

Hi @jkzmkqwe,

From a glance, it looks like your data has some validation errors, which may be preventing it from loading properly. It would help to know what you used to produce your 3D Tileset.

We’re more than happy to troubleshoot tilesets that were tiled via Cesium ion, but it’s hard for us to debug data from external tilers. :slightly_smiling_face:

The b3dm file was created through DJI Terra.
and i’m checking b3dm file and json

this is tileset.json file
tileset.json.zip (2.8 MB)

and this is b3dm file
BlockAABBB_L13_1.b3dm.zip (63.1 KB)

so i checking b3dm file

i used 3d-tiles-validator
and this is report
tileset.report.json.zip (525.2 KB)

report repeat this message

{
“date”: “2024-07-10T13:36:55.299Z”,
“numErrors”: 44902,
“numWarnings”: 32,
“numInfos”: 0,
“issues”: [
{
“type”: “TILE_GEOMETRIC_ERRORS_INCONSISTENT”,
“path”: “/root/children/31”,
“message”: “Tile /root/children/31 has a geometricError of 10000000000, which is larger than the parent geometricError of 7593.91259765625”,
“severity”: “WARNING”
},
{
“type”: “CONTENT_VALIDATION_ERROR”,
“path”: “BlockXYYXY/BlockXYYXY_L14_2.b3dm”,
“message”: “BlockXYYXY/BlockXYYXY_L14_2.b3dm caused validation errors”,
“severity”: “ERROR”,
“causes”: [
{
“type”: “BINARY_INVALID_ALIGNMENT”,
“path”: “BlockXYYXY/BlockXYYXY_L14_2.b3dm”,
“message”: “The feature table binary must be aligned to 8 bytes”,
“severity”: “ERROR”
}
]

so i used b3dm info tool

command : b3dm info -i BlockAABBB_L22_240.b3dm

result :

Action: Info
b3dm file: BlockAABBB_L22_240.b3dm
b3dm header version: 1
b3dm header magic: b3dm
b3dm header bytelength: 197759
b3dm header featuretablejson length: 0
b3dm header batchtablejson length: 0
Feature table json: ‘’
Batch table json: ‘’
Byte padding rule check: 3 errors
Feature table binary must be aligned to an 8-byte boundary.
Batch table binary must be aligned to an 8-byte boundary.
Glb must be aligned to an 8-byte boundary.
glTF schema exception
The chunk must be padded to 4 bytes: 196423Model generated by <> seems to be malformed; Please, check the file at glTF Validator

i will change the geometricError value.(can you recommend the geometricError value or give me advice?)

but i don’t know how can change the [Feature table binary],[Batch table binary],[Glb],[chunk] value
I’m a beginner at cesium, so I don’t know the details.
Could you please advise?

ps.I previously provided 10GB of b3dm and tileset.json files to marco13.
With marco’s help, I was able to correct the combine error and run the combine command successfully.

And we confirmed that the combined b3dm file and tileset.json file run normally in cesiumjs.
However, the combined b3dm file and tileset.json file did not run properly in unity for cesium.
If you need the b3dm file for inspection, we can provide it to you.

The B3DM files in this data set are invalid.

There are errors at several layers. For the B3DM file that you attached, the 3D Tiles Validator says

    {
      "type": "BINARY_INVALID_ALIGNMENT",
      "path": "BlockAABBB_L13_1.b3dm",
      "message": "The feature table binary must be aligned to 8 bytes",
      "severity": "ERROR"
    }

When extracting the GLB (glTF binary) from this B3DM and passing it to the glTF Validator, it also reports several errors. These mainly refer to missing extension declarations, but also to invalid alignments.

The fact that this data can still be rendered in CesiumJS is due to the fact that CesiumJS is very forgiving for these errors. It tries to “ignore” the errors, and make the best out of invalid data.

Cesium For Unity (which is using cesium-native for reading that data) is less forgiving. In general, you cannot expect an engine to ignore errors or deal with invalid data.

There recently has been an additon to the 3D Tiles Tools - namely, a function that can fix certain alignment errors. This was added in Add function to update alignment by javagl · Pull Request #136 · CesiumGS/3d-tiles-tools · GitHub . And it might be the case that you can apply this to your B3DM files, and maybe they can be loaded in Cesium For Unity afterwards. But since there are a few unknowns (and additional errors, beyond the invalid alignment), there are no guarantees for that.

in this weekend, i will upload b3dm and tileset.json in cesium ion

And if you tell me your email address,
we can provide a link to download a compressed file containing the b3dm file and tileset.json file with the combine command and upgradealignment command applied.

@janine @Marco13
hello!
I applied the updatealignment command to all b3dm files.


However, not all b3dm files were displayed.

The first log and second log above are repeated.

Could you please give me some advice on how to see all tilesets?
For example, adjusting the property values ​​of unity’s cesium 3d tileset,
Modifying khr or b3dm values, adjusting property values ​​of tileset.json, etc.

The next problem is that when viewed from a distance, the b3dm map appears blurry and only visible when viewed closely.
Is there a way to see clearly from afar?

long distance
image

close distance


To resolve this issue, I also contacted DJI Terra via email.
And I am waiting.

If using Cesium3DTileset, try setting maximumScreenSpaceError lower, set even less than 1 if good render device.
Lower maximumScreenSpaceError make distant tiles stay at a high resolution level.

oh really thank you
now i can see high resolution b3dm map!

my maximumScreenSpaceError’s value is 0.5.

my gpu is rtx3080.

but… almost b3dm is not showing…

and repeated first log and second log

====first log===============================================================
[2024-07-09 13:46:24.349] [warning] [ErrorList.h:91] Warning when loading file:///C:/Users/test/Downloads/combine_b3dm_no_optimize/BlockXYBXA/BlockXYBXA_L15_8.b3dm:

  • indices accessor doesn’t match with decoded Draco indices
  • Attribute accessor.count doesn’t match with number of decoded Draco vertices.
  • Attribute accessor.count doesn’t match with number of decoded Draco vertices.

UnityEngine.Debug:Log (object)
Reinterop.ReinteropInitializer:UnityEngine_Debug_CallLog_FA05wu8x__otZNsgdHTnU9A (intptr) (at ./Library/PackageCache/com.cesium.unity@1.11.0/Runtime/generated/Reinterop/Reinterop.RoslynSourceGenerator/ReinteropInitializer.cs:61421)
Reinterop.ReinteropInitializer/ActionNativeFunction:Invoke () (at ./Library/PackageCache/com.cesium.unity@1.11.0/Runtime/generated/Reinterop/Reinterop.RoslynSourceGenerator/ReinteropInitializer.cs:58147)
System.Threading._ThreadPoolWaitCallback:PerformWaitCallback ()
====second log============================================================

[2024-07-09 13:46:24.303] [warning] [ErrorList.h:91] Warning when loading file:///C:/Users/test/Downloads/combine_b3dm_no_optimize/BlockXYBXA/BlockXYBXA_L15_6.b3dm:

  • Attribute accessor.count doesn’t match with number of decoded Draco vertices.
  • Attribute accessor.count doesn’t match with number of decoded Draco vertices.
  • Attribute accessor.count doesn’t match with number of decoded Draco vertices.
  • Attribute accessor.count doesn’t match with number of decoded Draco vertices.
  • Attribute accessor.count doesn’t match with number of decoded Draco vertices.
  • Attribute accessor.count doesn’t match with number of decoded Draco vertices.

UnityEngine.Debug:Log (object)

Reinterop.ReinteropInitializer:UnityEngine_Debug_CallLog_FA05wu8x__otZNsgdHTnU9A (intptr) (at ./Library/PackageCache/com.cesium.unity@1.11.0/Runtime/generated/Reinterop/Reinterop.RoslynSourceGenerator/ReinteropInitializer.cs:61421)
Reinterop.ReinteropInitializer/ActionNativeFunction:Invoke () (at ./Library/PackageCache/com.cesium.unity@1.11.0/Runtime/generated/Reinterop/Reinterop.RoslynSourceGenerator/ReinteropInitializer.cs:58147)
System.Threading._ThreadPoolWaitCallback:PerformWaitCallback ()

do you have this experience?

and this is my cesium3dtileset optio value


.

When the files contain errors, then this may be a reason why they are not displayed.

If you attach the files that cause these errors here, I can have another look. But if they have errors and if this is the reason why they cannot be displayed, then there will basically be no way to fix them…

hello marco!

http://naver.me/xNLWDkWT

this link is applied combine command and update alignment command.

please check this

there are too many log and b3dm file log


This is because the contents of each file and log are slightly different, so it cannot be certain that the cause of a specific b3dm will be the same as another b3dm.

so i can’t send specific b3dm file.

I will email you a link to download the b3dm tileset file with the combine command and updatealignment applied.

If the cause of most b3dm not being output in unity is identified, I will forward this to DJI and discuss with DJI to resolve the issue.