I programticaly generate a texture and use in in a Dynamic material.
The problem is I would like to test my materials using these programtically generated textures
At runtime I can open the dynamic material and see the texture_parameters that I set, I can open each individual one in the Unreal image editor. However I cannot figure out how to save them to disk for testing or inspection. How can I save textures from a dynamic material Instance, OR how can I save programtically generated textures?
I believe you can use render targets to do this. Here’s a how-to in the UE4 docs that walk you through how to do it:
Basically, you create a render target, create a material (which you already have) and make a BP to bake that material to the render target and output to texture.
Yes, that’s what the linked tutorial shows how to do. It basically renders the material and saves the result to a 2D texture asset that will show up in the content browser when all is said and done.
In the end you should have something like this (where the _Tex file is a texture asset that you can use or export):
For those, who are still looking for the solution on exporting any image from the UE4, i managed to export downloaded image(using DownloadImage node) to the .png file by this code
Thanks. that was the great solution but what if is use draw material instead of Draw texture to draw from my material? It’s giving me blank image don’t know why?