Search Unity

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

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

  1. hanniiel

    hanniiel

    Joined:
    Jun 14, 2013
    Posts:
    38
    Hello, I'm using IL2CCP on Android but pink screen is displayed, when I try by mono works just fine. there's something related to this? best regards.
     
  2. nicloay

    nicloay

    Joined:
    Jul 11, 2012
    Posts:
    463
    Hello. Did you import from asset store or through some proxy PC (someone downloaded from asset store then made unity package from unity editor)? in this case it loose project settings.

    Please reimport project from asset store or take the unity3d package from cached folder
     
  3. hanniiel

    hanniiel

    Joined:
    Jun 14, 2013
    Posts:
    38
    Thanks 4 the reply, Imported from the store what should I import? I don't want to replace all settings. It works on mono but not in IL2CPP.

    Actually works, but after loaded I try to call SetActivePageConfig() and becomes pink,
    Exception occurs null reference name : shader.

    thanks in advance
     
  4. nicloay

    nicloay

    Joined:
    Jul 11, 2012
    Posts:
    463
    @hanniiel, Can you please make sure that your graphics settings include following shaders (Unlit texture and unlit transparent)
    unnamed.png

    also can you show me screenshots with Layers setup (the list 1->32 numbers with layer name

    Thanks.
     
  5. hanniiel

    hanniiel

    Joined:
    Jun 14, 2013
    Posts:
    38
    Sure.
     

    Attached Files:

  6. nicloay

    nicloay

    Joined:
    Jul 11, 2012
    Posts:
    463
    do you have any error logs? can you show "adb logcat" please?

    also which unity version do you use?
     
  7. hanniiel

    hanniiel

    Joined:
    Jun 14, 2013
    Posts:
    38
    I'm using 2018.4.5.
    yes i will update with logcat a moment please
     
  8. nicloay

    nicloay

    Joined:
    Jul 11, 2012
    Posts:
    463
    another app made with paintcraft. looks very nice. well done to Aleksei Neiman and his team.
    upload_2019-8-15_17-47-53.png
    appStore link
     
  9. Spree_User

    Spree_User

    Joined:
    Aug 24, 2017
    Posts:
    5
    Hi!
    I'm sorry if this has already been answered in this thread.
    When painting an image using the Coloring Page Config (following the guide "QuickStart"), what would be the best way to make it so that only part of the image can be colored? For example only the inside of a character, but not the background?

    Thank,
    Hannes
     
  10. nicloay

    nicloay

    Joined:
    Jul 11, 2012
    Posts:
    463
    Hello Hannes.
    I think best solution is
    1. In region file make those region alpha = 0
    2. Make the region texture r/w = true
    3. In ScreenCameraController on MouseDown check did you hit the region with alpha 0 or not if yes ignore the subsequent mouse event.
     
  11. tik_tikkers

    tik_tikkers

    Joined:
    Jan 5, 2018
    Posts:
    10
    Can you please help me save a transparent image when using a template image?

    I can save transparent images if not using a template. But, I think that when a template image is used, BackLayerController makes a new texture from the template and ignores the alpha in the template.
     
  12. nicloay

    nicloay

    Joined:
    Jul 11, 2012
    Posts:
    463
    Hello @tik_tikkers,

    Sorry for inconvenience. the 2.2 version contains this optimization which doesn't save transparency. In new beta I already implemented the method to choose which format to use.

    Here is how to fix that in latest version from asset store
    1. Open class CanvasController.cs
    2. Change texture format froml RGB24 to RGBA32
    3. Change save method from EncodeToJPG(100) to EncodeToPNG()

    Please see screenshots below with diffs and line numbers
    upload_2019-8-20_12-33-21.png
    upload_2019-8-20_12-33-49.png

    Hope this helps.
    Please let me know if you will have any questions.
    Thanks.
    //Nikolay.
     
    Last edited: Aug 20, 2019
  13. J4cks0n_kl

    J4cks0n_kl

    Joined:
    Aug 14, 2019
    Posts:
    2
    hello, is there's any option we can add glitter coloring, and does this work with Unity 2019
     
  14. nicloay

    nicloay

    Joined:
    Jul 11, 2012
    Posts:
    463
    @J4cks0n_kl No. there is no such think in the package. But I would do that I'll probably do that using following pipeline (see below). I haven't tested it in 2019. I'm still working on the build for 2018 (which is available right now as beta version)

    1. Create additional glitter_mask render texture with 1/4 or 1/8 size of the canvas
    2. Created new tool which render not just to the back layer render texture but also to the small size
    3. after each changes copy render texture to the Texture2D
    4. created the particle system which spawn sparkles on the scene using texture2D
    5. Fixed Unod/Redo to support additional glitter_mask texture
    6. fixed eraser tool to erase the glitter_mask
    7. fixed clear function to clear glitter_mask

    Actually maybe even stored the glitter mask in to the alpha channel of the standard background layer if alpha is not used anywhere else.

    I tried to implement glitter shader which make sparkles using shaders but the result was not satisfying. so this is why I would rather try the particle system.

    Please let me know if you have any questions and I am also available for contract job if you want me to implement this feature, just contact me by email(support@paintcraft.in) for more details.
     
  15. J4cks0n_kl

    J4cks0n_kl

    Joined:
    Aug 14, 2019
    Posts:
    2
    i sent you a email :
    i saw that you have a pattern option in the WEBGL version , why you just add the sparkle as pattern , in choice color , do you think it's a good idea.

    so apply the fill option with pattern instead of brush can i do that ??

    can you please tell me , what type of images the system need, is it separated parts of images, or just one image ?
     
  16. nicloay

    nicloay

    Joined:
    Jul 11, 2012
    Posts:
    463
    @J4cks0n_kl,
    I'm sorry. I thought you need animated glitters. Just checked the reference app which you sent me by email and you are right, you can use patterns for statig glitters. not even patterns but custom material with glitter noise.

    About the image. You need to provide 2 images.
    1 - Outline layer
    2 - Region layer where each region is painted in unique color
     
    Last edited: Aug 21, 2019
  17. mgyanm

    mgyanm

    Joined:
    Jul 6, 2012
    Posts:
    8
    Hello, i've seen a shader error after i imported the plugin :

    Code (CSharp):
    1. Shader error in 'Custom/AlphaUnlitMaskColor_Clipping': cannot map expression to vs_5_0 instruction set at line 56 (on metal)
    2.  
    3. Compiling Vertex program
    4. Platform defines: UNITY_NO_DXT5nm UNITY_NO_CUBEMAP_ARRAY UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_DLDR_ENCODING
    Code (CSharp):
    1. Shader error in 'Custom/AlphaUnlitMaskColorWithGlitter': 'vert': function return value missing semantics at line 47 (on metal)
    2.  
    3. Compiling Vertex program
    4. Platform defines: UNITY_NO_DXT5nm UNITY_NO_CUBEMAP_ARRAY UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_DLDR_ENCODING
    Code (CSharp):
    1. Shader error in 'Custom/AlphaUnlitMaskColor': cannot map expression to vs_5_0 instruction set at line 55 (on metal)
    2.  
    3. Compiling Vertex program
    4. Platform defines: UNITY_NO_DXT5nm UNITY_NO_CUBEMAP_ARRAY UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_DLDR_ENCODING
    Should i ignore that error? or do you know how to fix it?
    I'm using Unity 2018.3.0f.

    Thank You
     
  18. nicloay

    nicloay

    Joined:
    Jul 11, 2012
    Posts:
    463
    @mgyanm,

    You can ignore these errors for now.
    If you will have problem with 2018 (Paintcraft 2.2. is not support Metal rendering on 2018) you can switch rendering to opengles, or drop email with your invoice id to support@paintcraft.in and I'll give you access to new beta.

    Thanks.
    //Nikolay.
     
  19. tik_tikkers

    tik_tikkers

    Joined:
    Jan 5, 2018
    Posts:
    10
    Hey @nicloay

    I'm using the new beta and the screenshot works great for alpha with painted images.

    HOWEVER... If screenshoting an image using a template (coloring book), the alpha in the template image is changed to white. Does that make sense?
     
  20. nicloay

    nicloay

    Joined:
    Jul 11, 2012
    Posts:
    463
    @tik_tikkers, I'll check this problem in Monday and provide you solution then.
    Am I correct that alpha works for blank images, but images with outline has white background?
     
  21. tik_tikkers

    tik_tikkers

    Joined:
    Jan 5, 2018
    Posts:
    10
    @nicloay yes that's correct. Thank you!
     
  22. nicloay

    nicloay

    Joined:
    Jul 11, 2012
    Posts:
    463
    I'm sorry I tried to reproduce your issue, but it seems everything works well on my side. Please see https://imgur.com/a/R5BjOnS

    Also. can you drop me your email to support@paintcraft.in I'll send you the link to new RC4 beta.

    Thanks.
    //Nikolay.
     
  23. stevencoull

    stevencoull

    Joined:
    Sep 15, 2016
    Posts:
    15
    Hey Nikolay,

    Thanks for the great asset, I'm having a lot of fun playing with it and learning how you made it. Right now I'm trying understand how to make a bucket tool that only fills in a region I've drawn - right now it fills in the whole canvas. In our app we only use solid lines (I've created a new brush tool that doesn't contain the SetFixedAlpha component), with this in mind, do you have any recommendations on how I could achieve this? I noticed you mentioned a TextureUtil class back in 2016, but with so many changes to your plugin, I was wondering if you had any new ideas.

    Thanks,
    Steven
     
  24. nicloay

    nicloay

    Joined:
    Jul 11, 2012
    Posts:
    463
    hello @stevencoull, Thanks for the feedback

    Unfortunately I didn't change anything regarding the floodfill calculation you still have to provide region file. So if you want to draw in runtime regions, I think there is only one thing to do that.

    1. You BGLayer must have R/W acces = true
    2. When you start drawing you use floodfill algorithm to generate the mask
    3. Probably better to save this mask in to Alpha8 texture
    4. In your custom brush you have to use material with that Alpha8 mask texture

    I have only one concern about how fast 2 step will work as large complex regions could take significant amount of time to calculate and also you have to load this data to GPU which is also heavy operation. So user can take a 0.5seconds lag

    Hope this helps.
    Let me know if you still have a questions.
     
  25. ellenblomw

    ellenblomw

    Joined:
    Mar 4, 2018
    Posts:
    153
    Hi Nicolay, is it possible to create a "brush" to add keyboard written text to the image? Like you can add text on an image in snapchat for instance? Or do I have to use InputField and a custom solution for this?
     
  26. nicloay

    nicloay

    Joined:
    Jul 11, 2012
    Posts:
    463
    I think it's better to separate 2 sequences
    1. Input/Modifying text
    2. Render text to background render texture.

    1st step is easies to implement as separated solution
    2d step is better to use as custom brush which place mesh between camera and background layer (as e.g. stickers do). So in this case you will be able to use standard undo/redo
     
    ellenblomw likes this.
  27. ellenblomw

    ellenblomw

    Joined:
    Mar 4, 2018
    Posts:
    153
    The first alternative you mention would not work with the icon in the pageselect right?
     
  28. nicloay

    nicloay

    Joined:
    Jul 11, 2012
    Posts:
    463
    it's not alternative - it's one process. I mean first you have to manage somehow global object which render on top of paintcraft, and when you finish you have to add it to background. so as the result it will appear in icon as well.
     
  29. ellenblomw

    ellenblomw

    Joined:
    Mar 4, 2018
    Posts:
    153
    oh ok, now I understand, thanks!
     
  30. stevencoull

    stevencoull

    Joined:
    Sep 15, 2016
    Posts:
    15
    Thanks for the quick response!!
    For part 2, is there any code in the project that I could use as a reference?

    One other thing, I noticed with the normal brushes nothing is drawn if you tap on the canvas, you have to drag first. Is this something that can be changed?
     
  31. nicloay

    nicloay

    Joined:
    Jul 11, 2012
    Posts:
    463
    No. there is no, but you can google flood fill algorithm.
    Yes. it fixed in new beta if you need that just send me email(support@paintcraft.in) with your invoice id and I'll give you access
     
  32. Aleksandraruzieva

    Aleksandraruzieva

    Joined:
    Jan 31, 2018
    Posts:
    1
    We have a problem with black textures after we have entered the painting scene in Unity 2019.2.6. We need to use openGL3. Could you give us some solution to fix it?
     
  33. nicloay

    nicloay

    Joined:
    Jul 11, 2012
    Posts:
    463
    I'm sorry for this issue, I do not support 2019 version yet, anyway please send your invoice id to support@paintcraft.in and I'll send you a new beta version which works well on 2018
     
  34. bonbongame

    bonbongame

    Joined:
    Oct 1, 2019
    Posts:
    1
    Hello,
    when i build on ios device and unity 2018.2.12 , have problem : sometime in scene coloring i can't paint in picture .
    Can you help me ? thank you so much !
    This is link demo bug :
     
  35. nicloay

    nicloay

    Joined:
    Jul 11, 2012
    Posts:
    463
    hello. is this just on specific regions? like on the plane body? if yes check your region file and make sure that it has alpha = 1.0 (total opaque) on every region.
     
  36. Geigyuk

    Geigyuk

    Joined:
    Jul 7, 2017
    Posts:
    8

    I don't understand. Here is my setting, what i need to change ?

    upload_2019-10-9_22-2-11.png
     
  37. nicloay

    nicloay

    Joined:
    Jul 11, 2012
    Posts:
    463
    @Geigyuk oh. can you try to change format to RGBA32 please.
     
  38. Geigyuk

    Geigyuk

    Joined:
    Jul 7, 2017
    Posts:
    8
    Texture type: Single Channel can't change format to RGBA32. So what texture type u want me change to ? Default or Sprite. I watched your tutorial, i saw you setting like image below and i follow it. In another application I completed, all region image I setting like that it's worked but after i upgrade unity version 2018 and your version to 2.2 so as you've seen it's not working anymore.
     
  39. nicloay

    nicloay

    Joined:
    Jul 11, 2012
    Posts:
    463
    The problem is that many people ask me to add feature to make "ignore" regions the one which user can't paint. and it's controlled through alpha channel on standard RGBA32 texture so those video with grayscale texture is obsolete right now (sorry for inconvenience)

    you should use default.
    here is how it looks like
     
  40. Geigyuk

    Geigyuk

    Joined:
    Jul 7, 2017
    Posts:
    8

    Thank you so much, i'll try it at tomorrow and reply you after that. Thanks again!
     
  41. Geigyuk

    Geigyuk

    Joined:
    Jul 7, 2017
    Posts:
    8
    I changed but it's still not working on IOS device
     
  42. Geigyuk

    Geigyuk

    Joined:
    Jul 7, 2017
    Posts:
    8
    i don't understand why, but this image "Bear" is working with colors and this image "Airship" is not working with colors. Can you check for me ?
    (both of image are region image). Thanks!
     

    Attached Files:

  43. nicloay

    nicloay

    Joined:
    Jul 11, 2012
    Posts:
    463
    you can fill it with different color.

    Anyway - there is a better solution. please send your invoice ID to support@paintcraft.in and i'll send you the new beta version. It will work on 2018 and all textures will be stored in StreamingAssets so your app will be much smaller. it also contains different optimization (but anyway even with that you should fill the region with another color, because it use the same shader I think)
     
  44. Geigyuk

    Geigyuk

    Joined:
    Jul 7, 2017
    Posts:
    8
    I have received ur version beta and it's working, thanks. But how long this version up to the store? and if you release this version, has it many changed from beta version ?
     
  45. nicloay

    nicloay

    Joined:
    Jul 11, 2012
    Posts:
    463
    I'm sorry I don't have exact plan about when I will release the beta, but for all my new projects for my customers which are based on paintcraft I use this beta version. About architecture - I'm not planing significant changes there, mostly only bugfixing and some small features.
     
  46. muellg

    muellg

    Joined:
    Jul 23, 2019
    Posts:
    2
    Hi! I've been using the version on the asset store as well as the V3_RC5 version (thanks for sending that my way!). Both are exhibiting this same behavior with transparent backgrounds...

    If you paint, then erase, then paint over that area again, the initial painting shows through the erased area. I attached a screenshot from the V3_RC5 TransparentBackground Demo scene where first colored in a bunch of purple, then erased the center, then drew a gold line through it. you can see the purple shows through the yellow line when it isn't expected to do that. Seems the erase isn't baked into a texture when using transparency?

    Any ideas on a fix?
    Thanks again for the amazing library.
     

    Attached Files:

  47. ammarvohra

    ammarvohra

    Joined:
    Jan 24, 2016
    Posts:
    10
    Hi @nicloay,

    I have been stuck with iOS device, I used Unity 2019.2.6 and iOS 10.3 (ipad device).

    The problem is the whole drawing image(background region) gets black, I have read the previous post and saw that using opengles2 sort out that, yes it did but my app has some masking and other things which does not work properly, also iOS 13 deprecated using openGLes2 and strictly uses metal API, what will be overcome to this? If I have your beta package (I don't have it right now) how to override the current package and use the new one as there are lot more changes done to the old package.

    I have mailed you with a video which got me stuck on iPad device running 10.3, please revert back me in the email so I can update the existing code and get going my work.

    Thanks,
    Ammar
     
  48. nicloay

    nicloay

    Joined:
    Jul 11, 2012
    Posts:
    463
    I sent new beta to you by email. sorry but 2019 version is not supported yet
     
  49. nicloay

    nicloay

    Joined:
    Jul 11, 2012
    Posts:
    463
    Looks like a bug I'll try to check this Issue, I remember previous time I was not able to solve when eraser left some slightly transparent lines.

    Thanks
    //Nikolay.
     
  50. Jael-Acaxa

    Jael-Acaxa

    Joined:
    Aug 19, 2019
    Posts:
    9
    Hi @nicloay !

    How can i make the brush paint when i touch the screen too. Right now it only paints if i move the touch.