playMaker

Author Topic: Capturing and storing user's illustration?  (Read 1180 times)

Breadman

  • Full Member
  • ***
  • Posts: 185
  • Derp
Capturing and storing user's illustration?
« on: July 28, 2016, 11:56:34 AM »
Hi everyone!

Does anyone know if there's a way (through PlayMaker or other addons) that would allow me to create a "canvas" that reads user input and allows them to draw lines, and then store this drawing and use it as a texture? Sort of like a mini paint app.

I'm wondering if it would be possible to do something similar to "Draw A Stickman" (http://www.drawastickman.com/episode1) in PlayMaker. Another example is "Rust", players can paint their own wooden signs and place them in the game world.

I've stumbled upon Vectorosity, but I'm not sure if this allows for custom drawings like this, or just mathematical/coded lines. Is there any way to do this with PlayMaker? Thankful for any guidance!

« Last Edit: July 28, 2016, 12:12:23 PM by Breadman »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Capturing and storing user's illustration?
« Reply #1 on: July 28, 2016, 01:56:35 PM »
Hi,

Vectrosity would be too limiting i would say, though not impossible for basic line and fill shapes drawing.

Maybe this would be a better solution: https://www.assetstore.unity3d.com/en/#!/content/19803

but coding is likely mandatory, at least to create custom actions to interface with a painting framework.

But the basics is as follow:

Draw pixels onto a texture
Save texture on the device or online as a byte array or png
Use that texture or bytearray in a mesh with the appropriate uv.

Drawing pixels requires knowing the pixel position to write based on the touch screen position, that's key to begin with drawing.

Bye,

Jean