-
Notifications
You must be signed in to change notification settings - Fork 11
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
3D tileset in Cesium #74
Comments
Hi, If you want to get this working now you can modify the tileset.json yourself (make a flat hierarchy of the child nodes and play with the geometric error). In any case please copy the b3dm files to your own server. In the future we may be able to make this easier to do. |
The problem is that Cesium uses WGS84 horizontal coordinates, while we use EPSG 28992. You'll have to convert the coordinates of the batched files to make them work with Cesium, as far as I am concerned. You could try to create your own tileset using pg2b3dm after you load the 3D BAG database in PostGIS and transform it. |
Thank you guys for the answers. I've downloaded all b3dm files and will try somehow to change the projection to fits the Cesium requirements (Plan B). I've followed the getting started guide and this is what I did since now:
If I don't need some of the steps above please let me know; Any suggestion or help is much appreciated. |
I have the same problem. I want to create my own tiles using tool "pg2b3dm" from postgis dump and table "bag3d.lod22_3d" and column "geometrie", where the pure 3d model of the buildings are located in MultiPolygonZ type. But there is like a dead end. When I`m starting with prepartions. My flow:
But every doc that Im reading on http://3dbag.bk.tudelft.nl tells me that for creation of b3dm models pg2b3dm tool was used from the postgis dum. But when you start to follow what is required for pg2b3dm, you are stuck. You can`t use bertt/tesselate_building, because it requires hight and you cant get height from lod22_3d.geometrie, because it is alredy a building 3d model. And if you generate buildings from bag3d.lod22_2d variant, then you wont get slanted roofs like we see on 3dbag viewer. @Ylannl Please help us. I think @lanminik is stuck on same thing. @liberostelios commented, that "You could try to create your own tileset using pg2b3dm after you load the 3D BAG database in PostGIS and transform it." The tricky totally undocumented part is "...and transform it.", since we cant use lod22_3d.geometrie type directly with pg2b3dm to create tiles used in http://3dbag.bk.tudelft.nl. Can you please give some hints how todo that? |
You shouldn't need to triangulate/tesselate the geometries since they are already triangulated in the DB dump. Also if you want building footprints with height you can find this in the 2d layers, however that won't give you LoD 2 roofs. |
@Ylannl thanks for clarification! But still there is one piece in puzzle is missing. How we can produce tiles used in http://3dbag.bk.tudelft.nl by using pg2b3dm tool? Maybe you can give a hint or share a tools/code you have used to produce your tiles. I suppose you used directly LOD22 models from PostGis database dump (which is available here https://3dbag.nl/en/download) to produce your tilesets. But I dont find anywhere this information. P.S I suppose you have used pg2b3dm code with modificaitons. Otherwise it is not possible, because in pg2b3dm code heavily relies on But LOD22 models (in column geometrie and table bag3d.lod22_3d) are not "ST_PolyhedralSurface", BUT "ST_MultiPolygon", meaning out of the box this wont work with 3dbag postgis dump |
We use a modified version of pg2b3dm which has some hacks specific to our viewer that won't work with Cesium. However, the regular pg2b3dm should also work. Just pass it the db parameters. |
@Ylannl so my assumption was correct about pg2b3dm. I need it to be used with mapbox. And as I have described above, out of the box using pg2b3dm is not possible :) P.S And before coming here and asking for help, I sure was trying all the variants with out of the box code from pg2b3dm, but failed. I even can display your tilesets with mapbox, but i want to produce my own with coordinate system suited directly for mapbox out of PostGis dump (i have St_Translated lod22 models to 3857 srid, but stuck on generating tilesets) |
You are right we changed it to work with MultiPolygons, see 3DBAG/pg2b3dm@96489b6. |
@Ylannl thanks for your help! That seems is the piece of the puzzle I was looking for! Have not spotted that you have forked this repo. Will try to do the same |
@Ylannl does it really take several weeks to produce 3d tiles for whole netherlands with pg2b3dm? :) I see you use some sort of precalculated tables tiles.xyz_tiles and tiles.bag_tiles_3k in time consuming sections. Can you please help, how and what you precompute, cause from source code it is not clear. |
I think you need to create a spatial index in the database on the geometry column. Also we use multithreading in our modified pg2b3dm. |
@Ylannl yes, thats already creaeted. And you use multithreading only when you output the tiles that can be multithreaded. But not when you do are creating quadtree, since there is recursion. |
Yes @DmitriLapushkin we have the same issue with generating the tileset :) Maybe you explained it better. Did you manage it to work? I didn't, so if you are then please give me some steps and hints on how did you achieve it? And did you use the forked pg2b3dm or the original one? Thanks in advance! |
@lanminik I have archived it but, only they appear in Gulf of Gunea :) And i dont know how to move them to Netherlands, there is some puzzled math involved. One way is to generate them with right SRID for mapbox, which should avoid complex math. But that just takes ages to complete |
@DmitriLapushkin I am still struggling with this as well. Had the same issue with the positioning in the Gulf of Gunea, and have managed the transformation with query directly in the Postgres DB. Will drop it here when I find it. Did you manage to generate the geojson data in LOD2.2? (I cannot see from the screenshot); If yes, can you describe the steps that you went through, please? |
Any news on support for Cesium or Mapbox/Deck tile formats? |
So BAG and Cesium and Unreal can work together? |
Hello there,
I am trying to use a 3d tileset (https://3dbag.nl/download/3dtiles/v21031_7425c21b/lod22/tileset.json) and have an issue showing it in Cesium.js. Cesium doesn't report any warning, error, or information and everything seems like it should work but the tiles are not showing at all ( there are no requests for tiles when I am moving around). I tried with another resources that I've found on the internet and tileset.json looks pretty the same as yours, but those worked.
If this requires exporting of your PostgreSQL db in another way to support Cesium, please help (guide) me on how to do that.
BTW, great job!
The text was updated successfully, but these errors were encountered: