# Message adressed to Kevin\_Ring / Issue with Cartographic Polygon

**URL:** <https://community.cesium.com/t/message-adressed-to-kevin-ring-issue-with-cartographic-polygon/33200>\
**Category:** Cesium for Unreal\
**Created:** [June 20, 2024, 11:26am UTC](https://community.cesium.com/t/message-adressed-to-kevin-ring-issue-with-cartographic-polygon/33200 "2024-06-20T11:26:25Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mathieuvannereux](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/mathieuvannereux/32/14000_2.png) [@Mathieuvannereux](https://community.cesium.com/u/Mathieuvannereux)\
**Post date:** [June 20, 2024, 11:26am UTC](https://community.cesium.com/t/message-adressed-to-kevin-ring-issue-with-cartographic-polygon/33200/1 "2024-06-20T11:26:25Z")

</div>

Hi, this message is adressed to Kevin\_Ring, who has answered to me on the Cartographic Polygon topic, but as a new user, I can’t reply to you on this topic so I create this new topic, sorry but I need answer …

Finally found the Cesium for Unreal Content folder. I duplicated the MI\_CesiumThreeOverlaysAndClipping, opened it but I don’t find my second CesiumPolygonRasterOverlay in the duplicated clipping layer in the Layer Asset menu, how do you do that please ?

Sorry but it’s absolutely not handy at all to configure it for a newbie …

 ![Capture d’écran 2024-06-20 115008](https://global.discourse-cdn.com/cesium/original/3X/c/0/c024aee4203e047680445f763a73e1acac5f0bc6.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:** [June 21, 2024, 12:42am UTC](https://community.cesium.com/t/message-adressed-to-kevin-ring-issue-with-cartographic-polygon/33200/2 "2024-06-21T00:42:27Z")

</div>

Right, there’s no second clipping layer yet. You need to add it manually. It may help to read a bit about Material Layers first:  
[https://dev.epicgames.com/documentation/en-us/unreal-engine/using-material-layers-in-unreal-engine](https://dev.epicgames.com/documentation/en-us/unreal-engine/using-material-layers-in-unreal-engine)

It looks like you’ve already created a new layer in the material, named `Layer 6`. So rename that to `Clipping2`. Then select the same Layer Asset and Blend Asset that is used in the `Clipping` layer below it.

That’s it on the material side. Back in your Cesium3DTileset, add two CesiumPolygonRasterOverlay components, and select your two different polygons. In the first, the outer polygon that removes pixels, the `Material Layer Key` should be `Clipping`. In the second, the inner polygon that includes previously-excluded pixels, it should be `Clipping2`.

I think this won’t _quite_ do the trick. The problem is that `Clipping2` can’t up “bringing back” pixels that were previously excluded by the previous clipping. To fix that, you’ll need a new Material Layer Blend. Copy `MLB_CesiumClipping`, and select the new in the Clipping2 layer in your custom material.

Now edit your copy of MLB\_CesiumClipping. You can think of this as “applying” the inner polygon clipping to a pixel that has already had the outer polygon clipping applied. The result so far comes from the “Bottom Layer”, and the new, inner polygon clipping mask comes from the Top Layer pixels (specifically the Red channel). Currently the two masks are multiplied together. Change that multiply instead to a `Max` function, and I think you’ll be in business.

I haven’t tested this, but I think it should work. Let me know how you go.

---

<div class="post-metadata">

**Author:** ![Mathieuvannereux](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/mathieuvannereux/32/14000_2.png) [@Mathieuvannereux](https://community.cesium.com/u/Mathieuvannereux)\
**Post date:** [June 24, 2024, 9:18am UTC](https://community.cesium.com/t/message-adressed-to-kevin-ring-issue-with-cartographic-polygon/33200/3 "2024-06-24T09:18:06Z")

</div>

Hi Kevin, I’m very sorry but I still does not manage to do this …

As you can see on my picture attached, I have my both Material Layers named Clipping and Clipping2, the ML\_CesiumRasterOverlay in both Layer Asset, MLB\_CesiumCLipping in first Blend Asset (Clipping material) and duplicated MLB\_CesiumCLipping1 in second Blend Asset (Clipping2 material).

My 2 polygons are in place with both CesiumPolygonRasterOverlay 1 and 2 in my Google Photorealistic 3D Tiles.

In the first CesiumCartographicPolygon\_0 is selected with “Clipping” as Material Layer Key, in the second CesiumCartographicPolygon\_1 with “Clipping2” as Material Layer Key.

Now I’m trying to edit my copy of MLB\_CesiumClipping by replacing the multiply to a Max function, but it stills not working … could you send me a picture of the BP you have ?

 ![Capture d’écran 2024-06-24 104030](https://global.discourse-cdn.com/cesium/original/3X/7/a/7a830eea8bcb46d143f60b28f279adc948307500.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:** [June 24, 2024, 10:31pm UTC](https://community.cesium.com/t/message-adressed-to-kevin-ring-issue-with-cartographic-polygon/33200/4 "2024-06-24T22:31:45Z")

</div>

I don’t have a BP, because I’ve never tried this myself. Please share your Blueprint, and tell us what you mean by “but it stills not working”, and maybe we can find a solution.

---

<div class="post-metadata">

**Author:** ![Mathieuvannereux](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/mathieuvannereux/32/14000_2.png) [@Mathieuvannereux](https://community.cesium.com/u/Mathieuvannereux)\
**Post date:** [June 25, 2024, 11:37am UTC](https://community.cesium.com/t/message-adressed-to-kevin-ring-issue-with-cartographic-polygon/33200/5 "2024-06-25T11:37:28Z")

</div>

I don’t underdtand … in your previous reply you talked about to edit the copy of the MLB\_CesiumClipping by replacing the Multiply function by a Max function ? That means in a Blueprint, right?

Please see attached my BP of my copy of MLB\_CesiumClipping  
 ![Capture d’écran 2024-06-25 101553](https://global.discourse-cdn.com/cesium/original/3X/6/c/6cc894cc14e9dde9a79615281c21f5e0391efb32.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:** [June 29, 2024, 11:11am UTC](https://community.cesium.com/t/message-adressed-to-kevin-ring-issue-with-cartographic-polygon/33200/6 "2024-06-29T11:11:06Z")

</div>

You need to put the Max exactly where the Multiply was before. You’ve instead bypassed both the BreakOutFloat3Components and `1-x` nodes.

Hopefully that will work, but as I mentioned before, I’ve never actually tried this! I’m just guiding you in something I think might work. If it still doesn’t work after making that change, please share what it _is_ doing - screenshots, videos, etc. - and hopefully we’ll be able to figure out what to try next.

---

<div class="post-metadata">

**Author:** ![Mathieuvannereux](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/mathieuvannereux/32/14000_2.png) [@Mathieuvannereux](https://community.cesium.com/u/Mathieuvannereux)\
**Post date:** [July 2, 2024, 4:15pm UTC](https://community.cesium.com/t/message-adressed-to-kevin-ring-issue-with-cartographic-polygon/33200/7 "2024-07-02T16:15:30Z")

</div>

It does not work yet … I corrected my Blueprit as you can see attached.

The result is the cancellation of every effect of the Raster overlays, no tileset excluded ☹

I give up for now, I will follow the threads in the future to see if improvement comes soon

Thank you by the way for your following !

 ![Capture d’écran 2024-07-02 165953](https://global.discourse-cdn.com/cesium/original/3X/5/6/5620348ebf8ff4d20f3e7a9facb202dd7605c3ea.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:** [July 3, 2024, 9:27pm UTC](https://community.cesium.com/t/message-adressed-to-kevin-ring-issue-with-cartographic-polygon/33200/8 "2024-07-03T21:27:04Z")

</div>

Your Blueprint looks good. The next thing to check is that you’re using the blend correctly.

You have two clipping material layers in your material, right? The first one (closer to the bottom!) shouldn’t use this material blend - it should use the original MLB\_CesiumClipping. Then the one above it should use this MLB\_CesiumClipping1. Is that what you have?

And you need to make sure they have different names. Call the bottom one `Clipping0` and the top one `Clipping1`.

Then your outer polygon should have its MaterialLayerKey set to `Clipping0` so it gets applied first. And the inner polygon should have its MaterialLayerKey set to `Clipping1` so it is applied second.

Hopefully if it’s set up exactly like that, it will work. If it’s still not working, please share screenshots of your setup.
