Increase cube render target resolution?

I’m using the cubeRenderTargets to output images for use as 360 degree stereo panoramas. Currently, there is a hard limit to the resolution that the cube renderTarget will go (2k). I’m aware that going this high, or higher will result in horrible performance, but that isn’t a problem when rendering a stereoPano. I just set it up in Matinee and record a movie frameByFrame. I would like to go up to at least 4k for the renderTargets to get quality high enough to use in a gearVR or cardboard.

I’ve gotten zero response on this from answerHub and forums. I’m still wondering why this is a hard limitation.

Hi 3dlight -

The MaxSize limit is hard coded into the engine source and is there to protect performance in a majority of cases. However you can get a source copy of the engine and change the MaxSize in the …\Engine\Source\Runtime\Engine\Private\TextureRenderTargetCube.cpp approx. line 83

const int32 MaxSize=2048;

Change the 2048 to a power of two value as you require. Remember you will get some performance issues if used excessively and also remember that the engine itself has a texture size limit of 8192 and while you can set the value higher than that in the code above, using a render target of a higher value will cause massive performance loss in the engine.

Thank you

Eric Ketchum

Thanks! I’ll give it a try! I’m aware the reasoning. Performance will certainly take a massive hit if you go higher. I just prefer to allow such things, since you never know how someone might want to use it. I’m thinking there are plenty of things you might do in the engine to kill performance, so hard-coding this one seems odd… but then again, there’s probably tons of hard-coded limits in there to keep us from exploding our scenes;)

Hello Eric, 3dlight

I tried to do as you have explained, changed the .cpp files with a note editor (had to find a workaround to edit them because they are protected) anyway i have my modified .cpp file which i have then used to replace the original one in the engine.

Now what should i do exactly?? If i open the engine i still have the limit to 2k.
What am i missing?

I am using UE4 4.8.3 downloaded from the launcher.

I´ll be really glad if you can guide me more step by step. Many thanks in advance!!

Hi Franchi -

The Launcher includes a protected Source for debugging purposes, if you are wanting to make changes to the source code you will need to get a GitHub version of the Engine. Here is some documentation to get you started:

Thank You

Eric Ketchum

You’ll have to compile/build your own custom version of the engine. Download the source from Github. Follow the directions to create the visual studio .sln (solution). edit the above mentioned .cpp file, and build source from VisualStudio. You’ll then have a custom version of the engine that has a higher limit. I’ve done this, and at 4k, things get really slow, but it’s usable if you have a good graphics card and are using it to output images, and not real-time playback. I was able to output 8k stereo (4k per eye/capture cube) without much problem other than slow interaction time. Good luck.

1 Like

Thank you very much guys, i´m going to give it a try!

Update: Now u can use this plugin for capture 360: Panoramic Capture Tool | Unreal Engine Documentation

Update: Now u can use this plugin for capture 360: Panoramic Capture Tool | Unreal Engine Documentation

Did you use the full build? And how much time did it take? For me, it is taking 4-5 hours for the build of UE5.2