Search Unity

Dream Paint

Discussion in 'Assets and Asset Store' started by 2FlyDreams, May 14, 2014.

  1. 2FlyDreams

    2FlyDreams

    Joined:
    Oct 18, 2013
    Posts:
    42
    Version 2.2

    Dream Paint brings the power of 2D and 3D primitives. It makes painting easy, fast and flexible, using only one GPU draw call and is mobile friendly. This works in the game and Unity editor, without Unity pro, and in Unity 4.6 or later. It supports previous versions of Unity, but without painting using Unity Canvas. It comes with full documentation, examples and demos.

    Draw in 2D or in 3D space. Select points, lines, or the line pen. Connect all positions with shapes, using Catmull-Rom spline, quadratic Bezier, cubic Bezier curves, or draw ellipse, or rectangle etc. Change widths or add vertices colors, to use in your shader, beside supports shaders with normals and tangents. Fill line joins, using bevel, miter, round, and last filling. Add custom caps. Apply your own material. Make UV texture coordinates continuous, for continuous textures, or set a UV step or correct UV dissertation, caused by joins filling and widths. Draw segments as billboards. Plus many more features.

    Please, feel free to contact us if you need any assistance, have a proposal for future updates, or found a bug. Contact us by sending a message on any social network, or by using the contact form on our website:

    http://www.2flydreams.com/
    https://www.facebook.com/2flydreams
    https://twitter.com/2FlyDreams
    http://www.youtube.com/c/2flydreams
    https://plus.google.com/+2flydreams

    Infographics:
    Screenshot1.png Screenshot2.png Screenshot3.png Screenshot4.png

    Demos:
    http://www.2flydreams.com/dream-paint-navigation-demo.html
    http://www.2flydreams.com/dream-paint-painting-demo.html

    Asset Store:
    https://www.assetstore.unity3d.com/#/content/13175

    Note, previous name was Dream Drawing!
     
    Last edited: Jan 29, 2015
  2. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    Hi I'm curious about this product but I'm not exactly sure what it can do. Perhaps a video recording of it being used can help.

    I checked out the demo, but it seems it only lets me draw lines. I want to see how easy it is to create curves. And from what I understand it's easy to give it a dashed line pattern.

    How is it used? Do you create lines from code? Or do you also provide an editor window to let us create lines in the scene a-la Photoshop vector paths? (although to be honest, being able to do it from code is enough for me)

    I'm primarily looking into this for use in our game. In this screenshot, you'll see we have a chess-like grid in our game.



    This was good enough for a prototype, but I'm not satisfied with how it looks like right now.



    One thing I was looking into, was replicating the effects shown here, because they make the ground look a lot less cluttered. Specifically:

    1. movement is shown by the borders of how far you can go, instead of showing each tile inside
    2. the corners of this movement border is smoothened out
    3. the movement path is shown as a smoothly-curved line with an arrowhead at the end
    4. these lines look like they are glowing




    I was wondering if it's easy to pull off such a thing using Dream Paint.

    I was looking at Vectrosity but seeing as this is less expensive, I'm thinking about getting this instead.
     
  3. 2FlyDreams

    2FlyDreams

    Joined:
    Oct 18, 2013
    Posts:
    42
    Dear AnomalusUndrdog,

    Thank you for submitting your questions to 2 Fly Dreams.

    We are currently working at polygon update and tube update. Polygon update will give a user ability to draw custom filled primitives. Tube update – ability to draw custom tubes. So after that we will do video records.

    Dream paint is very powerful tool, so you can draw not only simple line. For example, with lines pen you can create custom grid, with line pen and shape you can create ellipse. Dashed line can be easily made by dashed texture, or by points pen.

    Work with Dream Paint is very easy, even very difficult primitives take about 5 lines of code, so we think editor window is useless for primitives creation.

    As we have mentioned above, you can create grid using lines pen, and it will cost ONLY 1 GPU draw call. If you will have problems with it, contact us.

    Yes, and such things you easily can do with Dream Paint, and it will cost 4 GPU draw calls. Dream Paint already contains such glowing materials (for caps and lines) in examples, so you if you decide to use it, you will only need to change color of materials. Beside, you can use your own for caps and lines.

    Borders:
    Can be done by line pen. Corners of this line can be smoothed using bevel, or miter filling. Note, if you want to use rounded joins filling, it currently not supported.

    Movement path:
    Can be done by line pen. Use Dream Paint shape: Catmull-Rom spline to create curve path. Add joins filling using bevel, or miter. Add your own cap to the end of the path, or take from examples. Note, using caps will add 1 additional draw call. It doesn’t matter how many caps you use, for example, if you use 100 lines with 200 caps, it will cost ONLY 2 draw calls.

    Circle under character:
    Can be done by line pen. Use Dream Paint shape, to create ellipse shape. Add joins filling using bevel, or miter, and don’t forget to add solid filling (will fill space between first and last segment).


    Feel free to contact us, if you have any questions left!

    Kind regards,
    2 Fly Dreams
     
  4. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    Hi, thanks so much for the replies.

    I suggest more screenshots of the plugin showing sample usage. Like the screenshot I linked, but it doesn't have to be as extravagant as that. Perhaps you can check out the screenshots for Vectrosity to get what I mean.

    The screenshots you got so far are nice, they indeed show the features. But samples of how they might be used in an actual game, that would make more people interested, I believe.

    Like, say, showing the potential trajectory of a projectile as dotted lines (think Angry Birds), showing movement path of a character, indication of explosion radius, etc. Basically, give people ideas on how they might find use for it.




    So this will let me draw not just a movement border, but give color to the insides of it as well? That would be nice.



    How sophisticated is it? Can I set the thickness of the glow? For example, as thick as shown in this screenshot (while still making the curved corners look good)?



    And you'll notice the glow is only within the shape (instead of also appearing outside). Can Dream Paint do that out-of-the-box or do I need to make my own shader for that?


    These aren't immediate concerns, but I'm curious to know if Dream Paint can do it by default. I'm liking what I see so far though! I think I'll buy it soon.
     
  5. 2FlyDreams

    2FlyDreams

    Joined:
    Oct 18, 2013
    Posts:
    42
    Dear AnomalusUndrdog,

    Thank you for submitting your questions to 2 Fly Dreams.

    Thank you for your advice! We will work out it.

    You are absolutely right.

    Material uses glowing texture, which was made in Photoshop. For your case, with the help of Photoshop, you can make thick line in upper side of texture, then add glowing effect. If you want to manipulate glowing, you can do it, for example, with color (material, vertex e. t. c.).

    Feel free to contact us, if you have any questions left!

    Kind regards,
    2 Fly Dreams
     
  6. IanStanbridge

    IanStanbridge

    Joined:
    Aug 26, 2013
    Posts:
    334
    I also think it would be better if you had more examples showing more advanced examples. It is unclear how capable this is from the current examples. Can this be used to paint vector primitives on top of 3D meshes for example ? When objects are painted are they recorded as shapes such as spines that can then be further modified at runtime or is the shape information lost after they have been painted ? Can they be used to generate procedural textures at runtime ? One tool that Unity is currently missing is a vector painting tool that can interact with UV's and meshes.

    For example suppose I wantted to cut a cirlcle into a mesh. Ideally I would like to use a shader that had two textures to do this efficiently. One of the textures would be used as a mask for the cutout of the shader. It would be far more efficient to have a tool that would allow me to paint a circle onto the mesh and record that as a vector and convert it to a texture at runtime than to have to save a high resolution image of a circle on a texture. Can this tool be used to generate textures from painted vector shapes at runtime that can be used by shaders ?
     
  7. 2FlyDreams

    2FlyDreams

    Joined:
    Oct 18, 2013
    Posts:
    42
    Dear IanStanbridge,

    Thank you for submitting your questions to 2 Fly Dreams.

    Thank you for your advice! We will work out it.

    If you mean painting on a mesh, like in ZBrush, no, it can't be used in such way.

    All information isn’t lost. For example, if you have drawn a curve path, using Catmull-Rom spline (Dream Paint shape), Dream Paint can easily return all points of the curve path. Then, for example, you can use them to move object, according to curve.

    If you mean rendering everything to texture, no. This is feature of the Unity Pro.

    For example, polygon pen will allow you to make round mesh, and then make a round cut in it, so you will have a ring. Polygon pen will come in future updates.

    Feel free to contact us, if you have any questions left!

    Kind regards,
    2 Fly Dreams
     
  8. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,462
    2FlyDreams,

    I'm also interested in this asset but noticed that it's not updated since May 14. Do you have an estimate of when the next update with the polygon and tube pens will be released?
     
  9. 2FlyDreams

    2FlyDreams

    Joined:
    Oct 18, 2013
    Posts:
    42
    Dear rocki,

    Thank you for submitting your questions to 2 Fly Dreams.

    At the beginning of 2015, after big Dream Paint 2.2 update:

    Third new Draw method, to draw in Unity 4.6 Canvas (Dream Paint 2.2 will work in Unity versions lower 4.6 too, but without Canvas);

    Free Dream A* with binary heaps, path smoothing;

    No more worry about segments count, Dream Paint will do it for you, and you can pass parameters less or more than Dream Paint needs;

    Joins filling in 3D space, and accuracy parameter of joins filling, to prevent artifacts that appear in paints where accuracy must be low;

    Third new joins filling, round joins filling;

    Easy user’s shapes creation;

    Shapes in one mesh, to reduce draw calls;

    Easy manipulating by 3 levels of work, you can use Change methods for each position, for each segment, or for each shape;

    2 new examples, Navigation 2D / 3D and Drawing 2D / 3D;

    Dream Paint will be reorganized, it will be dived by Pens only, not by Draw methods and their dimensions like now (Game3D, Editor2D …), to prepare it for new Pens (Polygon and Tube);

    Full source code;

    e. t. c…

    Feel free to contact us, if you have any questions left!

    Kind regards,
    2 Fly Dreams
     
  10. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,462
    Wow, that's quite a list of goodies. Can you post some videos of work in progress so we can follow along with the upcoming exciting features.
     
  11. 2FlyDreams

    2FlyDreams

    Joined:
    Oct 18, 2013
    Posts:
    42
    Dear rocki,

    Thank you for submitting your questions to 2 Fly Dreams.

    Yes of course, but not videos, infographics will be on our social networking websites soon.

    Feel free to contact us, if you have any questions left!

    Kind regards,
    2 Fly Dreams
     
  12. Play_Edu

    Play_Edu

    Joined:
    Jun 10, 2012
    Posts:
    722
    Hi,
    Nice tool.
    can free hand painting possible on 3d object in 3d space ?
     
  13. 2FlyDreams

    2FlyDreams

    Joined:
    Oct 18, 2013
    Posts:
    42
    Dear Play_Edu,

    Thank you for submitting your question to 2 Fly Dreams.

    Dream Paint not allows painting on 3D model surface. In your situation, it can only works, if you pass positions to Dream Paint, by which you will draw in 3D space.

    Feel free to contact us, if you have any questions left!

    Kind regards,
    2 Fly Dreams
     
  14. AVOlight

    AVOlight

    Joined:
    Apr 15, 2014
    Posts:
    427
    Hi, can I get the source?
    (does the lastest beta work with unity 5 64 bit b14?)
    Cheers, Nick
     
  15. 2FlyDreams

    2FlyDreams

    Joined:
    Oct 18, 2013
    Posts:
    42
    Dear biasless,

    Thank you for submitting your question to 2 Fly Dreams.

    If you have “Invoice No.”, then to receive source code of Dream Paint contact us using contact form on our website, and we will send it.

    We haven’t tested Dream Paint in “Unity 5 x64 b14” yet, but we don’t see any reasons why Dream Paint won’t work in it.

    Feel free to contact us, if you have any questions left!

    Kind regards,
    2 Fly Dreams
     
  16. AVOlight

    AVOlight

    Joined:
    Apr 15, 2014
    Posts:
    427
    thanks, I used the contact form a while ago but didn't get a response, I'll message you in here.

    trying to find a fill triangulator that doesn't take so much cpu during runtime, do you know if your one is better than rageSplines

    (i'm changing the meshes at runtime)
     
  17. 2FlyDreams

    2FlyDreams

    Joined:
    Oct 18, 2013
    Posts:
    42
    Dear biasless,

    Thank you for submitting your question to 2 Fly Dreams.

    Sent you a message in Unity Forum conversation.

    Feel free to contact us, if you have any questions left!

    Kind regards,
    2 Fly Dreams
     
  18. 2FlyDreams

    2FlyDreams

    Joined:
    Oct 18, 2013
    Posts:
    42
    Meet Dream Paint 2.2 !
     
  19. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    Hi,

    I guess you know Vectrosity. What is your product can do better?
    Can you:

    a) Show some examples of script? (as someone said on the Store - 1 month ago - missing documentation.)
    b) Make a demo with the new GUI Canvas?

    Sorry to seem rude, but in the past year some products purchased in the Store are not followed by their creators: I get very suspicious.
     
  20. 2FlyDreams

    2FlyDreams

    Joined:
    Oct 18, 2013
    Posts:
    42
    Dear ZJP,

    Thank you for submitting your question to 2 Fly Dreams.

    Yes, we heard about it, but we don’t have it and haven’t tried it, too. We don’t want to make bad advertisement for the Vectorsity, so as far as we know it draws using mesh, sorry if we aren’t right. Our asset can draw using mesh too. Additionally, it can draw in the Unity Editor Window and in the Unity 4.6 Canvas, so currently we support 3 types of drawing. Many people asked us about drawing on the mesh texture, so next update will add the 4th type of drawing. This update will be before tubes and polygons update. Besides, there are many assets that can do such features, but they are all separated. We want to include such features in one asset and by our vision.

    A person, that has made review month ago, didn’t contact us to ask for help, or for refund and still didn’t. Besides, there are no words about NGUI Canvas support. We have full documentation about 25 pages. Even documentatation for Dream A*, it is a pathfinding solution with Binary Heaps, Grid changes investigations, Layers and Costs. It is used in one Dream Paint demo. If you don’t have Dream Paint, it is not a problem, just contact us here, and we will send it.

    We have written a small example for mesh drawing here:

    Code (CSharp):
    1. Lines.Create_Game(ref ln, "Example Lines"); // create Dream Paint class "ln" with name "Example Lines", type of the Lines Pen
    2.  
    3.         ln.Positions(0, new Vector2[] { new Vector2(0f, 1f), new Vector2(10f, 2f) }); // set one line positions at the shape index 0
    4.  
    5.         ln.Positions_Cross(1, new Vector2(-2f, -5f), 6f); // set a cross shape at the shape index 1, the cross is inscribed in the square with the position and the side length
    6.  
    7.         ln.Draw_Game(); // make all changes to appear on the screen
    8.  
    9.         // ... later we have decided to make some changes...
    10.  
    11.         ln.Change_Offset_Positions(0, 1, new Vector2(5f, 6f)); // offset the position with index 1 of the shape with index 0
    12.  
    13.         ln.Change_Offset(1, new Vector2(-3f, 4f)); // offset all positions of the shape with index 1
    14.  
    15.         ln.Draw_Game(); // make all changes to appear on the screen

    The same example for the Unity 4.6 Canvas drawing here:

    Code (CSharp):
    1. Lines.Create_Canvas(ref ln, "Example Lines", "Example Canvas"); // the difference here, will be attached to the Canvas with name "Example Canvas", if there is no such Canvas, then will create it
    2.  
    3.         ln.Positions(0, new Vector2[] { new Vector2(0f, 1f), new Vector2(10f, 2f) });
    4.  
    5.         ln.Positions_Cross(1, new Vector2(-2f, -5f), 6f);
    6.  
    7.         ln.Draw_Canvas(); // the difference here
    8.  
    9.         // ... later we have decided to make some changes...
    10.  
    11.         ln.Change_Offset_Positions(0, 1, new Vector2(5f, 6f));
    12.  
    13.         ln.Change_Offset(1, new Vector2(-3f, 4f));
    14.  
    15.         ln.Draw_Canvas(); // the difference here

    The same example for the Unity Editor Window drawing here:

    Code (CSharp):
    1.  
    2. Lines.Create_Editor(ref ln, "Example Lines"); // the difference here
    3.  
    4.         ln.Positions(0, new Vector2[] { new Vector2(0f, 1f), new Vector2(10f, 2f) });
    5.  
    6.         ln.Positions_Cross(1, new Vector2(-2f, -5f), 6f);
    7.  
    8.         // ... later we have decided to make some changes...
    9.  
    10.         ln.Change_Offset_Positions(0, 1, new Vector2(5f, 6f));
    11.  
    12.         ln.Change_Offset(1, new Vector2(-3f, 4f));
    13.  
    14.         // ...
    15.    
    16. void OnGUI()
    17.     {
    18.         ln.Draw_Editor(); // the difference here, Draw should be always in OnGUI
    19.     }

    They are all different in the Create and Draw, so the type of drawing can be simply changed by 2 lines of code. Our demos use the mesh type of drawing, but they can be easily changed to other types of drawing.

    Don’t worry, everything alright, we understand your situation.

    Feel free to contact us, if you have any questions left!

    Kind regards,
    2 Fly Dreams
     
    Last edited: Jan 11, 2015
  21. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    Thanks for the reply. :cool:
     
  22. Zybrion

    Zybrion

    Joined:
    Apr 4, 2014
    Posts:
    8
    Hello,

    Just a quick question before I buy this product: Is there a way to enable collision with the drawn lines (especially free draw mode) without coding too much/at all?

    Edit: Just received an e-mail. I was not patient enough.

    Thank you
    Zybrion
     
    Last edited: Jan 15, 2015
  23. 2FlyDreams

    2FlyDreams

    Joined:
    Oct 18, 2013
    Posts:
    42
    Dear Zybrion,

    Thank you for submitting your question to 2 Fly Dreams.

    For example, for the Game type of drawing, the Dream Paint class generates GameObject with Mesh, MeshFilter, MeshRender, so you can add the Collider component to the GameObject. Besides, Dream Paint Demos use a Collider for finding the point intersection between the mouse (touch) ray and the Dream Paint drawings.

    It is alright, yes, we have answered on the same question through the contact form on our website.

    Feel free to contact us, if you have any questions left!

    Kind regards,
    2 Fly Dreams
     
    Last edited: Jan 15, 2015
  24. Ergonator

    Ergonator

    Joined:
    Mar 12, 2015
    Posts:
    1
    Hi Guys,

    i have Problems with drawing lines and caps in canvas elements.
    In Canvas- RenderMode "WorldSpace" seems everything okay, but in Rendermode "ScreenSpace - Overlay" my lines and caps disappear when i apply a Material to it..

    Do you have any idea how i can fix that?

    Best regards,
    Ergonator
     
  25. imaginaryhuman

    imaginaryhuman

    Joined:
    Mar 21, 2010
    Posts:
    5,834
    I'm waiting to see what your actual user interface looks like.
     
  26. 2FlyDreams

    2FlyDreams

    Joined:
    Oct 18, 2013
    Posts:
    42
    Dear Ergonator,

    Thank you for submitting your question to 2 Fly Dreams.

    Can you give us more information about material and code, please? Because the problem may be not in the material. The default width is one and for such render mode it is very small. Distances between positions may be small too. The default color is color with zero values, so if shader uses vertices colors, you need to set colors.

    Besides, we send you a private message with our support email, can you use it, please?

    Feel free to contact us, if you have any questions left!

    Kind regards,
    2 Fly Dreams
     
  27. 2FlyDreams

    2FlyDreams

    Joined:
    Oct 18, 2013
    Posts:
    42
    Dear imaginaryhuman,

    Thank you for submitting your question to 2 Fly Dreams.

    Currently, there is no user interface, everything done using code. Usually, code takes about 3-7 lines of code.

    Feel free to contact us, if you have any questions left!

    Kind regards,
    2 Fly Dreams
     
  28. imaginaryhuman

    imaginaryhuman

    Joined:
    Mar 21, 2010
    Posts:
    5,834
  29. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    @2FlyDreams: I'm having problems drawing lines. I already have my Vector3 positions prepared. They're layed out in the X and Z axis, but Dream Paint doesn't create the lines properly.



    I'm currently drawing the lines using Debug.DrawLine there (the thin 1-pixel lines). Those white rectangles are the ones that Dream Paint made.

    How can I make Dream Paint draw the lines there properly?
     
  30. 2FlyDreams

    2FlyDreams

    Joined:
    Oct 18, 2013
    Posts:
    42
    Dear AnomalusUndrdog,

    Thank you for submitting your questions to 2 Fly Dreams.

    As far as we can see lines are perpendicular XZ plane. First, you need to rotate GameObject created by the Dream Paint for 90 degrees. Note, you can easily get reference to the GameObject by the “Get_GameObject_Game_Canvas()” method. Second, for example your values are “x”, ‘’y”, “z”, when you use positions methods set such “Vector3(x, z, 0f)” or “Vector2(x, z)”. Third, if you want your lines to be small like the Unity Debug Lines then you will need to use Widths methods. Additionally we suggest you to look the Navigation Demo; we did the same there, for example, in the end of the Crosses Region.

    Besides, we have sent you a private message with our support email, it is better to use it, because we can attach private files there.

    Feel free to contact us, if you have any questions left!

    Kind regards,
    2 Fly Dreams
     
  31. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    @2FlyDreams: Thank you for the reply! I was able to draw the lines now:



    (This line has the width set to 1. Each square in that grid is 1.5 in size.)

    Now my problem is with the line joins. To be honest, it was quite difficult to understand the English writing in the user guide included, but I was able to make sense of it somehow. However, I'm having trouble with the line joins. I'm not sure what values I should be using there. I wanted to make some round joins for this line. Here's the parameters I used:

    Code (CSharp):
    1. _moveRangeBorderLinesTest.Change_Joins(0, false, 1, false, true, 10, 95, 0);
    I'm not sure why round is an int while the other join types are only booleans. I only made guesses as to what numbers I should use actually. What values should I use there to give the line some proper round joins?
     
  32. Quatum1000

    Quatum1000

    Joined:
    Oct 5, 2014
    Posts:
    889
    Hi 2 Fly Dreams,

    would it be possible to build up a multiple curve editor like the particle editor in unity?
    I'm searching for a way to handle a multiple curve editor like this:
    Would that be possible with your Asset?

     
  33. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    @2FlyDreams: Ok I managed to make some nice rounded corners using cubic beziers. So I'm making multiple calls to Positions() and Positions_CubicBezier(). But again my problem is with the joins:





    How can I get rid of those gaps in the rounded corners?
     
  34. 2FlyDreams

    2FlyDreams

    Joined:
    Oct 18, 2013
    Posts:
    42
    Dear AnomalusUndrdog,

    Thank you for submitting your questions to 2 Fly Dreams.

    When you use the Round Joins Filling, you fill joins by sectors. First, each sector has main angle, u set it by Angle value and it is in RADIANS. Less Angle value gives more rounded Joins, but makes the Dream Paint to use more sectors. Second, Round value shows how many sectors you can let the Dream Paint to use for SHAPE, when it is 0 then you say to the Dream Paint that you aren’t going to use the Round Joins Filling. If the Dream Paint will run out of Round value, it will alert you and stop. If you use mixed Joins Filling then the Dream Paint will not stop and continue joins filling by bevel or miter, according what you set. Greater Round value gives more rounded Joins, but consume more performance. Third, Inaccuracy value shows how small spaces can be not filled.

    First error is Round value equals 1. Usually it is better to use such formula for Round value or greater: (joins in shape) multiply by (sectors in join). Second error is Angle value equals 95. It’s not in radians and very big, try to use 0.05f. Additionally, it is not good to use Inaccuracy (last parameter in the method) value equals 0, try to use 0.000001f. Besides, if you will use bevel or miter then Limit value equals 10f is too big for Width value equals 1f, usually it is close to Width.

    Such way is not right, because you try to fill joins by lines.

    Feel free to contact us, if you have any questions left!

    Kind regards,
    2 Fly Dreams
     
    AnomalusUndrdog likes this.
  35. 2FlyDreams

    2FlyDreams

    Joined:
    Oct 18, 2013
    Posts:
    42
    Dear Quatum1000,

    Thank you for submitting your questions to 2 Fly Dreams.

    Yes, it is possible. Note, currently the Dream Paint allows you only to draw using code, so all interactions with user should be programmed by you.

    Feel free to contact us, if you have any questions left!

    Kind regards,
    2 Fly Dreams
     
    Quatum1000 likes this.
  36. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    @2FlyDreams: Thank you for the help! I finally got it to work! :D:D:D

     
    ledshok likes this.
  37. fahd

    fahd

    Joined:
    Aug 7, 2014
    Posts:
    31
    First thank u for the great work, I bought this plugin but the documentation is not clear at all.
    I want the user to draw on a picture he uploads using the pen tool is this doable in this plugin.
    if yes can u please guide me thru that.
     
  38. 2FlyDreams

    2FlyDreams

    Joined:
    Oct 18, 2013
    Posts:
    42
    Dear fahd,

    Thank you for submitting your questions to 2 Fly Dreams.

    Yes, it is possible. You need to put mesh (for example Unity Plane with your texture’s material) after Dream Paint GameObjects in 3D space, so it will look like you are painting on the texture. After all, you can use Unity RenderTexture and save it. We suggest you to use Dream Paint Painting Demo, because many painting features are implanted there. Additionally in version 2.3, you will be able to paint directly on the texture of mesh, and there will be no need in such workaround.

    Feel free to contact us, if you have any questions left!

    Kind regards,
    2 Fly Dreams
     
  39. fahd

    fahd

    Joined:
    Aug 7, 2014
    Posts:
    31
    thanks for your replay i have another thing i'm trying to do but i couldn't do it. What i need is to create something like the pen tool in photoshop but MUCH simpler.
    example : user start adding points and every time u add new point it connected with the previous point with line between them then when u click the first point u create it become one shape then u can color it

    Thank you so much for the awesome work you guys doing :) .
     

    Attached Files:

    • pen.png
      pen.png
      File size:
      21.9 KB
      Views:
      1,054
  40. 2FlyDreams

    2FlyDreams

    Joined:
    Oct 18, 2013
    Posts:
    42
    Dear fahd,

    Thank you for submitting your questions to 2 Fly Dreams.

    Use the Line Pen with the Change_Joins method. Create a new array or list for positions of touches, when it changes then pass it to the Positions method. When user will touch the first position: 1) add it to the array and pass to the Positions method, as usual; 2) In the Change_Joins method set the Last parameter (it is named LAST, not the last parameter) to true, so it will fill the join between the first and last segment; 3) In the Change_Color set a color. Additionaly if you want to visualize positions, use the Points Pen and pass the array to it too.

    Feel free to contact us, if you have any questions left!

    Kind regards,
    2 Fly Dreams
     
    Quatum1000 likes this.
  41. Quatum1000

    Quatum1000

    Joined:
    Oct 5, 2014
    Posts:
    889
    Hi again,
    is it possible to draw antialiased line in a EditorWindow too? If yes, did you have a example how to ?
    Thanks and kind regards
     
  42. 2FlyDreams

    2FlyDreams

    Joined:
    Oct 18, 2013
    Posts:
    42
    Dear Quatum1000,

    Thank you for submitting your questions to 2 Fly Dreams.

    You can use one cheap and easy trick. Create a texture where pixels in the middle are not transparent, while pixels at the top and at the bottom are transparent (attached example). Use material with the texture above and, for example, with transparent unlit shader.

    Feel free to contact us, if you have any questions left!

    Kind regards,
    2 Fly Dreams
     

    Attached Files:

    Quatum1000 likes this.
  43. Quatum1000

    Quatum1000

    Joined:
    Oct 5, 2014
    Posts:
    889
    I mean into a 2D window like Inspector. Would that be possible with a shader too?
    Then I need a line algorhythm anyway?
    Thanks a lot!
     
  44. 2FlyDreams

    2FlyDreams

    Joined:
    Oct 18, 2013
    Posts:
    42
    Dear Quatum1000,

    Thank you for submitting your questions to 2 Fly Dreams.

    Yes, the above method will work if you use the Dream Paint Editor type of painting, as usual, no another algorithm is not needed.

    Feel free to contact us, if you have any questions left!

    Kind regards,
    2 Fly Dreams
     
    Quatum1000 likes this.
  45. Mooshoo-Labs

    Mooshoo-Labs

    Joined:
    Aug 21, 2014
    Posts:
    20
    @2FlyDreams, I really like the changes you've done in the latest version. I have one question though, in the editor I am able to set the positions of a line's shape to an empty array in order to temporarly hide it, but this does't work on iOS. What would you recommend as the best solution to hide a shape?

    Thanks,
    Chai
     
  46. 2FlyDreams

    2FlyDreams

    Joined:
    Oct 18, 2013
    Posts:
    42
    Dear Mooshoo Labs,

    Thank you for submitting your questions to 2 Fly Dreams.

    You set new empty array with the Positions method and after that do you raise the Draw method? It should definitely work, if it doesn’t work than can you share your code with us? Besides, instead passing empty array to the Positions method, it is better to use the Positions_Clear method, because it is faster. There are many other ways to hide shape. For example, if shader uses vertexes colors than you can use the Change_Color method with zero alpha color, or you can use the Change_Width method with value close to zero etc.

    Feel free to contact us, if you have any questions left!

    Kind regards,
    2 Fly Dreams
     
  47. Quatum1000

    Quatum1000

    Joined:
    Oct 5, 2014
    Posts:
    889
    Hi Again,

    would it be possible to draw a smooth antialaised line like this in a EditorWindow?
    Untitled-1.jpg

    Thanks and kind regards,
     
  48. 2FlyDreams

    2FlyDreams

    Joined:
    Oct 18, 2013
    Posts:
    42
    Dear Quatum1000,

    Thank you for submitting your questions to 2 Fly Dreams.

    Yes, here we are painting a line in the Unity Editor Window using the Dream Paint (attached 2 screenshots). One is a default line and another one is the line with the method above.

    Feel free to contact us, if you have any questions left!

    Kind regards,
    2 Fly Dreams
     

    Attached Files:

    Quatum1000 likes this.
  49. hahasora

    hahasora

    Joined:
    Aug 6, 2015
    Posts:
    2
    Hello 2 Fly Dreams,

    i have a problem , about Create_Canvas.

    i according PDF instructions change directive “#undef CANVAS” to “#define CANVAS”

    but,when i change directive “#undef CANVAS” to “#define CANVAS” . it w'll error

    Code (CSharp):
    1. #define CANVAS
    2.  
    3. using UnityEngine;
    4. using System.Collections;
    5. using DreamPaint;
    6.  
    7. public class _Canvas : MonoBehaviour {
    8.     #region Variables
    9.  
    10.     public Material matWoodDot;
    11.     public Material matWoodLine;
    12.     public Material matWoodCaps;
    13.  
    14.     Lines lines;
    15.  
    16.     #endregion
    17.  
    18.     void Start(){
    19. #if CANVAS
    20.         #region Lines
    21.  
    22.         Vector2[] positions2 = new Vector2[] { new Vector2(0f, 0f), new Vector2(5f, 0f) };
    23.         Lines.Create_Canvas(ref lines, "Lines", "Canvas");
    24.         lines.Apply_Material(matWoodLine);
    25.         lines.Apply_Material_Caps(matWoodCaps);
    26.         lines.Change_Calculations(true, true);
    27.         lines.Positions(0, positions2);
    28.         lines.Change_Caps(0, Cap.Left, Cap.Right);
    29.         lines.Draw_Canvas();
    30.  
    31.         #endregion
    32.  
    33. #endif
    34.     }
    35. }
    my error message.

    Assets/Dream Paint/Examples/Code/Canvas/_Canvas.cs(23,15): error CS0117: `DreamPaint.Lines' does not contain a definition for `Create_Canvas'

    Assets/Dream Paint/Examples/Code/Canvas/_Canvas.cs(29,15): error CS1061: Type `DreamPaint.Lines' does not contain a definition for `Draw_Canvas' and no extension method `Draw_Canvas' of type `DreamPaint.Lines' could be found (are you missing a using directive or an assembly reference?)


    please help me,thank

    i'm novice

     
  50. 2FlyDreams

    2FlyDreams

    Joined:
    Oct 18, 2013
    Posts:
    42
    Dear hahasora,

    Thank you for submitting your questions to 2 Fly Dreams.

    It's our example class and you have changed here right, but have you made the same change in the DreamPaint.cs?

    Feel free to contact us, if you have any questions left!

    Kind regards,
    2 Fly Dreams