# Multiple TMS layers distortion

**URL:** <https://community.cesium.com/t/multiple-tms-layers-distortion/32236>\
**Category:** Cesium for Unreal\
**Created:** [May 17, 2024, 11:15am UTC](https://community.cesium.com/t/multiple-tms-layers-distortion/32236 "2024-05-17T11:15:56Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Maria\_Saeed](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/maria_saeed/32/13100_2.png) [@Maria\_Saeed](https://community.cesium.com/u/Maria_Saeed)\
**Post date:** [May 17, 2024, 11:15am UTC](https://community.cesium.com/t/multiple-tms-layers-distortion/32236/1 "2024-05-17T11:15:56Z")

</div>

Hello ,  
We have multiple imagery datasets (TMS) of varying resolutions eg low res imagery (4km) covering earth and high resolution (5- to 10m approx.) of some cities. On displaying data in unreal tiles distortions is observed on boundaries of highres and lowres .Data is in one Cesium 3D tileset actor. Picture is attached for reference.

Regards  
Maria

 ![Capture](https://global.discourse-cdn.com/cesium/original/3X/5/d/5db86ea87bc7ff4061af6fbed7208fc9ae53a16a.jpeg)

---

<div class="post-metadata">

**Author:** ![janine](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/janine/32/5135_2.png) [@janine](https://community.cesium.com/u/janine)\
**Post date:** [May 21, 2024, 2:11pm UTC](https://community.cesium.com/t/multiple-tms-layers-distortion/32236/2 "2024-05-21T14:11:08Z")

</div>

Hi @Maria_Saeed, welcome back!

I’m not sure what could be going on there. I see that you have two TMS overlays on the same tileset, and it looks like you have the **Material Layer Key** set to `Overlay0` on this second raster overlay. Can you ensure that you’re using different keys for each overlay? For example, one should be `Overlay0`, and the other should be `Overlay1`.

Let me know if that makes a difference!

---

<div class="post-metadata">

**Author:** ![Maria\_Saeed](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/maria_saeed/32/13100_2.png) [@Maria\_Saeed](https://community.cesium.com/u/Maria_Saeed)\
**Post date:** [May 22, 2024, 6:25am UTC](https://community.cesium.com/t/multiple-tms-layers-distortion/32236/3 "2024-05-22T06:25:39Z")

</div>

Hello, we are using different overlays for the material layer key. It does not make difference in image rendering. Our one dataset is of 30m resolution has tiling from 0 to 10 TMS level while other data sets of has 5m tile range of 0-16 zoom level. Also some white blank images are rendered around the overlay dataset.

 ![white_space](https://global.discourse-cdn.com/cesium/original/3X/d/6/d608dcf1b09cdc7a387e928f592ac781a665a75f.jpeg)

---

<div class="post-metadata">

**Author:** ![Kevin\_Ring](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/kevin_ring/32/2003_2.png) [@Kevin\_Ring](https://community.cesium.com/u/Kevin_Ring)\
**Post date:** [May 30, 2024, 6:54am UTC](https://community.cesium.com/t/multiple-tms-layers-distortion/32236/6 "2024-05-30T06:54:31Z")

</div>

Hi @Maria_Saeed,  
Can you help us to reproduce this problem ourselves? Perhaps by sharing a small example TMS tileset that exhibits the problem?

I think what you’re seeing is caused by the inset raster overlay covering a much smaller area than the terrain/geometry tileset. When an overlay partially overlaps a terrain tile, the translation/scale used to render the overlay causes some vertices to have texture coordinates that are outside the [0,1] range. This causes the pixels on the edge of the overlay to be stretched out to the edge of the terrain tile.

A possible solution is to make sure we have a transparent border around the raster overlay bounds in this scenario. But it would be much easier to confirm this is the problem and develop a fix if we can reproduce your problem exactly.

---

<div class="post-metadata">

**Author:** ![Maria\_Saeed](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/maria_saeed/32/13100_2.png) [@Maria\_Saeed](https://community.cesium.com/u/Maria_Saeed)\
**Post date:** [June 27, 2024, 11:29am UTC](https://community.cesium.com/t/multiple-tms-layers-distortion/32236/7 "2024-06-27T11:29:15Z")

</div>

Hi,  
Hope you are doing good. Sorry for late reply. Here is the link of small dataset which I am trying to load in cesium ion.

[https://www.dropbox.com/scl/fi/4tdnd6dcasrquw428c8lm/test\_data.rar?rlkey=qxj2n4q5qri72az66y3m9rb4a&st=d2qo9n9y&dl=0](https://www.dropbox.com/scl/fi/4tdnd6dcasrquw428c8lm/test_data.rar?rlkey=qxj2n4q5qri72az66y3m9rb4a&st=d2qo9n9y&dl=0)

If you can look into this data and can tell us the solution.

Regards  
Maria Saeed

---

<div class="post-metadata">

**Author:** ![Kevin\_Ring](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/kevin_ring/32/2003_2.png) [@Kevin\_Ring](https://community.cesium.com/u/Kevin_Ring)\
**Post date:** [June 30, 2024, 1:18am UTC](https://community.cesium.com/t/multiple-tms-layers-distortion/32236/8 "2024-06-30T01:18:01Z")

</div>

Thanks @Maria_Saeed. I’ve added this to our queue of issues to investigate more deeply. In the meantime, if it’s easy for you to try that transparent border idea I mentioned previously, there’s a reasonable chance that will solve the problem for you.

---

<div class="post-metadata">

**Author:** ![Kevin\_Ring](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/kevin_ring/32/2003_2.png) [@Kevin\_Ring](https://community.cesium.com/u/Kevin_Ring)\
**Post date:** [June 30, 2024, 1:20am UTC](https://community.cesium.com/t/multiple-tms-layers-distortion/32236/9 "2024-06-30T01:20:19Z")

</div>

I just looked at the data you shared, and it looks like some raw TIFs and DT1 files. So presumably you’re processing it somehow to turn it into a TMS? If you’re using Cesium ion to do that, please share the asset ID and a token we can use to access it for testing purposes (you can send me a private message). If you’re using some other tool, please share the TMS output rather than the input data.

---

<div class="post-metadata">

**Author:** ![Maria\_Saeed](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/maria_saeed/32/13100_2.png) [@Maria\_Saeed](https://community.cesium.com/u/Maria_Saeed)\
**Post date:** [July 1, 2024, 8:31am UTC](https://community.cesium.com/t/multiple-tms-layers-distortion/32236/10 "2024-07-01T08:31:35Z")

</div>

Hi,

I have shared all the details in private message.

Regards  
Maria
