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…

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.

It is not clear whether the B3DM files have been modified after they have been created by DJI.

The 3D Tiles validator reports invalid B3DM files, saying
Feature table must contain a BATCH_LENGTH property.
and then stops the validation for these files.

When extracting the GLB from the B3DM and passing it to the glTF-Validator, it reports several errors. Which of them are “critical” and preventing the rendering is hard to say.

The glTF-Validator also does not perform any validation of the Draco part. Unfortunately, there is zero infrastructure for Draco validation, except for “trying to load it, and see if it crashes”.

The files can be loaded and rendered with CesiumJS. I’ll send you an example internally that you may try out in Cesium For Unity.

The b3dm and glb files you provided worked.

this is glb


this is b3dm



but I cannot confirm the coordinate location of the b3dm file.

A warning message occurs in unity, but the b3dm and glb files are displayed in strange locations.
It seems that a number of b3dm files that were not visible before were output in strange locations.

It seems to be a part that needs to be modified in the dji terra program.

1.Is there a link to the standard system for reading cesium for unity’s b3dm file?
I would like to provide it to DJI and request that they modify the DJI Terra program.

  1. Is there a way to find the coordinates of the b3dm file in tileset.json or unity?

  2. Is there a way to modify the location value of the b3dm file?

The location of these files is arbitrary and does not matter. This was only intended for testing whether they can be loaded at all.

1.Is there a link to the standard system for reading cesium for unity’s b3dm file?

The code is at cesium-native/Cesium3DTilesContent/src/B3dmToGltfConverter.cpp at d6523beaf7f72c7957fb220592d208c5ef7e162d · CesiumGS/cesium-native · GitHub, but the main work happens when reading the GLB data that is contained in the B3DM

  1. Is there a way to find the coordinates of the b3dm file in tileset.json or unity?

The coordinates of these single files have been arbitrary and do not mattter.

  1. Is there a way to modify the location value of the b3dm file?

The location of these single files have been arbitrary and does not mattter.

Apparently, the main reason why some of the B3DMs are not displayed is not related to the Draco decoding warnings. The files are still invalid and should be fixed.

In order to analyze this further, we have to know which B3DM files are not displayed.

I found the cause.
This was caused by another team member reducing the number of photos that had to be used when creating a b3dm map with terra dji.

Originally, all photos should have been used, but the reason was that the team member in question did it arbitrarily.

The b3dm fileset.json file i created after putting all the pictures in works fine.

Thank you for your sincere help so far.

image

Out of 44,902 b3dm files, only 1604 files appear in Unity.

I confirmed that these 1604 b3dm files are visible in Unity.

image

but this is warning log txt file(include 1604 b3dm log)
warning log.zip (12.7 KB)

I was able to check the b3dm output through 1604 warning logs.

I found this two b3dm files that doesn’t appear in unity at all.
BlockAXBYA_L22_66.zip (96.7 KB)
BlockXYYAY_L19_148.zip (161.5 KB)

can you check this b3dm files?

now i’m now contacting dji’s request

Validating the B3DM file causes an error, but I think that this should not cause it to not be rendered.

Validating the GLB data from that B3DM file causes several errors. None of them should prevent the rendering, but they should still be fixed.

I have not yet figured out the reason for the log messages. When loading the GLB file with cesium-native (which is used under the hood in Cesium For Unity), then it also generates these messages:

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

But the model can still be loaded.


An aside: Adding debug output to print the actual values:

count 6689
numPoints 6755
count 6689
numPoints 6755
count 1730
numPoints 1734
count 1730
numPoints 1734
count 1613
numPoints 1615
count 1613
numPoints 1615

It might still be that these inconsistencies prevent the rendering, but that’s just a wild guess until now. You may try loading the following tileset in Cesium For Unity:

Cesium Forum 33647 single 2.zip (161.6 KB)

It contains one of the files of which you said that they are not displayed. If it is displayed in the context of this single, simple test, then the problem is not the content file itself, but maybe some aspect of the tileset JSON.

I think you’re working in Korea, how did you solve it?
There’s exactly the same problem.
Is it the Terra problem?
What you’ve worked on in other programs looks normal.
혹시 가능하면 톡이나 메일 가능할까요?
kim1141@네이버