Paper2D: Drawing primitives into a render texture
Is it possible to draw primitives (lines, triangles..) into a texture? I'm currently playing with Paper2D. To achieve a certain effect I need to create a "mask" texture by drawing shapes into it. This texture has to be updated every frame and multiplied into the rest of the rendered scene. The result is comparable to the example below. Basically it modifies the rendered scene's brightness, sort of like a post processing effect.
I've done this in Cocos2D previously and now I'm thinking about porting it over to UE4 for better portability and because of the convenient editors. How would I go about this in UE4 and Paper2D?
Hey Bajee -
There are two possible ways to achieve this effect. One way would be to take a post process material which increases the brightness of objects found behind the mesh and assign it to a basic mesh shape like the flashlight's triangle and adjust the 3D scale of that mesh to simulate shape change. There are some limitations to this method as you would have to do some complicated variable alignment to check for blocking objects and then either fun a gradient fade to cut the brightness effect or change the Relative Scale 3D.
The other method would require a significant investment into some Programming and is explored quite nicely on this website here, http://www.redblobgames.com/articles/visibility/
Hopefully this will point you in the right direction, if you have further questions about this method please feel free to comment below -
answered Sep 25 '14 at 06:20 PM
Lovecraft_K ♦♦ STAFF
Follow this question
Once you sign in you will be able to subscribe for any updates here