Download

Draw Material To Render Target uncorrect work after building

In editor deformation works perfect:

But after building do not work

I add block to check how looks my textures:
in editor

after building

If i remove from BP DrawMaterialToRenderTarget textures become the same.

What i’m doing wrong?

Are you setting any params via MPC? Those will work in the construction script, but sometime you need to set all your MPC values on begin play as well just to be safe.

I found problem. In editor RenderTarget use previous value but in build is default(just black). When i making height map for my snow i use PostProcess to get SceneDepth buffer. After when SceneDepth rendered to texture i inverting them. When game start at first tick we have white texture(1 - 0 = 1) and this means all snow is deforming. Fix it easy, invert SceneDepth in PP material before that rendered at texture.

P.S. Sorry for my english)

That is expected. Render Targets never save any data of any kind. If you check the file size of a render targets its just a few kb. The data only exists on the GPU. If you have an initialization state, you need to call it when the game runs.

I think this problem can be avoid by the experience. In editor all works perfectly, if you do not remember/know about this issue later you get a surprise, like me)))