Google Photorealistic 3D Tiles Polygon Classification

Hello,

We are currently developing a boundary system for our iTwin Viewer, which involves rendering a polygon that outlines the boundary of a tileset, as illustrated below:

However, we ran into an issue when enabling Google Photorealistic 3D Tiles. As shown in the following example, the Google tiles overlay and obscure the boundary polygon:

While setting the polygon’s ClassificationType to BOTH or 3D_TILE allows it to appear on top of the Google tiles—similar to the behavior demonstrated in this Sandcastle example—this approach causes the polygon to classify all 3D tiles, not just the Google Photorealistic 3D Tiles, which is not what we want. Is there anyway for us to render the polygon on top of Google Photorealistic 3D Tiles while not affecting the other 3d tilesets?

Sandcastle

Hey @AnDuong, thanks for the question.

Unfortunately I don’t think the exact thing you want is currently possible. When Polygons or other entities are drawn onto 3D Tiles using classification they will display on all “layers” vertically with no way to specify specific assets.

One alternative I might suggest is switching to only outlining the polygon instead of filling it in completely. Maybe not exactly the desired effect but I suspect there’s a much lower chance of the boundary polyline actually intersecting with the target tileset so the issue may not often show up. I made an example of that in this sandcastle

Alternatively if you’re able to pre-process the data and generate a polygon with holes you could “cut out” the area of the buildings so they’re not even considered in the polygon to start with. @Marco13 Created an example of that in this sandcastle. If you wanna dig into this approach you may want to follow this issue

There is also a way to invert classification regions. I didn’t dig into this approach too much but might be worth trying it out. There’s an example of that in the Classification sandcastle

Hopefully that helps even if it’s not exactly the answer you were after