# Manipulating Cesium content in Viewport

**URL:** <https://community.cesium.com/t/manipulating-cesium-content-in-viewport/19767>\
**Category:** Cesium for Unreal\
**Created:** [July 29, 2022, 4:04pm UTC](https://community.cesium.com/t/manipulating-cesium-content-in-viewport/19767 "2022-07-29T16:04:45Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abdul\_Jabbar](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/abdul_jabbar/32/3476_2.png) [@Abdul\_Jabbar](https://community.cesium.com/u/Abdul_Jabbar)\
**Post date:** [July 29, 2022, 4:04pm UTC](https://community.cesium.com/t/manipulating-cesium-content-in-viewport/19767/1 "2022-07-29T16:04:45Z")

</div>

Hello,

I would appreciate any useful tips or solutions to a problem as I’ve just started using Cesium.  
I am trying to add widgets on top of Cesium in the viewport. Due to requirements I would have to manipulate the terrain(or any imagery) to resize according to the widget so that the widget does hide any terrain/map behind it. For example in the screenshot I have a sample button overlayed on top of the map. Is there any way to resize the imagery ?

Any feedback would be highly appreciated. Thank you.

 ![image](https://global.discourse-cdn.com/cesium/original/2X/c/cbfb23d5c8c9e9963ab912ca2364cf3572e83eae.jpeg)

---

<div class="post-metadata">

**Author:** ![agallegos](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/agallegos/32/4464_2.png) [@agallegos](https://community.cesium.com/u/agallegos)\
**Post date:** [August 2, 2022, 6:40pm UTC](https://community.cesium.com/t/manipulating-cesium-content-in-viewport/19767/2 "2022-08-02T18:40:05Z")

</div>

Hi @Abdul_Jabbar, welcome to the forum!

When you say you need to resize the imagery, are you talking about preventing the tiles/areas behind the widget from loading at all?

---

<div class="post-metadata">

**Author:** ![Abdul\_Jabbar](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/abdul_jabbar/32/3476_2.png) [@Abdul\_Jabbar](https://community.cesium.com/u/Abdul_Jabbar)\
**Post date:** [August 2, 2022, 6:58pm UTC](https://community.cesium.com/t/manipulating-cesium-content-in-viewport/19767/3 "2022-08-02T18:58:47Z")

</div>

Hi @agallegos, thanks for getting back.  
I guess what I am trying to do is pretty much is how to render cesium world terrain and imagery into a widget blueprint so I can have it as a widget ( so that we could control its size on the viewport )

---

<div class="post-metadata">

**Author:** ![agallegos](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/agallegos/32/4464_2.png) [@agallegos](https://community.cesium.com/u/agallegos)\
**Post date:** [August 2, 2022, 9:17pm UTC](https://community.cesium.com/t/manipulating-cesium-content-in-viewport/19767/4 "2022-08-02T21:17:23Z")

</div>

Hi @Abdul_Jabbar,

Thanks for clarifying. In that case, you’ll probably want to use a Scene Capture 2D. I’m hoping to get around to making a tutorial on using these with Cesium sometime soon, but in the meantime:

1. Add a Scene Capture 2D actor to the scene. Position it where you want your camera (Or attach it to your pawn).
2. In the Content Browser, add a new Render Target asset to your project.
3. In the Scene Capture 2D’s Details panel, set the Texture Target parameter to your new render target.

Cesium for Unreal should automatically use that component to render tiles. You probably also want to enable the “Capture every frame” setting.  
To put it on the widget, you can use an Image widget component and choose the render target as the source of the image.

Let me know if you have any questions.  
-Alex

---

<div class="post-metadata">

**Author:** ![naren12](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/naren12/32/14000_2.png) [@naren12](https://community.cesium.com/u/naren12)\
**Post date:** [November 14, 2024, 11:05am UTC](https://community.cesium.com/t/manipulating-cesium-content-in-viewport/19767/5 "2024-11-14T11:05:41Z")

</div>

Hello @agallegos I tried your above solution, I am trying to do something similar, instead of a widget, I am applying the render target material in a plane attached to the pawn. My scene capture 2D actor is also attached to my pawn. But, the output from the scene capture seems empty (white). I tried the same setup in a different Level without any Cesium landscape, and it works as expected in Unreal default scene landscape. Any idea why I couldn’t get the cesium landscape in the scene capture? Any help would be appreciated. Thanks in advance.

---

<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:** [November 15, 2024, 10:42am UTC](https://community.cesium.com/t/manipulating-cesium-content-in-viewport/19767/6 "2024-11-15T10:42:14Z")

</div>

Hi @naren12, welcome to the community!  
An all-white scene sounds like a high dynamic range (HDR) problem. Cesium scenes are often lit by realistic sunlight, which is extremely bright compared to typical Unreal lighting. This thread may have some useful tips:

> [@Problem with emissive materials when using Cesium Sun&sky](https://community.cesium.com/t/problem-with-emissive-materials-when-using-cesium-sun-sky/16520):
>
> Hi, I’m facing problems when using emissive materials in cesium sun sky. When i use fx or emissive materials, its not visible and its transparent. Same issue occurs when using scene capture cube to render a panaroma view and its full white. Problems faced above works fine when i disable cesium sun and sky and create my own directional light. Problem is due to directional light intensity being at 110000 lux in cesium sun sky. How to fix this issue? Thanks in advance…

---

<div class="post-metadata">

**Author:** ![naren12](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/naren12/32/14000_2.png) [@naren12](https://community.cesium.com/u/naren12)\
**Post date:** [November 15, 2024, 2:37pm UTC](https://community.cesium.com/t/manipulating-cesium-content-in-viewport/19767/7 "2024-11-15T14:37:08Z")

</div>

@Kevin_Ring On spot. Thank you, that worked.
