Introducing vsgXchange::Tiles3D for loading 3DTiles 1.0 databases #1506
Replies: 3 comments 11 replies
-
I'm trying to load a 3D Tiles dataset using the
The only log message I see is:
I tested loading a single .b3dm file from the same dataset, and it works fine. |
Beta Was this translation helpful? Give feedback.
-
Thanks to @timoore spotting that RTC_CENTER wasn't being handled I have added the check for and then assigned to a vsg::MatrixTransform when an RTC_CENTER is assigned to a .b3dm. This fix is checked into vsgXchange master with commit vsg-dev/vsgXchange@806243c. This enables this dataset to get closer to working OK with this datasets: When you zoom out far enough you see the tall buildings in parent.b3dm pop in replacing the smaller ones completely. What should actually be happening is the smaller buildings should appear when closer adding to taller ones, rather than replacing. There is a field in 3D Tiles that specify the LOD behavior, either ADD or REPLACE when a LOD transition happens. The vsg::LOD/PagedLOD only has support for the REPLACE implementation so that's what I focused on up to now. The databases I had for testing against all used REPLACE so that was OK. This dataset uses ADD so requires me to implement a handling of this case. Added support for replace to LOD/PagedLOD would complicate the API and Implementation and the extra checks would slow traversal so not a natural fit for a high performance API - we don't want to slow things down for everyone just because some unusual models want to do something different. However, when I was implementing the parsing of the 3D Tiles 1.0 spec and wrote the code for parsing the ADD/REPLACE the issue about ADD is one I briefly brainstormed and came up with idea that if we add the low res child to the high res group then we can use LOD/PagedLOD keeping the extra complexity entirely on the scene graph building side and adding no CPU overhead to the rendering side. With knowledge that I could probably cobble a solution for ADD I just moved on to the other more pressing 3D Tiles work, knowing that one day I'd need to return to it... |
Beta Was this translation helpful? Give feedback.
-
I have added a warning to vsgXchange::Tiles3D to report when Tile::refine = ADD is set in a database but not yet supported yet, so you'll see: Warning: Tiles3D::SceneGraphBuilder::createTile(ref_ptr<N10vsgXchange7Tiles3D4TileE>(N10vsgXchange7Tiles3D4TileE 0x7bb601d5c1c8), 0) refine = ADD not yet implemented for LOD. It's end of day here so I'll have to tackle the implementation of ADD tomorrow. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The culmination of my last 2 months work was implementing native support for 3D Tiles 1.0, as 3D Tiles builds upon glTF, vsgXchange::Tiles3D buiilds upon vsgXchange::gltf and vsg::JSONParser. For now we have support for 3D Tiles 1.0, support for 1.1 will follow but don't yet development plans in place. The 3D Tiles 1.0 loader is provided by vsgXchange::Tiles3D, this class name isn't ideal but was work around C++ requirement that class names can't be with numbers. Tiles3D is checked into vsgExamples master and adds no external dependencies beyond VulkanSceneGraph's dependencies:
include/vsgXchange/3DTiles.h.
The client funding this work only has 1.0 databases at this point so it made sense to implement 1.0 first. 3D Tiles 1.0 is a clumsy collection of file formats - tileset.json at the root and reference other .json files and .i3dm, .b3dm, .cmpts and .pnts files. vsgXchange::Tiles3D implements the .json, .i3dm, .b3dm and .cmpts formats. As the client data doesn't include .pnts files I chose to concentrate on the formats being used.
3D Tiles 1.1 moves to use of glTF extensions rather than a collection of custom file formats, which should make it more straight forward and cleaner to support. I haven't yet looked at the specs in detail so am not at the point of being able to estimate how much further work is required for 1.1 support.
Beta Was this translation helpful? Give feedback.
All reactions