CesiumGS / cesium-unity

Bringing the 3D geospatial ecosystem to Unity
https://cesium.com/platform/cesium-for-unity/
Apache License 2.0
319 stars 75 forks source link

BINARY_INVALID_ALIGNMENT works in CesiumJS but not in Cesium-Unity #451

Open M0rph3v5 opened 2 months ago

M0rph3v5 commented 2 months ago

I have a project from a client who use Bentley Contextcapture to export their cesium's, when they upload it to ion it loads perfectly in the 3d viewer there without any issues however the unity plugin gives the following errors for a lot of tiles. This is one of the errors (but they are all very similar but different tiles):

[2024-04-09 16:25:25.990] [warning] [ErrorList.h:91] Warning when loading https://assets.ion.cesium.com/us-east-1/2531430/Data/Tile_27/Tile_27_L21_00.b3dm?v=1:
- Image bufferView's byte offset is 113212 and the byteLength is 16856, the result is 130068, which is more than the available 0 bytes.

When I use the 3d-tiles-validator it will also label that tile as:


{
          "type": "CONTENT_VALIDATION_ERROR",
          "path": "Tile_27_L21_00.b3dm",
          "message": "Tile_27_L21_00.b3dm caused validation errors",
          "severity": "ERROR",
          "causes": [
            {
              "type": "BINARY_INVALID_ALIGNMENT",
              "path": "Tile_27_L21_00.b3dm",
              "message": "The byte length must be aligned to 8 bytes",
              "severity": "ERROR"
            }
          ]

        },```

Any idea how to bypass this error or is Bentley's new version of contextcapture just really churning out wrong cesiums?

And why do they work fine in JS? 
j9liu commented 2 months ago

Hi @M0rph3v5,

I'm not familiar with Bentley's new version of Contextcapture. You may want to reach out to them about the error, in case it's something on their end that they can fix.

I'm also not sure why it's working fine in JS 😅 But, it's worth looking into the difference, just to be safe. Are you able to share any of the b3dms that result in this error, for testing purposes?

M0rph3v5 commented 2 months ago

Hi @j9liu,

Thanks for the response, I'll ask if we can get a simple model exported this way since I think I cannot just share these current tiles. They are meanwhile asking Bentley's support as well.

I'll get back to you asap.