Output material to render target


I want to put the output of my material into a texture. So I assign to m’y static mesh a material and I want the output of this shader is on my render target, not on the screen.

Best regards,

Hello Robinsondesbois,

So to clarify you want your render target to be rendered on that static mesh?

If so you create a scene capture 2D from your modes tab. From there you create a texture RenderTarget2D. You then create a material from that texture and apply it to your mesh. At this stage it should still be green. Then you add the texture, not the material, to your SceneCapture2D. This should render whatever the scene capture is looking at on your mesh.

If this is not what you are trying to do can you please clarify.


It’s not exactly the problem. I use a material to unwrap my mesh one, and paint on it. The output of this material is a texture to apply on a other mesh named two.

For this moment, I capture my texture using a scene capture, and the render target is used to texturing the second mesh.



In order to understand this better if you could clarify “unwrapping your mesh.” You typically only unwrap in an external modeling program. What do you mean by painting on it. Do you mean texture painting? I am trying to get some more context on what you are trying to accomplish by this workflow. Are you attempting to take the material from one mesh and then apply it to another mesh? This being done via a texture as opposed to a render target?

If you would provide some more clarity on exactly what you are trying to accomplish then I may be able to answer if this workflow is even viable in UE4.


In fact I try to make a painting tool with UE4 in runtime. I want to project a image into the texture of the mesh like a decal but save on the texture.


Ok, have you looked into mesh painting and texture painting yet?

Yes, I looked this topic. I don’t want to paint my mesh in the editor but at runtime.

Ok, So I believe what you will have to do is set up a post process material. Then assign this material to an event like a left mouse click. This will involve blueprinting where you will need to set an event for the the material to be called, a detection for when you are hovering over what you want to paint on. I highly recommend opening another ticket inside of the blueprint section. You are on the right track but anything at run time will be an event through the use of the blueprint system.


Ok next step here : Print a post process on Texture

Thank you :slight_smile: