Drawing on one Whiteboard (Render Target) is copied to all Whiteboards?
Asked Answered
I

1

6

I'm using the Unreal Engine 4 VR Content Examples where it has a whiteboard you can draw on. It uses render targets to render the line to the canvas.

The problem is, when I copy the whiteboard to use somewhere else in the level, it shows the same drawing, like this:

duplicate drawing

Here is the material and texture I am using:

material and render target texture

I tried to make a copy of the material and the texture and use it on one of the whiteboards but it has the same result. I'm not sure why the render target is not instanced/unique? Why is it drawing on the same thing on multiple instances of the whiteboard?

Edit (Additional Details): I made a copy of the original render target and tried specifying that instead, I also made a material instance of the original and specified that for the copy but still the same issue. I tried to dynamically create a render target and material instance as you can see here https://answers.unrealengine.com/questions/828892/drawing-on-one-whiteboard-render-target-is-copied.html , but then i couldn't draw on it; so I only did it to two of them and it still had the same issue

Idiolect answered 16/9, 2018 at 22:0 Comment(4)
They're all using the same RenderTarget. So, they'll all display the same thing. You copied the materials, etc., but you didn't create unique RTs for each of the whiteboards. (You also misspelled RT_WhiteBoradRenderTarget.Nihil
I tried making separate render targets in the editor and specifying different material instances but I still had the same result. I asked the same question on the answer hub: answers.unrealengine.com/questions/828892/…Idiolect
You are either writing to multiple targets, or displaying the same texture in multiple places. There’s no other way this will happen.Nihil
I made a copy of the original render target and tried specifying that instead, I also made a material instance of the original and specified that for the copy but still the same issue. I tried to dynamically create a render target and material instance as you can see in the above link, but then i couldn't draw on it; so I only did it to two of them and it still had the same issue.Idiolect
O
0

For a material using a render target to have a different render target feed into it, the functionality is much like using a static texture. There must be multiple render target assets made (either in editor or at runtime) and there must be different Materials used, or at least different Material Instances, with unique Render Target assets assigned to each.

My recommendation is to make a set of Material Instances of that whiteboard material, and make sure to duplicate the render targets to get a unique one per whiteboard, which is set both on the material instance and the whiteboard actor.

If this isn't working, there might be some Blueprint trickery for managing the render target happening at runtime embedded in the whiteboards. You could alternatively take this as a challenge to try to reimplement the whiteboard yourself.

Ornstead answered 15/5, 2019 at 8:47 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.