Download

Render to texture

Hi guys,

Is there any way in UE4 to render to texture? What I want to achieve is downsample screen with posteffect material, write the result to the texture and then use this texture in another posteffect material.

Found the section in the docs about it, gonna try. https://docs.unrealengine.com/latest/INT/Engine/Content/Tools/RenderToTextureTools/index.html

Alright, that link actually describes how to make a screenshot in the editor… So the problem still exists.

I believe what you are looking for is a RenderTarget. Right click in the content browser to create a new item, and under the “Materials & Textures” menu you will find it second to last in the list. use this with a Scene Capture Cube, then in your material you will be able to use it similar to how regular textures work using a TextureSample. Hope that helps!

Thanks for the direction. I wonder how SceneCapture2D works. Is it rerenders whole scene to a separate render target? Or it captures the scene at some point? Right now I have the feeling that rendering is repeated for the SceneCapture… and I’d like to know if it’s possible to grab final scene texture from the previous scene and save it to the texture (probably downsampled).

I found some info on that for you here:

It looks like it is captured every frame, and is cheaper to use than the SceneCaptureCube as well. Are you trying to get a one time single image from the scene to use, or is this more what you need?

I think SceneCapture2D+blendables should do what I need, we just need to wait until this combo gets fixed.