Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Colorify - realtime color-swapping and recolor map baking

Discussion in 'Assets and Asset Store' started by CatsPawGames, Sep 8, 2014.

  1. Menion-Leah

    Menion-Leah

    Joined:
    Nov 5, 2014
    Posts:
    189
    Hi,
    I'm interested in purchasing this asset for a 2D game, and I was wondering: how does Colorify work with atlases and Sprite Packer?
    Thanks
     
  2. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    Hello.

    If you're using realtime mode, working with atlases isn't any different, but using masked mode with atlases is tricky - most likely you'd have to manually stitch combined mask.
     
  3. Menion-Leah

    Menion-Leah

    Joined:
    Nov 5, 2014
    Posts:
    189
    Ok, thank you!
     
  4. Magic73

    Magic73

    Joined:
    Jun 23, 2015
    Posts:
    127
    I'm liking for a demo. Is it available?
    p.s:
    which font do you use in the screenshots?
    I would like to have it for use in my game..
     
  5. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    Demo isn't available since it's a shader pack, so it's kinda hard to show it off in a demo. I'm recording a series of videos to show how it works, but it's not ready yet.
    I used this site to generate text for my slides: http://cooltext.com/
     
  6. ejrgames

    ejrgames

    Joined:
    Aug 22, 2016
    Posts:
    2
    I have problem with Colorify after upgrading Unity to 5.5. Any scene that uses object with Colorify shaders crashes (whole Unity editor crashes). Do you also reproduce this?
     
  7. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    No, I can't replicate it - it works fully on 5.5 on my side. Can you try importing Colorify to an empty project and see if it works? Also, you can send me project that crashes on your side for testing - maybe there's something in project setting.
     
  8. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    Sorry to all Colorify owners waiting for update, Unity 5.5 put a wrench in November release plans. It should be uploaded by 15th of December and approved around 20th.
     
  9. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    Version 1.6 is currently awaiting approval by Asset Store.

    Changelog:
    • compatibility changes to standard shader versions for Unity 5.5
    • added "bake texture" options for baking recolored textures into file
    • Linear colorspace handling
      • Disable default sRGB conversion on masks
      • sRGB corrections to baked textures
    • minor fixes to mask creation process
     
    one_one likes this.
  10. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,215
    Can you use this Asset to change colours in sprites?
     
  11. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    Yes, Colorify has sprite shader variant. The only problem is sprite atlases handling - if you're using atlases, by default colorify will recolor all instances of color on whole atlas. So, check your atlases to see if this will be problematic.
     
  12. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,215
    Excellent. Thanks.
     
  13. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,215
    @CatsPawGames ,

    Please could you do some tutorial vids? I particularly need one on how to chane colour in sprites outside runtime and in inspector and save out changed png...
     
  14. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    Sure thing, I'll put that specific tutorial on my to-do list. ETA is about a week.
     
  15. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,215
    Great. Much appreciated.
     
  16. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,215
    @CatsPawGames ,

    Really looking forward to those vid tutorials ... particularly on how to colorify sprites in runtime but also to do so and export resultant sprite image files after bake...
     
  17. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    I'm very sorry for the delay, I remember about it but I'm swamped with critical issues in my new asset right now. Hopefully I'll be able to upload the vid during this week.
     
  18. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,215
    Great. Thanks.
     
  19. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
  20. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,215
    Great thanks.
     
  21. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,215
    @CatsPawGames ,

    I seem to be fine with the tutorial until I make the mask png and/or then make a recolour png for a sprite - both seem to replicate the Quad with all its artefacts rather than the original sprite but recoloured?
     
  22. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    Regarding recolored sprite, did you switch its import mode to Sprite? It's not artifacts, it's just sprite mode doesn't show you pixels based on their alpha channel.

    Regarding mask, it's normal behavior and you don't need to change import settings of mask since it processes all pixels, including those that are transparent. When you apply mask to sprite, it will take original alpha channel values from original texture, so it'll show correctly.
     
  23. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,215
    I'll have another go and come back if I'm still stuck. Thx
     
  24. stanley1287

    stanley1287

    Joined:
    Apr 21, 2017
    Posts:
    1
    Just bought it, very useful plugin, but are this plugin only support 2 pattern color?
    Capture.PNG
    what if i want to change more than 2 pattern color?

    Thx
     
  25. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    Yes, currently there's limitations of 2 recolors per material - they can differ between materials. I'm working on solution to pack 2 recolor intervals into 1 channel for 4 totals recolors (although with less precision).
     
  26. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
  27. bigbrainz

    bigbrainz

    Joined:
    Jul 21, 2015
    Posts:
    175
    Howdy! Can you please explain a bit more about how your shaders work? Do they just plug into the Standard shader or do they replace it? We need to keep our build size super light, so we don't really want to add a ton of shaders to our build. And ideally it seems like we'd like to stick with the Standard shaders for emission and our PBR workflow. If you could elaborate just a bit on that, we'd appreciate it. Many thanks!
     
  28. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    Hello.

    Standard variant of Colorify shader is based on source of Unity Standard shader that they publish for each version. It's basically normal Standard shader (with all options & behaviors) with Colorify recoloring included on source level. As for build size, this shader will be considered separate from Unity standard shader, so it will increase build size. Since Colorify also includes a miriad of other versions of recoloring shaders, it will be optimal for you to delete them after importing package if you intend to use only standard variant.
     
  29. Enoch

    Enoch

    Joined:
    Mar 19, 2013
    Posts:
    198
    I know you've said these shaders are based on Unity's Standard Shader. Do they support GPU Instancing in the same way The Standard shader does? It would be super useful to be able to modify color and still maintain GPU Instancing.
     
  30. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    Thanks for bringing this to my attention, I didn't test it. It might, but changing color also might break instancing. I'll test it and try to make instancing work correctly when changing colors if there is a problem. For now, assume that it won't work.
     
  31. Johnny-Ow

    Johnny-Ow

    Joined:
    Mar 3, 2015
    Posts:
    11
    I created a mask texture manually in Photoshop. It's a black/white mask in the red channel for the color I want to change. I'm not sure what the blue channel is for though? The manual says something about the luminosity of the texture, can you clarify? In my manually created mask texture, I simply left the blue channel black and it seems to work okay.
     
    Last edited: Oct 6, 2017
  32. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    Hello. Empty blue channel will work for most of Colorify shaders - only exception is Standard variant in luminosity mode. Blue channel of mask generated by mask generator will contain basically grey-scale version of image. Luminosity mode uses that grey-scale version to change color using different algorithm, which is useful mainly when recoloring to absolute black or absolute white, or when there is a very big hue difference in recolored areas.
     
  33. Johnny-Ow

    Johnny-Ow

    Joined:
    Mar 3, 2015
    Posts:
    11
    Thank-you for the explanation!
     
  34. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    Version 1.7 is available on Asset Store.

    Main addition is ability to save recolored texture to RenderTexture during runtime, allowing for using Colorify with any material, regardless of shaders you're using.
     
  35. GadgetGirls

    GadgetGirls

    Joined:
    Aug 1, 2014
    Posts:
    3
    Hi there. I do love this asset, but I wanted to suggest some things, because the manual is pretty barebones. I've run into a lot of trouble making masks because various things keep preventing the generate masks buttons from showing up. It would be nice to have a troubleshooting section in the manual to help people with these things.

    First if you don't have playmaker installed, you'll get script errors because the playmaker support can't find playmaker. I was working in an empty project with just Colorify and asset I wanted to recolor so I wasn't paying attention to the console log and it took me a while to figure out that scripting error were keeping things from working. It would be good to tell people not to install the Playmaker part of the asset if they aren't using it.

    Second, at one point I was working in a new scene I had never saved. Again this kept the generate masks buttons from showing up. Although I did figure these things out, and they seemed obvious in retrospect, it was pretty frustrating at the time. Especially because I was assuming I wasn't following your instructions correctly so I was constantly going back and forth between the manual and unity trying to figure out what I had done wrong.
     
  36. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    Hello and thanks for feedback. By default playmaker scripts shouldn't be installed and should come in separate unitypackage, I'll check the uploaded package to see if I made a mistake during upload.

    Edit: Just checked and yep, I forgot to delete the script during clean upload to Asset Store. Thank you for bringing this up, and I'll reupload fixed version immediately.
     
    Last edited: Nov 8, 2017
  37. neufoctobre

    neufoctobre

    Joined:
    Jun 20, 2015
    Posts:
    94
    Hello !

    This asset seems very nice and usefull. I create a make up game and would like to know if this plugin match my needs.
    I have a 3d character with a texture and I would like to change at runtime come color of the cheeks, eyelids, lips and a lot more.

    This can be done using this plugin ? (I saw on previous answer there is only 2 different color can be apply to one texture ? I need a lot more ^^)

    Thank you !
     
  38. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443

    Hello. I already replied to your email, but just in case - as you suspected, 2 colors is the roadblock in your case. It's possible to work around it, but it would require coding and possibly 1 or 2 additional simple shaders.
     
  39. XCO

    XCO

    Joined:
    Nov 17, 2012
    Posts:
    377
    Does this work for the ps4 :) ?
     
  40. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    It should, although it wasn't tested. There's 2 weeks no-questions-asked refund period so you can buy it and, if there's any problems, either get refund or describe your problem and I'll try to fix it.
     
  41. hurleybird

    hurleybird

    Joined:
    Mar 4, 2013
    Posts:
    252
    Doesn't build with 2018.1

    Shader error in 'Colorify/Standard': 'AdditiveLight': no matching 0 parameter function at Assets/Middleware/Colorify/Shaders/Standard/ColorifyStandardCore.cginc(724) (on d3d11)
    Compiling Vertex program with UNITY_PASS_FORWARDADD SPOT _COLORIFYMASKED
    Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS 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_RGBM_ENCODING


    Odd because the line that's pointing to:

    UnityLight light = AdditiveLight (s.normalWorld, IN_LIGHTDIR_FWDADD(i), LIGHT_ATTENUATION(i));


    Is calling the function with three parameters.... I hate the shader compiler so very much.
     
    Last edited: May 21, 2018
  42. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    Thanks for reporting this, I'll upload updated version during this week.
     
  43. WendelinReich

    WendelinReich

    Joined:
    Dec 22, 2011
    Posts:
    228
    Hi @CatsPawGames, I'd like to get this package but according to the Asset Store you haven't updated the asset since last November. I guess this means no support for 2018.X (and 2017.X) yet? Can you let us know when you have updated?

    PS: I personally don't need support for the new, scriptable render pipelines...
     
  44. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    Sorry about that, was distracted by issues with my other assets and completely forgot about that. I'll try to upload update in the next 5 days.
     
    WendelinReich likes this.
  45. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    Update to Colorify was uploaded to Asset Store, it includes compatibility changes for Unity 2018.1
     
    WendelinReich likes this.
  46. WendelinReich

    WendelinReich

    Joined:
    Dec 22, 2011
    Posts:
    228
    Hi - while you're at it, can you make sure it works with 2018.2?
     
  47. Binhou

    Binhou

    Joined:
    Aug 6, 2018
    Posts:
    3
    Hello @CatsPawGames I got an error when I used it. This error caused the entire shader to be unusable.
    Is there any way to solve it?
    I tested three different computers, two computers went wrong, only one computer can be used, I am not sure what the reason is.
    I hope this can be solved. Grateful :D
     

    Attached Files:

    • 擷取.PNG
      擷取.PNG
      File size:
      68 KB
      Views:
      734
    • 02.PNG
      02.PNG
      File size:
      37.6 KB
      Views:
      760
    • 03.PNG
      03.PNG
      File size:
      30.4 KB
      Views:
      742
  48. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    Hello, what version of Unity did you use?
     
  49. Binhou

    Binhou

    Joined:
    Aug 6, 2018
    Posts:
    3
    Hello ,I use 2018.1.0f2 and it can't work ,but my other computer use 2018.2.1f1 and it work,so i try to update 2018.2.1f1 and try again.
     
  50. Binhou

    Binhou

    Joined:
    Aug 6, 2018
    Posts:
    3
    @CatsPawGames I succeeded! It's version 2018.1.0f2 problem!
    There is a problem with the 2018.1.0f2 version, so please don't use it. This version will cause the standard shader of colorify to be unavailable.
    Update to 2018.2.3f1 to solve the problem!