I designed a function to load vector tile services in Cesium Unreal, and I encountered some problems. I hope to get your help. I designed an architecture with CesiumWTMSVectorComponent, WTMSVectorOverlay and WTMSVectorProdiver as the core, referring to the Raster code. Currently, I can achieve the following functions: 1. Parse the content and tiles of the WTMS service. 2. Read the local coordinates in the .pbf file and convert them to Unreal coordinates. 3. Implement the triangulation and rendering of geometric data. There are two problems I encountered. 1. I cannot correctly control the tiles that need to be displayed in the current Level, 2. I don’t know how to implement vector to raster conversion and then decal on raster.
The problem of visibility is mainly that in the current level, such as the camera height of level 16, my vector tiles always have some redundancy and vacancy.
At level 16, tiles of level 1 and 2, 5, 6, 7, 8 or any other level may be in a visible state.
I currently have two schemes to control visibility, one is to control it in showTilesToRender() and hideTiles(),
and the other is to implement AttachVector and DettachVector in IPrepareRendererResources, both of which are incorrect, as shown in the figure.
The second problem is that, in designing and implementing terrain Surface Polygon, I currently think of converting each pbf/mvt to raster image and then using Decal material, but I don’t know what library to use, I only know agg, and I don’t know if it is a correct way to convert tiles individually every time, I hope you can give me some advice.
I read the CESIUM code on the tiles that need to be displayed and the tiles that need to be hidden in the cutting calculation, and I don’t understand the design ideas and principles, and I don’t know if the author can briefly talk about it
First, I’m excited to see people working on this! I don’t have a lot of answers for you, but I’m happy to see the experimentation nonetheless. There’s another user working on similar things in the context of Unity, so it’s probably worthwhile for the two of you to discuss your approaches and where you’re running into trouble:
I read the CESIUM code on the tiles that need to be displayed and the tiles that need to be hidden in the cutting calculation, and I don’t understand the design ideas and principles, and I don’t know if the author can briefly talk about it
I’m not quite sure what you’re asking for here. Can you elaborate?
The problem of visibility is mainly that in the current level, such as the camera height of level 16, my vector tiles always have some redundancy and vacancy.
At level 16, tiles of level 1 and 2, 5, 6, 7, 8 or any other level may be in a visible state.
I currently have two schemes to control visibility, one is to control it in showTilesToRender() and hideTiles(),
and the other is to implement AttachVector and DettachVector in IPrepareRendererResources, both of which are incorrect, as shown in the figure.
You just copied that from your original post, but I still don’t know how to help you with that.
This is definitely a tricky problem. There are probably no easy answers. But I think the general approach I would try is to follow the example of RasterOverlayTileProvider and its getTile method. For raster overlays, each geometry/terrain tile gets a single texture per raster overlay which is obtained via that getTile method. The targetScreenPixels parameter is what allows us to select an appropriate LOD for that texture.
So for vector data, you could do much the same. Use the targetScreenPixels to decide - per geometry tile - what LOD to request and render for the vector data. But of course instead of a single texture, you’ll need to provide additional geometry or a decal or whatever you’re using to render it.
Hello, excuse me!
1、I have a question in the process of using stencil shadow volume . I hope to get your help, when creating this depth map, should one be created for each vector tile, or one for each scene?
2、Do I need to change the original material used for raster data when drawing shadows and add some parameters about shadows?
@fonlylovey how you where able to overlay the map in yellow color , i used decal to get this , is there any other option.
also how can we load custom map data like and language