# Draw Material to Render Target doesn't seem to work with MIDs

**URL:** <https://forums.unrealengine.com/t/draw-material-to-render-target-doesnt-seem-to-work-with-mids/366629>\
**Category:** Rendering\
**Tags:** unreal-engine, question\
**Created:** [August 9, 2016, 5:22pm UTC](https://forums.unrealengine.com/t/draw-material-to-render-target-doesnt-seem-to-work-with-mids/366629 "2016-08-09T17:22:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![SFtheWolf](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SFtheWolf](https://forums.unrealengine.com/u/SFtheWolf)\
**Post date:** [August 9, 2016, 5:22pm UTC](https://forums.unrealengine.com/t/draw-material-to-render-target-doesnt-seem-to-work-with-mids/366629/1 "2016-08-09T17:22:26Z")

</div>

I’ve been unsuccessful in getting the render to texture workflow working with Dynamic Material Instances and am assuming this is a bug. I tried making a non-dynamic material and dynamic material version of the same Blueprint using the same render targets and materials and only the non-dynamic version appears to writing to the render targets properly.

Here’s what I tested with, a rudimentary afterimage effect using two rendertargets:

Non-dynamic, references set by hand, works:

 ![102158-non-dynamic+material.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/3/1/a312531311a4047edcd222a1ef1ffc2d0a4252dc.png)

Dynamic, references set at runtime, doesn’t work:

 ![102157-dynamic+material.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/5/b/a5ba3aaa195c076f858408deded9c7adac2e9b89.png)

---

<div class="post-metadata">

**Author:** ![cannabis.cod3r](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@cannabis.cod3r](https://forums.unrealengine.com/u/cannabis.cod3r)\
**Post date:** [August 10, 2016, 7:27am UTC](https://forums.unrealengine.com/t/draw-material-to-render-target-doesnt-seem-to-work-with-mids/366629/2 "2016-08-10T07:27:07Z")

</div>

There are 2 CreateDynamicMaterialInstance nodes. Try one that is bound to a static mesh.

---

<div class="post-metadata">

**Author:** ![SFtheWolf](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SFtheWolf](https://forums.unrealengine.com/u/SFtheWolf)\
**Post date:** [August 10, 2016, 8:39am UTC](https://forums.unrealengine.com/t/draw-material-to-render-target-doesnt-seem-to-work-with-mids/366629/3 "2016-08-10T08:39:05Z")

</div>

Just tried. Doesn’t seem to have made a difference.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_0c62419a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_0c62419a](https://forums.unrealengine.com/u/anonymous_user_0c62419a)\
**Post date:** [August 10, 2016, 6:54pm UTC](https://forums.unrealengine.com/t/draw-material-to-render-target-doesnt-seem-to-work-with-mids/366629/4 "2016-08-10T18:54:14Z")

</div>

Hi SF,

I’d like to help you out with this issue. First off I have a couple of questions/comments.

I noticed something in your screenshot of the material parameters being set at runtime. The dynamic material instance that you created isn’t being being set into the material parameter for the “Draw Material to Render Target” node. You have it set to M\_Phosphor\_De…(can’t see the rest) essentially not putting that Dynamic Material to use. Is that intentional?

I could further assist you if you could explain **exactly** what it is you are trying to achieve. What is your goal here?

I was personally unable to reproduce any errors involving dynamic materials in the context you specified.

!

---

<div class="post-metadata">

**Author:** ![SFtheWolf](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SFtheWolf](https://forums.unrealengine.com/u/SFtheWolf)\
**Post date:** [August 11, 2016, 12:57am UTC](https://forums.unrealengine.com/t/draw-material-to-render-target-doesnt-seem-to-work-with-mids/366629/5 "2016-08-11T00:57:53Z")

</div>

My goodness what a basic error, how embarrassing! Thank you for resolving this for me.

For anyone else interested, here’s the working setup I ended up with for a basic after image effect that I’ll be using in my [CRT screen construction suite][2]:

 ![102389-fixed+material+3.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/2/6/6265a7b38e343455ff42b52ca02c246994fd1b7e.jpeg)

 ![102387-fixed+material+1.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/c/3/1c359279a5cce923c65039c73f9ce392db19d16a.png)

 ![102388-fixed+material+2.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/b/c/ebcfbd514b185dee3c691acbfd58757150693d17.jpeg)
