Manipulating Cesium content in Viewport

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.

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?

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 )

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