# Render to only part of viewport

**URL:** <https://forums.unrealengine.com/t/render-to-only-part-of-viewport/325427>\
**Category:** Rendering\
**Tags:** unreal-engine, Rendering, UE4, Blueprint, question, CPP\
**Created:** [July 16, 2015, 2:55am UTC](https://forums.unrealengine.com/t/render-to-only-part-of-viewport/325427 "2015-07-16T02:55:44Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![vikhik](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@vikhik](https://forums.unrealengine.com/u/vikhik)\
**Post date:** [July 16, 2015, 2:55am UTC](https://forums.unrealengine.com/t/render-to-only-part-of-viewport/325427/1 "2015-07-16T02:55:44Z")

</div>

Hi guys,

During a part of my game, I want to have the main camera render only to a part of the viewport, while the rest of the screen is filled up with some UI elements. (i.e. the top right portion of the screen, roughly 1/4 of it, should render what the Main Camera sees and the rest is filled with GUI elements).

Is this possible in a nice way? I know about [Screen Capture 2D](https://docs.unrealengine.com/latest/INT/Resources/ContentExamples/Reflections/1_7/index.html) or [Canvas Render Target 2D](https://docs.unrealengine.com/latest/INT/BlueprintAPI/CanvasRenderTarget2D/index.html) and I could disable my main camera for the duration, but that seems like a hack. Are there any better ways to do this?

I am happy to do C++ or BP.

---

<div class="post-metadata">

**Author:** ![Artax](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Artax](https://forums.unrealengine.com/u/Artax)\
**Post date:** [August 19, 2015, 6:17pm UTC](https://forums.unrealengine.com/t/render-to-only-part-of-viewport/325427/2 "2015-08-19T18:17:34Z")

</div>

I have exactly the same question! So could someone please comment on it? Thanks a lot 🙂

I’m thinking about games like the early Lands of Lore and similar ones.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_6e7b421a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6e7b421a](https://forums.unrealengine.com/u/anonymous_user_6e7b421a)\
**Post date:** [August 19, 2015, 6:28pm UTC](https://forums.unrealengine.com/t/render-to-only-part-of-viewport/325427/3 "2015-08-19T18:28:28Z")

</div>

Hey guys,

I feel like Unreal Motion Graphics (UMG) is going to be your best friend in this case. If you have not looked into it yet, take a look at our documentation about this awesome UI designer. It has a lot of versatility and flexibility!

**UMG UI Designer**

> **[UMG UI Designer](https://docs.unrealengine.com/5.1/en-US/umg-ui-designer-for-unreal-engine/)**
>
> A guide to using Unreal Motion Graphics to create UI elements.

Let me know if this is along the lines of what you are looking for, or if you have further questions.

Cheers,

---

<div class="post-metadata">

**Author:** ![Artax](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Artax](https://forums.unrealengine.com/u/Artax)\
**Post date:** [August 19, 2015, 6:34pm UTC](https://forums.unrealengine.com/t/render-to-only-part-of-viewport/325427/4 "2015-08-19T18:34:40Z")

</div>

Hi Andrew,

thanks for the quick answer! I am afraid, however, that I was too unspecific in describing at least my version of the problem. I did design the interface of my game in UMG 🙂 I just don’t know how to deal with the camera image. Is there a way to render the player camera to a UMG element?

And yes, UMG is awesome indeed 🙂

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_6e7b421a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6e7b421a](https://forums.unrealengine.com/u/anonymous_user_6e7b421a)\
**Post date:** [August 19, 2015, 6:49pm UTC](https://forums.unrealengine.com/t/render-to-only-part-of-viewport/325427/5 "2015-08-19T18:49:31Z")

</div>

No problem. I mentioned this documentation as it was not hinted in your post you were aware and had already begun using UMG.

The only way to render a specific Camera View as an image is to use the Scene Capture 2D actor. This has been improved over the last few iterations of the engine to expose ShowFlags so you can include/exclude certain things the camera renders to the texture.

**Scene Capture 2D**

 ![54858-scenecapture2dshowflags.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/f/6/4f626d3c466032cbaa1432f114ddf4215d09fb70.png)

The render texture can be directly referenced in UMG as an image which you can resize in your viewport. To save you some performance and a headache, I would pay attention to the auto-activation check box as well as the ‘Capture Every Frame’ option.

**Note** If you keep all of the show flags activated and the view distance and showflags are all ticked to the max, you will see a drop in performance. This is because you are rendering your entire scene again to a small camera.

Cheers,

---

<div class="post-metadata">

**Author:** ![Artax](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Artax](https://forums.unrealengine.com/u/Artax)\
**Post date:** [August 19, 2015, 7:03pm UTC](https://forums.unrealengine.com/t/render-to-only-part-of-viewport/325427/6 "2015-08-19T19:03:39Z")

</div>

Ok, thanks a lot for the explanations! The SceneCapture2D it is, then.

Cheers,  
Jonas

---

<div class="post-metadata">

**Author:** ![Lordink](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Lordink](https://forums.unrealengine.com/u/Lordink)\
**Post date:** [March 24, 2016, 2:39pm UTC](https://forums.unrealengine.com/t/render-to-only-part-of-viewport/325427/7 "2016-03-24T14:39:32Z")

</div>

Hi,  
I have the similar challenge and I stumbled upon this thread. The problem with using SceneCapture is that even if you put it on top of a normal camera output in the game viewport, the performance cost will still be there (it renders the scene to camera and then to widget on top of camera with UMG). This is especially bad for the mobile. As far as I understand, I have to go and tinker with engine source code. Could you give a hint where to start?  
My goal is to have a viewport on the top part of the screen, and on the bottom 30-40% will be used for 2D UI only.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_5b590faa](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_5b590faa](https://forums.unrealengine.com/u/anonymous_user_5b590faa)\
**Post date:** [October 6, 2016, 2:36pm UTC](https://forums.unrealengine.com/t/render-to-only-part-of-viewport/325427/8 "2016-10-06T14:36:16Z")

</div>

There is hope. I asked separately and as a result there is a pending feature request. Vote for it and hopefully it becomes a reality.

> **[The Unreal Engine Issues and Bug Tracker](https://issues.unrealengine.com/issue/UE-36928)**
>
> Welcome to the Unreal Engine Issue and Bug Tracker. You can check the status of an issue and search for existing bugs. See latest bug fixes too.

---

<div class="post-metadata">

**Author:** ![HarvardNeumann](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HarvardNeumann](https://forums.unrealengine.com/u/HarvardNeumann)\
**Post date:** [April 25, 2024, 3:11am UTC](https://forums.unrealengine.com/t/render-to-only-part-of-viewport/325427/9 "2024-04-25T03:11:03Z")

</div>

[https://forums.unrealengine.com/t/how-to-completely-disable-all-cameras/417568](https://forums.unrealengine.com/t/how-to-completely-disable-all-cameras/417568)  
You can turn off the main viewport rendering to save on this part of the performance overhead.

---

<div class="post-metadata">

**Author:** ![Sean\_Maxhell](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sean\_Maxhell](https://forums.unrealengine.com/u/Sean_Maxhell)\
**Post date:** [June 7, 2024, 10:29am UTC](https://forums.unrealengine.com/t/render-to-only-part-of-viewport/325427/10 "2024-06-07T10:29:48Z")

</div>

Any Solution to this problem?
