Search Unity

  1. Are you interested in providing feedback directly to Unity teams? Sign up to become a member of Unity Pulse, our new product feedback and research community.
    Dismiss Notice

[Released] PaintCraft (Multiplatform coloring book & drawing app constructor)

Discussion in 'Assets and Asset Store' started by nicloay, May 17, 2016.

  1. prasanth-akon

    prasanth-akon

    Joined:
    May 30, 2013
    Posts:
    16
    Okay, Thanks for your reply. If I want to make this feature myself, Can you guide me on where to look for specifically?
    I tried to implement it by reading the alpha value of the render texture, but it doesn't work as intended.
    Thanks.
     
  2. diccuric

    diccuric

    Joined:
    Jan 23, 2015
    Posts:
    6
    How to I can change Region size and position?
     
  3. nicloay

    nicloay

    Joined:
    Jul 11, 2012
    Posts:
    515
    Hello.
    By default bg render texture contains alpha = 1 everywhere, so you should change rendering process on swatch and everywhere.

    Maybe the easiest option to compare both with alpha, but with white color?
    Please take a look at how the icon generated - it uses r/w texture2d in the process and it's also downscaled so you can iterate over pixels there.

    Hope this helps.
     
  4. nicloay

    nicloay

    Joined:
    Jul 11, 2012
    Posts:
    515
    Sorry, could you elaborate more please, I don't understand the question. Thanks
     
  5. diccuric

    diccuric

    Joined:
    Jan 23, 2015
    Posts:
    6
    I need to make fullscreen canvas and scale outline and region layers from ColoringPageConfig, but i want to save scale ratio
     
  6. cdr9042

    cdr9042

    Joined:
    Apr 22, 2018
    Posts:
    83
  7. Jakob

    Jakob

    Joined:
    Sep 29, 2011
    Posts:
    41
    Hello, I am having issues with scrollviews when using Paintcraft. I'm guessing it has to do something with Paintcraft overriding the input module. Is this known or am i missing something?

    Note: I'm using the new beta I got from you.
     
  8. boroskoyo

    boroskoyo

    Joined:
    Sep 6, 2018
    Posts:
    3
    Hello, I've recently found out that you have published a newer 2020 version of the asset. Is it any different than the one that is included in the lunar new year bundle?
     
  9. nicloay

    nicloay

    Joined:
    Jul 11, 2012
    Posts:
    515
    Hello. There is no such functionality in the project. but I'll think maybe I'll develop plugin for that
     
  10. nicloay

    nicloay

    Joined:
    Jul 11, 2012
    Posts:
    515
    If this is in the gallery - not in the drawing please check that UI elements have RaycastTarget checked
     
  11. nicloay

    nicloay

    Joined:
    Jul 11, 2012
    Posts:
    515
    Everyone who purchased the plugin after ~ December 6 has a free upgrade to the 2020 version. I'm sorry I was working hard to make the new release before the lunar new year so I didn't have time to make proper anoncement. I'll do that soon.
     
    boroskoyo likes this.
  12. nicloay

    nicloay

    Joined:
    Jul 11, 2012
    Posts:
    515
    In 2020 version you can create pageconfig runtime. so before opening paintcraft canvas with page config you can use Graphic.Blit to scale and copy texture with required aspect.
     
  13. univema1

    univema1

    Joined:
    Mar 20, 2019
    Posts:
    2
    hi sir , i have probleme in ios . in unity editor all is ok but when i build my game in xcode "PatternBrush region support " not working
     
  14. tswiggs

    tswiggs

    Joined:
    Mar 13, 2014
    Posts:
    3

    I would really like to take advantage of this feature for online multiplayer but your documentation website is throwing a CNAME Cross-User Banned error. Can you make this documentation available again?
     
  15. rmezatang63

    rmezatang63

    Joined:
    Jan 15, 2021
    Posts:
    1
    I got this on the Lunar New Year Bundle but can't add a new Coloring Page in the Coloring Book demo. I followed the quickstart instructions but when I go to link to the icon/outline/region png files, the box in Inspector disappears (or does not accept the file). For testing, I tried linking to pre-existing pngs (Bear files) and I got the same result so the error is not with the file. Aside from that, there are 999+ errors logged when I run the demo in Unity 2019.4.18f1
     
  16. dcagemodels

    dcagemodels

    Joined:
    Nov 26, 2018
    Posts:
    3
    when i add my own images i get this error any help please? @nicloay
     

    Attached Files:

  17. cdr9042

    cdr9042

    Joined:
    Apr 22, 2018
    Posts:
    83
    @nicloay I created my own PageConfig, created 3 images (outline, regions, icon) in StreamingAssets/PaintCraft.DemoPages folder, then write the path in the PageConfig file. I was able to color the picture in Coloring Book. However, I made some change to the regions and outline files and now I get this error when I try to open the picture to color. And the ColoringBook won't work. How do I fix it?

    Code (CSharp):
    1. UnityException: LoadRawTextureData: not enough data provided (will result in overread).
    2. UnityEngine.Texture2D.LoadRawTextureData (System.Byte[] data) (at <2feaf16e80004e0cadae3f2e05f2a3fa>:0)
    3. PaintCraft.Canvas.Configs.PersistentPath.GetTexture (PaintCraft.TextureSaveFormat saveFormat, UnityEngine.Vector2Int size, UnityEngine.TextureFormat format, UnityEngine.FilterMode filterMode, System.Boolean markNonReadable) (at <1323d4b9f8a945439bff604e90a9322d>:0)
    4. PaintCraft.Canvas.Configs.PageConfig.LoadUserChanges () (at <1323d4b9f8a945439bff604e90a9322d>:0)
    5. PaintCraft.Canvas.Configs.PageConfigSO.LoadUserChanges () (at <1323d4b9f8a945439bff604e90a9322d>:0)
    6. PaintCraft.Canvas.Configs.Extensions.HasSavedUserChanges (PaintCraft.Canvas.Configs.IPageConfig pageConfig, UnityEngine.Texture& texture) (at <1323d4b9f8a945439bff604e90a9322d>:0)
    7. PaintCraft.Controllers.CanvasController.LoadFromDiskOrClear () (at <1323d4b9f8a945439bff604e90a9322d>:0)
    8. PaintCraft.Controllers.CanvasController+<DoSetActivePageConfig>d__41.MoveNext () (at <1323d4b9f8a945439bff604e90a9322d>:0)
    9. UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <2feaf16e80004e0cadae3f2e05f2a3fa>:0)
    10. UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
    11. PaintCraft.Controllers.CanvasController:SetActivePageConfig(IPageConfig)
     
  18. cdr9042

    cdr9042

    Joined:
    Apr 22, 2018
    Posts:
    83
    By the way, can I get access to the source code? It seems all the scripts are inside a .dll file
     
    Zamaroht likes this.
  19. Slashbot64

    Slashbot64

    Joined:
    Jun 15, 2020
    Posts:
    47
    Any support for the Stylus pen on the Android? specifically if the pen button has been used? Not sure if it is something that is supported in Unity input or new input stuff,, or possible to support at it all?
     
  20. dcagemodels

    dcagemodels

    Joined:
    Nov 26, 2018
    Posts:
    3
    nicloay likes this.
  21. unity_I4V8h1W3_mZ2QQ

    unity_I4V8h1W3_mZ2QQ

    Joined:
    Nov 16, 2020
    Posts:
    2
    @nicloay
    Hello Nikolay! Thank you very much for this asset. There is one question: "As I understand it, the last changes are saved thanks to SaveFilePath. The question is, thanks to which method is the transition to the last change, since I would like to make indexing for each new save?" Having tried to index each time a new file is created, but it cannot return the current result in any way (although if you output through an array of bytes from the file's save directory, then it is visible)

    Code (CSharp):
    1.      string SaveFilePath
    2.         {
    3.            
    4.             get
    5.             {
    6.              
    7.                 return Path.Combine( SaveDirectory ,PageConfig.UniqueId + index + ".jpg");
    8.                
    9.             }
    10.         }
    Code (CSharp):
    1.         public string IconSavePath
    2.         {
    3.             get
    4.             {
    5.                 string dir = Path.Combine( Application.persistentDataPath , "icons");
    6.                 if (!Directory.Exists(dir))
    7.                 {
    8.                    
    9.                     Directory.CreateDirectory(dir);
    10.                 }
    11.                
    12.                 return Path.Combine(dir, UniqueId  + CanvasController.index + ".jpg");
    13.             }
    14.         }
     
  22. unity_RpqFr-ldnLHphg

    unity_RpqFr-ldnLHphg

    Joined:
    Feb 16, 2021
    Posts:
    3
    Hi!
    I just want to know can I create custom brushes using this plugin.
    Like I want to create Glitter , Water Color or Pastel Color.
    Can I create anything like that by changing brush material and shaders?
     
  23. jpchauhan

    jpchauhan

    Joined:
    Jul 22, 2017
    Posts:
    3
    @nicloay
    I want know that when and how the outline and region textures are released from memory?
    I am facing memory leak problem due to these textures as I found that in memory profiler.
     
  24. MrFigment

    MrFigment

    Joined:
    Jan 5, 2017
    Posts:
    27
    hi @nicloay , how can I draw on a raw image, I can only do it if I lower the transparency of the raw image, but it is not the best method
     

    Attached Files:

  25. saadneox

    saadneox

    Joined:
    Oct 26, 2016
    Posts:
    5
    Hello @nicloay i wish you can help me add Anti-alising in TiledRegion Shader because this one makes textures over sharper and i loose the edges lines
     
  26. nicloay

    nicloay

    Joined:
    Jul 11, 2012
    Posts:
    515
    Hello. Just checked again on new version 1.0.1 this bug is not reproducible
     
  27. nicloay

    nicloay

    Joined:
    Jul 11, 2012
    Posts:
    515
    documentation is also available by this link but it's for previous version
     
  28. nicloay

    nicloay

    Joined:
    Jul 11, 2012
    Posts:
    515
    New version doesn't have popup to select textures, as it uses StreamingAssets folder (so the final size of the build is much much smaller, like 100MB compare to 1GB as textures are stored as plain PNG)

    so the configuration is looks like this (and at the bottom info box you can see where it try to find the region and outline files) upload_2021-6-29_21-21-56.png

    Also make sure that you use latest 2020 version of the package
     
  29. nicloay

    nicloay

    Joined:
    Jul 11, 2012
    Posts:
    515
    Hm.. it looks like the texture is corrupted

    Can you try to open cache folder and clear every file inside. Or does this happens on the device? upload_2021-6-29_21-23-48.png
     
  30. nicloay

    nicloay

    Joined:
    Jul 11, 2012
    Posts:
    515
    For research purpose you can use Rider, it allow to decompile the package. Source code inside DLL is not obfuscated. If you want me to open me some API please let me know.
     
  31. nicloay

    nicloay

    Joined:
    Jul 11, 2012
    Posts:
    515
    I'm sorry but there is no such functionality in default package, you can try to open
    InputController class using Rider, and see how it use brush context to apply lines and dots to the canvas, it could help you to implement your own controller.
     
  32. nicloay

    nicloay

    Joined:
    Jul 11, 2012
    Posts:
    515
    Hello.
    I'm sorry but in default package you can only create
    PageConfig runtime and provide the path where you want to save and the version - so it's possible to save different version of the same image, (like from different sessions) but it's not possible to save different version within one session of the same image
     
  33. nicloay

    nicloay

    Joined:
    Jul 11, 2012
    Posts:
    515
    Hello, yes you have access to the material, but you have to keep in mind that it's blit the result to the canvas as soon as you finished the line, so if you want to make it interactable (glitter with animation) it could be hard with this package. see this https://nicloay.gitbook.io/doc-paintcraft-in/documentation/tool-pipeline
     
  34. nicloay

    nicloay

    Joined:
    Jul 11, 2012
    Posts:
    515
    Hello, sorry for the inconvenience, memory leaks are fixed in the new 1.0.1 version.
     
  35. nicloay

    nicloay

    Joined:
    Jul 11, 2012
    Posts:
    515
    have you tried "draw on existing image" example? the idea is that on clear it blit (copy) the original image to the canvas, and then use standard pipeline to draw lines on top
     
  36. nicloay

    nicloay

    Joined:
    Jul 11, 2012
    Posts:
    515
    Hello. could you provide example, maybe screenshot? I don't think that antialiasing is simply possible. last time when I did it for another project, I applied it to the canvas it self, not the tool. And I'm not sure that it would be easy in default package.
     
  37. Max_VRAB

    Max_VRAB

    Joined:
    Mar 13, 2014
    Posts:
    5
    Hello @nicloay , I am having a problem with the Raw Image Saves (I have send you an email, but don't know where you check more often). In short, I don't want to save the Raw images on my device, because it uses a lot of data, how can I turn this option off?
     
    Last edited: Aug 7, 2021
  38. nicloay

    nicloay

    Joined:
    Jul 11, 2012
    Posts:
    515
    Hello @Max_VRAB

    As I mentioned in the email, you can manually clean PersistentFolder, there is no functionality to disable saving by default in the package.


    But you can also try following ways to create your own page config

    Here is a code for the fully functional page config which saves user changes and generates icon
    https://gist.github.com/nicloay/3a24f8fe16a7794bb80b06b99ef9fd38

    What you can try to do is to create another custom implementation for the page config,
    but make sure that you do NOT implement these interfaces ISaveUserChanges, ISaveUserIcon

    So just remove them from the code above (Line 7), and save that class with another name, then recreate your pages.
    In this case paintcraft core should not trigger saving process
     
  39. egolds

    egolds

    Joined:
    Aug 5, 2021
    Posts:
    1
    By the way, can I get access to the source code? It seems all the scripts are inside a .dll file
     
  40. nicloay

    nicloay

    Joined:
    Jul 11, 2012
    Posts:
    515
    sorry, but there is no source code in public access.
     
  41. EthanHooper1023

    EthanHooper1023

    Joined:
    Jan 19, 2017
    Posts:
    16
    Hello @nicloay, love your project! I have been using it for a while and wanted to update it to the 2020 version but ran into a problem. I want to use the DrawingGameObjectController component and needed to change the line id through code but some of the methods have changed since the previous version. Usually, I would just use your code as a template but they are all secured in the PaintCraft.core dll. I was wondering is there a way for me to edit/get the properties of the DrawingGameObjectController component through script (lineID, line config, input controller, etc)
     
    marioshrist likes this.
  42. marioshrist

    marioshrist

    Joined:
    Nov 18, 2014
    Posts:
    7
    Hello @nicloay, excellent work. I need to create a prefab with a gameobject that has the DrawingGameObjectController. But from the code i cant set the input controller and the paint craft camera, as they need to be referenced from the scene. Do you have any solution for this?
     
    EthanHooper1023 likes this.
  43. jpchauhan

    jpchauhan

    Joined:
    Jul 22, 2017
    Posts:
    3
    Hello @nicloay, I used you asset in my paint app. But for android 11 I am getting so many crash. For other version of Android, It works fine. Any suggestions or way to solve these crashed??

    *** Crash Report ***
    Fatal Exception: java.lang.Error: FATAL EXCEPTION [main]
    Unity version : 2020.1.1f1
    Device model : TECNO MOBILE LIMITED TECNO KF6j
    Device fingerprint: TECNO/KF6j-GL/TECNO-KF6j:11/RP1A.200720.011/210311V363:user/release-keys
    Build Type : Release
    Scripting Backend : IL2CPP
    ABI : arm64-v8a
    Strip Engine Code : true

    Fatal Exception: java.lang.Error
    FATAL EXCEPTION [main] Unity version : 2020.1.1f1 Device model : TECNO MOBILE LIMITED TECNO KF6j Device fingerprint: TECNO/KF6j-GL/TECNO-KF6j:11/RP1A.200720.011/210311V363:user/release-keys Build Type : Release Scripting Backend : IL2CPP ABI : arm64-v8a Strip Engine Code : true

    Caused by java.lang.Error: * * * * * * * * * * * * * * * *
    Version '2020.1.1f1 (2285c3239188)', Build type 'Release', Scripting Backend 'il2cpp', CPU 'arm64-v8a'
    Build fingerprint: 'TECNO/KF6j-GL/TECNO-KF6j:11/RP1A.200720.011/210311V363:user/release-keys'
    Revision: '0'
    ABI: 'arm64'
    Timestamp: 2021-09-09 15:21:43+0530
    pid: 27345, tid: 27499, name: Thread-12 >>> com.paint.pixel.brush.colorifybook.art.relax <<<
    uid: 10539
    signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0x6deb0f71a8
    x0 0000006deaef7168 x1 b400006d09456050 x2 0000000000000007 x3 0000000000000000
    x4 0000000000000000 x5 0000006deabcfcf7 x6 0000000000000000 x7 0000000000000001
    x8 0000006deb0f7168 x9 0000000000000018 x10 0000000000003238 x11 db02000002017118
    x12 0000000000000000 x13 0000000000002016 x14 0000000000000000 x15 0000000000000100
    x16 0000006deaeda648 x17 00000070f7287340 x18 0000006d573d38c0 x19 0000006deaf039d0
    x20 b400006d09456050 x21 0000000000000007 x22 0000000000000007 x23 0000006deaef47c6
    x24 0000000000000018 x25 0000000000003234 x26 0000000000003238 x27 ffffff5e00000000
    x28 0000000000002a10 x29 0000006dfad0fe30
    sp 0000006d573d3800 lr 0000006dea241f5c pc 0000006dea23c438

    backtrace:
    #00 pc 00000000001a2438 /data/app/~~GjLGWtvL-M4v9tjC0hcgEA==/com.paint.pixel.brush.colorifybook.art.relax-r6JBlL-wkSSQAyq4tVjlww==/lib/arm64/libunity.so (BuildId: 9855a57b963ae0fac49541303eacd4baced804d7)
    #01 pc 00000000001a7f58 /data/app/~~GjLGWtvL-M4v9tjC0hcgEA==/com.paint.pixel.brush.colorifybook.art.relax-r6JBlL-wkSSQAyq4tVjlww==/lib/arm64/libunity.so (BuildId: 9855a57b963ae0fac49541303eacd4baced804d7)
    #02 pc 00000000001a7cb4 /data/app/~~GjLGWtvL-M4v9tjC0hcgEA==/com.paint.pixel.brush.colorifybook.art.relax-r6JBlL-wkSSQAyq4tVjlww==/lib/arm64/libunity.so (BuildId: 9855a57b963ae0fac49541303eacd4baced804d7)
    #03 pc 00000000001a1b0c /data/app/~~GjLGWtvL-M4v9tjC0hcgEA==/com.paint.pixel.brush.colorifybook.art.relax-r6JBlL-wkSSQAyq4tVjlww==/lib/arm64/lib<truncated: 1837 chars>
    at libunity.0x1a2438()
    at libunity.0x1a7f58()
    at libunity.0x1a7cb4()
    at libunity.0x1a1b0c()
    at libunity.0x1a1ac8()
    at libunity.0xc8db0()
    at libunity.0x39ac90()
    at libunity.0x72dc24()
    at libunity.0x7323ec()
    at libunity.0x72a6b8()
    at libunity.0x2a37f4()
    at libc.__pthread_start(void*)(__pthread_start:64)
    at libc.__start_thread(__start_thread:64)
     
  44. xLeo

    xLeo

    Joined:
    Sep 21, 2010
    Posts:
    139
    @nicloay We have the previous PaintCraft version and would like to ask a few questions before purchasing the Paint Craft 2020:
    1) Are Addressables supported? If not, are there plans to support it?
    2) Is there a way to load images/thumbnails from a remote server? Or at least a way to override the default "load image" behavior?
    3) We are having issues with black screens on iOS, is this issue fixed on the latest plugin version?
     
  45. nicloay

    nicloay

    Joined:
    Jul 11, 2012
    Posts:
    515
    Hello Ethan

    Here is a code of this controller https://gist.github.com/nicloay/e179c5c612637ff9fcf5eac9062af55a you can create your own controller and adjust it with your needs including line id

    Hope this helps, otherwise let me know.
     
    EthanHooper1023 likes this.
  46. nicloay

    nicloay

    Joined:
    Jul 11, 2012
    Posts:
    515
    Please create your own controller based on this https://gist.github.com/nicloay/e179c5c612637ff9fcf5eac9062af55a and then use FindObjectOfType<> to assign cameras from code. not from inspector
     
  47. nicloay

    nicloay

    Joined:
    Jul 11, 2012
    Posts:
    515
    @jpchauhan I'm sorry, but from this report it's hard to say what was the problem. do you have unity logs?
    Also , can you try to profile your app, just to make sure that your app is not closed because of the lack of memory (that usually happens when you have a big number of history (undo/redo) or big canvas size, like 4x4k, as all this data resides in memory)
     
  48. nicloay

    nicloay

    Joined:
    Jul 11, 2012
    Posts:
    515
    As I replied to you by the mail, Addressables is not part of the package so you have to implement your own page configs and all logic by yourself based on original code from here which show that page config can be created runtime and

    3d issue only appears on the metal rendering backend of the previous paintcraft version.
     
    xLeo likes this.
  49. Little_Unity

    Little_Unity

    Joined:
    Jan 11, 2016
    Posts:
    1
    @nicloay Hello, I have bought Paint Craft 2020 with only editor.dll. How can I have source code in the engine? Thanks.
     

    Attached Files:

    Last edited: Sep 16, 2021
unityunity