Per-polygon texture direction in cesium polygon raster overlays

Hi everyone,

I’m working with Cesium for Unreal (v2.21) in Unreal Engine 5.4+ and facing a texture orientation issue with polygon raster overlays.

I have added multiple polygon raster overlays, where each overlay contains a different number of cartographic polygons. As expected, a single Material Layer Blend asset is applied to all polygons within a raster overlay.

The problem is with texture direction/tiling. I want to apply the same texture to polygons of different shapes but oriented in different directions. For example, consider two perpendicular roads represented as polygons. I have a road texture that should align with the direction of each road. However, since the material is shared, both roads receive the texture in the same direction, causing one of them to look incorrect.

Is there a way in Unreal + Cesium to Control or override texture orientation per polygon within a raster overlay or Dynamically rotate/align texture coordinates based on polygon direction?

Any guidance, recommended approach, or known limitation/workaround would be greatly appreciated.

Thanks in advance.

Hi, @Unreal_dev

I would suggest combine Runtime Virtual Texturing with Cesium for Unreal.

Here is a screen shot for what RVT with Cesium for Unreal can do.

1. Tint of 3D Tiles is easy, and tint colors can be easily overlapped by setting “Translucency Sort Priority”, including textured tint.

2. The amount of tint color is not limited, nor is the shape. And the shape can be any, such as polygons, circles, shapes with any hole in the middle, and so on. Each shape is independent and adjustable individually. Compared to the method of CesiumPolygonRasterOverlay , this is a significant advantage.

3. On this basis, further extensions can be made to achieve a rendered “hole” effect.

Here is the workflow.

1. Project Setup

Make sure “Enable virtual texture support” checked, in Edit/Project Settings/Rendering/Virtual Textures.

2. Creating a Runtime Virtual Texture Asset (RVT_Color)

3. Writing to the RVT (Mat_ColorRVT, or Mat_ColorRVTTexture)

4.Runtime Virtual Texture Volume

5.Sampling from the RVT (M_CesiumBase MaterialRVT)

1 Like

My setup is slightly different from a simple color tint. I have multiple polygons within a raster overlay, and a single material layer blend is applied to all of them.Additionally, if a polygon bends at a 90-degree angle (forming an L-shape), how can the road texture be applied smoothly along the turn without visible stretching or distortion?
I’m not sure whether it’s possible to apply a different texture rotation to each individual polygon. If you know of any way to achieve this, please let me know.

@Kevin_Ring @janine Do you guys know how to cater this?

Hi @dis_afise, I can’t think of a way to do this with a polygon raster overlay. I wonder if you might have more luck with either RVT (as @pjiang9 suggested) or with decals. I don’t have a lot of experience with either of these, though, so I can’t give you specific instructions. It might be worth asking on a more general Unreal forum, because I don’t think it will be very Cesium-specific.

If that doesn’t work, a very brute force approach is to use a full raster overlay for the area. For example, if you could create a large GeoTIFF with all the road detail for the areas. Then, upload that to Cesium ion as Imagery, and add the resulting asset as a CesiumIonRasterOverlay.