Search Unity

[RELEASED] Grease Pencil for Unity

Discussion in 'Assets and Asset Store' started by Wahooney, Oct 17, 2018.

  1. Wahooney

    Wahooney

    Joined:
    Mar 8, 2010
    Posts:
    281
    Hi all,

    I've just released Grease Pencil for Unity, a scene and object annotation tool.

    You can use it to plan out levels, create stand-in (programmer o_O) art, leave notes for level designers and a whole bunch of stuff I haven't even thought of yet.


    Basic features
    • Create one or more Grease Pencil canvases per gameObject.
    • Each canvas can have multiple layers with different rendering options
    • Process your strokes with experimental tools like Smooth, Tighten and Optimize
    • Grease Pencil will even render in your game scene and can be used as final artwork.
    • Because canvases are attached to gameObjects, Grease Pencil is compatible with prefabs.

    History
    • v1.1.1
      • Improved 2019.x support
      • Added SRP Support (if drawings are missing after switching to SRP, reload your scene)
    • v1.1 (PREVIEW) - Added modifier stack with Smooth, Tighten, Optimize, Normalize, Sketch and Connect modifiers, more to come.
    • Try run-time drawing and stroke serialization: https://wahooney.itch.io/grease-pencil-run-time-demo


    Roadmap
    • Scatter objects along grease pencil strokes
    • Edit / Sculpt strokes
    • Variable stroke width
    • Grease Pencil to Geometry: create vines, pipes, hoses, viper pits. (Combine with scatter for cool effects)
    • Post-stroke modifiers (smooth, tighten, noise)
    • Stroke processors (lazy mouse, coil, etc.)
    Bluesky Roadmap
    • Draw in UI space, ie. draw UI elements (including 9-slice like support), make UI wireframes, etc.
    • Text support - Instead of writing type and premade (or custom!) glyphs will be baked down to grease pencil strokes.
    • Textured Strokes - Stretch a texture along each stroke
    • Run-time drawing and saving
    • Non-destructive layer modifiers (smooth, tighten, optimize, noise, etc.)
    Let me know what you think.

    Cheers,
     
    Last edited: Jul 25, 2019
    Mauri likes this.
  2. Cascho01

    Cascho01

    Joined:
    Mar 19, 2010
    Posts:
    1,347
    Very cool, will work in runtime, too?
     
    zyzyx likes this.
  3. Wahooney

    Wahooney

    Joined:
    Mar 8, 2010
    Posts:
    281
    Yes, you can. There is a bug in the live version that prevents it from rendering in run-time, but the fix has been submitted for review and the updated version should be available on the Asset Store shortly.

    Just note that you have to specifically allow each canvas to render to the game camera and you can't draw at run-time, but I may make that possible if its requested.

    I'm also toying with Flash-style key-frame animations, I'm just figuring out how to do that in a friendly way for artists/designers to use.
     
  4. Cascho01

    Cascho01

    Joined:
    Mar 19, 2010
    Posts:
    1,347
    Sorry, yes, I meant is it possible to draw in runtime?
    I think this would be very interesting but also we´ll very likely want to keep the drawings saved for later reuse after the app gets closed.
     
    Last edited: Oct 18, 2018
  5. Wahooney

    Wahooney

    Joined:
    Mar 8, 2010
    Posts:
    281
    That's definitely possible. I'll add it to my bluesky list :D
     
    zyzyx and Kubic75 like this.
  6. Wahooney

    Wahooney

    Joined:
    Mar 8, 2010
    Posts:
    281
    So, I've added a per layer modifier stack to Grease Pencil, which runs as you draw and is easily extended with a simple API.

    You can see it in action here:

    Let me know what you think!
     
  7. imaginationrabbit

    imaginationrabbit

    Joined:
    Sep 23, 2013
    Posts:
    349
    This looks really great! Are you going to release a version for 2017.x or are there new features in 2018.2.11+ this asset needs to function? Thanks-
     
  8. Wahooney

    Wahooney

    Joined:
    Mar 8, 2010
    Posts:
    281
    [12:57] I don't know... let me check...
    [12:59] Got some compiler errors, seems Editor API has changed a bit, but not hugely.
    [13:10] Compiler errors gone... Testing.
    [13:12] Shader API has changed a bit too... Fixing.
    [13:13] Shader Fixed, minor issue... Testing.
    [13:21] Looking good.
    [13:23] Run-time drawings working too (oops, shouldn't have said that, it's a seeeecret!)
    [13:26] Grease Pencil 1.1 (releasing soon) will support 2017 LTS

    I hope you enjoyed my LIVE feedback.
     
  9. imaginationrabbit

    imaginationrabbit

    Joined:
    Sep 23, 2013
    Posts:
    349
    Nice ^_^ I will be purchasing it now- thank you
     
  10. Wahooney

    Wahooney

    Joined:
    Mar 8, 2010
    Posts:
    281
    Last edited: Dec 5, 2018
    zyzyx likes this.
  11. Cascho01

    Cascho01

    Joined:
    Mar 19, 2010
    Posts:
    1,347
    Uuh, yes, that´s definitively cool! :)
    I also asked for a way to save the drawing so we can reload it after restarting the app... o_O ;)
     
  12. Wahooney

    Wahooney

    Joined:
    Mar 8, 2010
    Posts:
    281
    Do you want to try it for yourself? https://wahooney.itch.io/grease-pencil-run-time-demo

    Draw something and refresh your browser :D o_O ;) I recommend Firefox if you can, Chrome WebGL is pretty slow.
     
    Cascho01 likes this.
  13. Cascho01

    Cascho01

    Joined:
    Mar 19, 2010
    Posts:
    1,347
    So, this means data are kind of persistant? Would you explain a bit more in detail about this?
    For example the stored fileformat (txt, json, xml,..).
     
  14. Wahooney

    Wahooney

    Joined:
    Mar 8, 2010
    Posts:
    281
    It's JSON, that example just stores it into PlayerPrefs, if you want it to store it somewhere else it's as easy as reading and writing text to the file of your choice.

    Cool thing is that GP1.1 has layer modifiers and the serialization system serializes those too.
     
    Cascho01 likes this.
  15. Cascho01

    Cascho01

    Joined:
    Mar 19, 2010
    Posts:
    1,347
    Perfect!
    A lot of data?
     
  16. Wahooney

    Wahooney

    Joined:
    Mar 8, 2010
    Posts:
    281
    It's not too bad, data wise.
    I may implement a binary format sometime in the future.
     
  17. thatscraigz

    thatscraigz

    Joined:
    Mar 27, 2015
    Posts:
    100
    Hi @Wahooney ! :D

    DUDE! I've been searching all over for a tool like this - I bought it a while back (but then had to wait to upgrade my project to 2018... :p) and am in love so far.

    Only catch is for the project I'm working on now, a lot of it very straight lines - and usually when I would block in levels before this in illustrator/photoshop I would use the pen tool or straight brush strokes. Is there any way you could add this sort of functionality? Where if you hold a modifier button it draws a preview line to wherever your cursor is, then when you click it commits to draws it? (Or alternate is similar to photoshop where you click for first point somewhere, then hold shift and click again to draw straight line)

    Hope this makes sense, not sure what sort of a PS/AI background you have xD



    Thanks for making a rad tool! Though I wish there was a more broad term to name it, because grease pencil just sounds so niche :p

    -craigz
     
    Wahooney likes this.
  18. Wahooney

    Wahooney

    Joined:
    Mar 8, 2010
    Posts:
    281
    I'll see what I can do about that, I want to add tools like straight lines, polygons, circles, etc. so this would basically be an open poly.

    Glad you're enjoying it otherwise.
     
  19. thatscraigz

    thatscraigz

    Joined:
    Mar 27, 2015
    Posts:
    100
    Heck yeah @Wahooney ! You're right :D I wasnt sure what your background was, so didn't want to throw jargon at you :p but HEY! You named it grease pencil so I should have guessed... :p

    So, yes! Open poly would be excellent! And I would it or even lines would be hugely beneficial over even just other primitive shapes as a priority :)

    Thanks for responding!
     
  20. Ccrawler

    Ccrawler

    Joined:
    Feb 8, 2017
    Posts:
    9
    Hey there, just bought this and it's a MARVEL. I'm usually using it to sketch the levels of my 2d game with placeholder art, so I can test each room as I draw it. I'm more of an artist than a developer so this workflow is insanely good for me:

    upload_2019-6-14_0-59-18.png

    One question: is there any way to save what you draw in playmode?? That would be really helpful!
     
  21. thatscraigz

    thatscraigz

    Joined:
    Mar 27, 2015
    Posts:
    100
    Is there any way to add colliders to these lines @Wahooney ? I know it's probably asking quite a bit... but I didnt know if I was potentially missing some awesome functionality :p
     
  22. thatscraigz

    thatscraigz

    Joined:
    Mar 27, 2015
    Posts:
    100
    Just wanted to do a friendly bump to @Wahooney on this real quick :D
     
  23. Wahooney

    Wahooney

    Joined:
    Mar 8, 2010
    Posts:
    281
    Hi!
    Sorry for the radio silence, work and life is a rollercoaster right now.

    You absolutely can add colliders to your strokes!
    First, check out this demo: https://wahooney.itch.io/grease-pencil-run-time-demo
    That adds colliders as you draw at runtime :D

    Just add the Build 2D Edges component and it'll add edge colliders along your strokes.

    Hope this helps.
     
  24. Wahooney

    Wahooney

    Joined:
    Mar 8, 2010
    Posts:
    281
    UPDATE!!!

    Grease Pencil has been updated (v1.1.1) to include better 2019.x support and support for SRP*. It's a small but important update (big update is coming!)

    * If your project started with the legacy renderer, you've switched to SRP, and the drawings are missing, either reload your scene or disable/enable the offending Grease Pencil Canvasses and the problem will go away as if by magic.
     
    Last edited: Jul 25, 2019
    tcmeric likes this.
  25. thatscraigz

    thatscraigz

    Joined:
    Mar 27, 2015
    Posts:
    100
    @Wahooney

    Thanks for the update, super useful! :D

    Also for the colliders, is there a way to do this in editor instead of runtime? Or a way to generate it at start on runtime to prior sketches? I'm using the plugin to block in level layouts, so being able to add colliders to those sketches would just be SO useful.

    Hope life hasn't been TOO crazy :D

    best,
    craigz
     
  26. thatscraigz

    thatscraigz

    Joined:
    Mar 27, 2015
    Posts:
    100
    @Wahooney
    Just a friendly bump on the above :D

    thanks!
    craigz
     
  27. nielsdielen

    nielsdielen

    Joined:
    Jul 26, 2019
    Posts:
    2
    Hey Ccrawler I've been looking at this addon for that same reason, is there any way you could show me a bit of your progress with this workflow? I would like to see a bit more before buying the addon :D

    Thanks in advance!
     
  28. Wahooney

    Wahooney

    Joined:
    Mar 8, 2010
    Posts:
    281
    Life is pretty crazy right now, but I want to get some tutorials out ASAP, but what you want should be pretty simple and possible in the current modifier, but for the life of me can't recall how right now (see: life = crazy :p)

    I'm aiming to start producing some short tutorials in this month, but we'll see what life says.
     
    zyzyx likes this.
  29. Wahooney

    Wahooney

    Joined:
    Mar 8, 2010
    Posts:
    281
    @Ccrawler @nielsdielen This should be totally doable with the serialization system in the project, though will require some custom code, I'll see if I can get to this ASAP, life is a bit crazy at the moment so I have to find time where I can.

    Not to everyone else. It seems something had changed between when I released 1.1.1 and now and HDRP doesn't work anymore, I am looking into a fix for that and will release as soon as I can.

    Cheers.
     
  30. thatscraigz

    thatscraigz

    Joined:
    Mar 27, 2015
    Posts:
    100
    Thanks for the follow up @Wahooney ! It means a lot to us

    Hopefully life let's up (just a little bit) and until then... *I raise my lukewarm cup of coffee to you*

    best,
    craigz
     
    Wahooney likes this.
  31. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,527
  32. Wahooney

    Wahooney

    Joined:
    Mar 8, 2010
    Posts:
    281
    zyzyx and Lars-Steenhoff like this.
  33. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,527
    keep in kind that pressure on mac is only supported from 2020.1 with the new input system

    https://forum.unity.com/posts/5072666/

    You can keep backward compatability if you use if editor version in the code.
     
    Last edited: Oct 17, 2019
  34. Dadoosh

    Dadoosh

    Joined:
    Feb 23, 2018
    Posts:
    1
    Hi @Wahooney

    I'm interested in buying this asset for a project, and I wanted to know if the runtime painting was released on the official version, since I didn't see anything about it in the previous update note.

    I also wanted to know if there's some special requirements to make this tool work.

    Thanks !
     
  35. SillyBilly

    SillyBilly

    Joined:
    Jul 5, 2011
    Posts:
    63
    Hey @Wahooney, this is a great plugin, bought it last week and played about with it in Unity 2019.2 and it works great. However, I see it doesn't work with 2019.3 or higher. Are you still supporting this plugin? Do you have any plans to update it to support newer versions of Unity?
     
  36. thatscraigz

    thatscraigz

    Joined:
    Mar 27, 2015
    Posts:
    100
    Just a friendly bump @Wahooney from what @SillyBilly is saying I'm in 2019.4.16 and not working here either. Absolutely love this tool, any chance at a patch pleeeeease?
     
  37. pikifou

    pikifou

    Joined:
    Jan 6, 2015
    Posts:
    3
    Hi there,

    I love Greasepencil but I have troubles on new Unity versions.
    Now there is an offset when I draw. Here is a "screenshot", the cursor is where I click, the black dot is where it draws.
    Anyone else with the same issue? (and a potential fix?)

    upload_2021-8-9_14-45-31.png
     
  38. dock

    dock

    Joined:
    Jan 2, 2008
    Posts:
    605
    Code (CSharp):
    1. Unable to find style 'VisibilityToggle' in skin 'DarkSkin' Layout
    2. UnityEngine.GUIStyle:op_Implicit (string)
    3. GreasePencil.GreasePencilEditor:DrawLayerElement (UnityEngine.Rect,int,bool,bool) (at Assets/GreasePencil/Code/Editor/GreasePencilEditor.cs:134)
    4. UnityEditorInternal.ReorderableList:DoListElements (UnityEngine.Rect,UnityEngine.Rect)
    5. UnityEditorInternal.ReorderableList:DoLayoutList ()
    6. GreasePencil.GreasePencilEditor:OnInspectorGUI () (at Assets/GreasePencil/Code/Editor/GreasePencilEditor.cs:323)
    7. UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
    8.  
    9. Unable to find style 'VisibilityToggle' in skin 'DarkSkin' repaint
    10. UnityEngine.GUIStyle:op_Implicit (string)
    11. GreasePencil.GreasePencilEditor:DrawLayerElement (UnityEngine.Rect,int,bool,bool) (at Assets/GreasePencil/Code/Editor/GreasePencilEditor.cs:134)
    12. UnityEditorInternal.ReorderableList:DoListElements (UnityEngine.Rect,UnityEngine.Rect)
    13. UnityEditorInternal.ReorderableList:DoLayoutList ()
    14. GreasePencil.GreasePencilEditor:OnInspectorGUI () (at Assets/GreasePencil/Code/Editor/GreasePencilEditor.cs:323)
    15. UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
    16.  
    17. Unable to find style 'VisibilityToggle' in skin 'DarkSkin' TouchDown
    18. UnityEngine.GUIStyle:op_Implicit (string)
    19. GreasePencil.GreasePencilEditor:DrawLayerElement (UnityEngine.Rect,int,bool,bool) (at Assets/GreasePencil/Code/Editor/GreasePencilEditor.cs:134)
    20. UnityEditorInternal.ReorderableList:DoListElements (UnityEngine.Rect,UnityEngine.Rect)
    21. UnityEditorInternal.ReorderableList:DoLayoutList ()
    22. GreasePencil.GreasePencilEditor:OnInspectorGUI () (at Assets/GreasePencil/Code/Editor/GreasePencilEditor.cs:323)
    23. UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
    24.  
    25. Unable to find style 'VisibilityToggle' in skin 'DarkSkin' mouseDown
    26. UnityEngine.GUIStyle:op_Implicit (string)
    27. GreasePencil.GreasePencilEditor:DrawLayerElement (UnityEngine.Rect,int,bool,bool) (at Assets/GreasePencil/Code/Editor/GreasePencilEditor.cs:134)
    28. UnityEditorInternal.ReorderableList:DoListElements (UnityEngine.Rect,UnityEngine.Rect)
    29. UnityEditorInternal.ReorderableList:DoLayoutList ()
    30. GreasePencil.GreasePencilEditor:OnInspectorGUI () (at Assets/GreasePencil/Code/Editor/GreasePencilEditor.cs:323)
    31. UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
    32.  
    33. Unable to find style 'VisibilityToggle' in skin 'DarkSkin' mouseDrag
    34. UnityEngine.GUIStyle:op_Implicit (string)
    35. GreasePencil.GreasePencilEditor:DrawLayerElement (UnityEngine.Rect,int,bool,bool) (at Assets/GreasePencil/Code/Editor/GreasePencilEditor.cs:134)
    36. UnityEditorInternal.ReorderableList:DoListElements (UnityEngine.Rect,UnityEngine.Rect)
    37. UnityEditorInternal.ReorderableList:DoLayoutList ()
    38. GreasePencil.GreasePencilEditor:OnInspectorGUI () (at Assets/GreasePencil/Code/Editor/GreasePencilEditor.cs:323)
    39. UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
    40.  
    41. Unable to find style 'VisibilityToggle' in skin 'DarkSkin' TouchUp
    42. UnityEngine.GUIStyle:op_Implicit (string)
    43. GreasePencil.GreasePencilEditor:DrawLayerElement (UnityEngine.Rect,int,bool,bool) (at Assets/GreasePencil/Code/Editor/GreasePencilEditor.cs:134)
    44. UnityEditorInternal.ReorderableList:DoListElements (UnityEngine.Rect,UnityEngine.Rect)
    45. UnityEditorInternal.ReorderableList:DoLayoutList ()
    46. GreasePencil.GreasePencilEditor:OnInspectorGUI () (at Assets/GreasePencil/Code/Editor/GreasePencilEditor.cs:323)
    47. UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
    48.  
    49. Unable to find style 'VisibilityToggle' in skin 'DarkSkin' mouseUp
    50. UnityEngine.GUIStyle:op_Implicit (string)
    51. GreasePencil.GreasePencilEditor:DrawLayerElement (UnityEngine.Rect,int,bool,bool) (at Assets/GreasePencil/Code/Editor/GreasePencilEditor.cs:134)
    52. UnityEditorInternal.ReorderableList:DoListElements (UnityEngine.Rect,UnityEngine.Rect)
    53. UnityEditorInternal.ReorderableList:DoLayoutList ()
    54. GreasePencil.GreasePencilEditor:OnInspectorGUI () (at Assets/GreasePencil/Code/Editor/GreasePencilEditor.cs:323)
    55. UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
    56.  
    57. Unable to find style 'VisibilityToggle' in skin 'DarkSkin' Used
    58. UnityEngine.GUIStyle:op_Implicit (string)
    59. GreasePencil.GreasePencilEditor:DrawLayerElement (UnityEngine.Rect,int,bool,bool) (at Assets/GreasePencil/Code/Editor/GreasePencilEditor.cs:134)
    60. UnityEditorInternal.ReorderableList:DoListElements (UnityEngine.Rect,UnityEngine.Rect)
    61. UnityEditorInternal.ReorderableList:DoLayoutList ()
    62. GreasePencil.GreasePencilEditor:OnInspectorGUI () (at Assets/GreasePencil/Code/Editor/GreasePencilEditor.cs:323)
    63. UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
    64.  
    65. Unable to find style 'VisibilityToggle' in skin 'DarkSkin' KeyDown
    66. UnityEngine.GUIStyle:op_Implicit (string)
    67. GreasePencil.GreasePencilEditor:DrawLayerElement (UnityEngine.Rect,int,bool,bool) (at Assets/GreasePencil/Code/Editor/GreasePencilEditor.cs:134)
    68. UnityEditorInternal.ReorderableList:DoListElements (UnityEngine.Rect,UnityEngine.Rect)
    69. UnityEditorInternal.ReorderableList:DoLayoutList ()
    70. GreasePencil.GreasePencilEditor:OnInspectorGUI () (at Assets/GreasePencil/Code/Editor/GreasePencilEditor.cs:323)
    71. UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
    72.  
    73. Unable to find style 'VisibilityToggle' in skin 'DarkSkin' keyUp
    74. UnityEngine.GUIStyle:op_Implicit (string)
    75. GreasePencil.GreasePencilEditor:DrawLayerElement (UnityEngine.Rect,int,bool,bool) (at Assets/GreasePencil/Code/Editor/GreasePencilEditor.cs:134)
    76. UnityEditorInternal.ReorderableList:DoListElements (UnityEngine.Rect,UnityEngine.Rect)
    77. UnityEditorInternal.ReorderableList:DoLayoutList ()
    78. GreasePencil.GreasePencilEditor:OnInspectorGUI () (at Assets/GreasePencil/Code/Editor/GreasePencilEditor.cs:323)
    79. UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
    80.  
    81.  
    I just bought this and it's pretty broken.
    I can't add colours, and drawing is broken in most of the modes.
    I'm having a lot of errors with Unity 2021.1, and I'm encountering the offset problem seens by @pikifou.
    I emailed the devs but I don't have much hope.