Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid position buffers #42

Open
jpvanmuijen opened this issue Jul 24, 2023 · 10 comments
Open

Invalid position buffers #42

jpvanmuijen opened this issue Jul 24, 2023 · 10 comments

Comments

@jpvanmuijen
Copy link

jpvanmuijen commented Jul 24, 2023

I am trying to use the Tyler generated tilesets in Cesium for Unity/Unreal/JS. The tiles are loading correctly (i.e. shown in the hierarchy), but no geometry is shown. Unreal returns the following error; LogCesium: Warning: [..]/tiles/1/1/1.glb mesh 0 primitive 0: Invalid position buffer. I've tried both implicit and explicit tiling, but to no avail.
When loading the tilesets in our own Unity Kadaster viewer, all is working well.

TylerUnity
@balazsdukai
Copy link
Contributor

balazsdukai commented Jul 24, 2023

@jpvanmuijen so if I understand well, then the problems is only with Cesium for Unreal?

Cesium for Unity does work. Correct?

What about CesiumJS?

@jpvanmuijen
Copy link
Author

jpvanmuijen commented Jul 24, 2023

No, sorry. None of those three seem to work. Unity just doesn't throw any errors. JS returns An error occurred while rendering. Rendering has stopped. TypeError: Cannot read properties of undefined (reading 'featuresLength')
I've also tried to test the 3d.test.kadaster tilesets (which you are probably familiar with), which return the same Invalid position buffer errors in Unreal (and thus also don't work in Unity & JS).

@balazsdukai
Copy link
Contributor

balazsdukai commented Jul 24, 2023

Could you try to load https://data.3dgi.xyz/3dtiles-test-data/tilesets/buildings/tileset.json into Unreal?

And what is the software from the screenshot above?

@jpvanmuijen
Copy link
Author

jpvanmuijen commented Jul 24, 2023

That URL also returns the Invalid position buffer error. The screenshot above is the Unity viewer (and parser) created by 3D Amsterdam.
Just to be thorough, I also tried loading the above tileset in Cesium for Unity (second screenshot below). This also does load the tileset, but no geometry. Annoyingly though, no errors.

Screenshot 2023-07-24 170710 Screenshot 2023-07-24 171513

@balazsdukai
Copy link
Contributor

balazsdukai commented Jul 24, 2023

Thanks for checking.
You can view the tileset that I linked here: https://dev.3dgi.xyz/test-cesium-3dtiles , and the code for the viewer is here: https://github.com/3DGI/test-cesium-3dtiles/blob/main/src/index.js
This viewer uses CesiumJS v1.104.0

I'm not familiar with the Cesium integrations for Unity or Unreal, so I cannot say what goes wrong. But I can think of two things:

  • too old Cesium version
  • the required glTF extensions are not supported in these integrations for some reason. In the readme we list 4 glTF extensions, all of them needs to be supported by the viewer (see "Details of the 3D Tiles output" in the intro)

Could this be the problem?

@jpvanmuijen
Copy link
Author

jpvanmuijen commented Jul 24, 2023

Thanks! My JS setup was very quick & dirty, but good to know that this does seem to work. That might actually solve the business issue for me. I will go ahead and setup a proper JS application.

As for Unreal; this page refers to the two metadata extensions, where it states that they currently support feature_metadata but are planning to move to mesh_features. Which implies that they don't support the latter yet, so that might be the main issue?

The Unity documentation doesn't even mention these extensions, so that might be a long(er) shot.

Edit: so even in the most basic setup, your tileset does indeed seem to work, but mine still doesn't. Could you maybe have a look at my attached tileset, to see what might be wrong with it?
These tiles are located in the Rotterdam Erasmusbrug area, around 51.90944081036277, 4.485912853416279

230721.zip

@jpvanmuijen
Copy link
Author

jpvanmuijen commented Jul 24, 2023

When I set up a barebone CesiumJS viewer and try to load the previously attached 230721 tileset, I still get the Error: Cannot read properties of undefined (reading 'featuresLength')
I have another tileset which I've created with explicit tiling, which does seem to load ok. Still an error, but only once, and the geometry is shown.
However, I noticed in your sample you are also using implicit tilesets which seem to load perfectly fine. So I guess something is wrong with my implicit tileset.

Anyway, the original issue for Unreal and Unity still stands, but if you prefer, we can close this issue for now.

Screenshot 2023-07-24 200820 Screenshot 2023-07-24 200835 Screenshot 2023-07-24 201347

@balazsdukai
Copy link
Contributor

balazsdukai commented Jul 24, 2023

It would be good to get to the bottom of this.

Could you tell me these please?

  • the tyler command
  • tyler version (tyler --version)
  • your OS
  • which exe are you using (docker, win exe, self complied)
  • sample of the input data

@jpvanmuijen
Copy link
Author

Ok, great! Thanks for the effort.

the tyler command

docker run -it -e RUST_LOG=debug -e PROJ_DATA=/usr/local/share/proj -v %cd%:/data --rm tylerdocker tyler ^
--metadata /data/metadata.city.json ^
--features /data/Noordereiland ^
--output /data/output ^
[..]

(I'm using a .bat file on Windows)
tyler version (tyler --version)
0.3.5 (2023-06-28)
your OS
Win11
which exe are you using (docker, win exe, self complied)
Docker
sample of the input data
Noordereiland.zip
metadata.city.txt (renamed to .txt for the upload)

@jpvanmuijen
Copy link
Author

Hi, any updates on this @balazsdukai ?
I tried things the other way round, but it seems like the explicit tileset isn't loading properly in our own parser. That's probably something going wrong on our end, but I would very much like to focus on implicit tiling and getting that to work on CesiumJS anyway.
So any pointers as to what might be wrong with my 230721 tileset would be very much appreciated. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants