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

[CityTiler] Weird vertices #78

Closed
jailln opened this issue Mar 7, 2022 · 8 comments
Closed

[CityTiler] Weird vertices #78

jailln opened this issue Mar 7, 2022 · 8 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@jailln
Copy link
Contributor

jailln commented Mar 7, 2022

The 3D Tiles created with the CityTiler have weird vertices: it seems that all buildings are connected with a vertex, while they are not in the original CityGML:

lyon-1-wireframe

image

I reproduced it on different input CityGML and the visualisation is the same in iTowns and Cesium. It happens whether the transformation is ran with or without textures. I reproduce this issue before and and after #71 so it does not seem related to this PR and neither to issue #77. Note that it has no visual impact when not in wireframe mode.

@LorenzoMarnat LorenzoMarnat self-assigned this Mar 7, 2022
@LorenzoMarnat LorenzoMarnat added the bug Something isn't working label Mar 7, 2022
@LorenzoMarnat LorenzoMarnat added this to the M3 milestone Mar 7, 2022
@LorenzoMarnat
Copy link
Collaborator

If you export the tileset as OBJ during the creation (with --obj name.obj) and open this OBJ in a mesh viewer, do you see those weird vertices ?

@jailln
Copy link
Contributor Author

jailln commented Mar 7, 2022

No I don't. Do you think it comes from the gltf writer ?

@LorenzoMarnat
Copy link
Collaborator

Since it doesn't come from the CityGML file nor the triangles created from the CityGML, it may come from:

  • wrong batchIDs in the glTF
  • an error when writing the vertices as bytes
  • the viewer

@jailln
Copy link
Contributor Author

jailln commented Mar 7, 2022

I think we can cross the viewer since the visualisation is the same in iTowns and Cesium which don't have the same parser and since it only happens for tilesets created with py3dtilers from what I've tested.

@LorenzoMarnat
Copy link
Collaborator

I can see that those weird lines also appears in the Cesium 3D Tiles inspector example:

image

There is an issue open on Cesium Github about this.

@jailln
Copy link
Contributor Author

jailln commented Mar 8, 2022

Oh ok, well spoted! I will look into why it's the same in iTowns, but I guess we can close this issue for now then, especially since it has no visual impact on the geometry when it's not displayed in wireframe anyway.
Note that it is not always the case in Cesium, e.g. here for a dataset created with FME:
image

@jailln jailln closed this as completed Mar 8, 2022
@LorenzoMarnat
Copy link
Collaborator

Yes, I wonder if its linked to the batch. Since we create many batched features in a single glTF mesh, maybe the wireframe debug tool creates a thread between all the vertices of the mesh without using the batchIDs to seperate the features.

@jailln
Copy link
Contributor Author

jailln commented Mar 8, 2022

Yes that's a good lead. However, it's weird that it only does it on some tilesets. It may also be combined with the fact that when in wireframe mode it interprets the geometry buffer (representing batched geometries) directly as lines instead of triangles and since all geometries are batched, it draws a line between all points instead of creating triangles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants