Search Unity

  1. The 2022.1 beta is now available for testing. To find out what's new, have a look at our 2022.1 beta blog post.
    Dismiss Notice

Colorify - realtime color-swapping and recolor map baking

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

  1. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    Colorify contains several shaders that let you easily recolor your assets without use of color masks or any additional textures - just use your ready textures and tell what colors you need to swap.

    Update 1.6b:
    • Compatibility changes to standard shader versions for Unity 5.6
    • Compatibility changes to standard shader versions for Unity 5.5
    • Added "bake texture" options for baking recolored textures into file
    • Linear colorspace handling
    • Disabled default sRGB conversion on masks
    • sRGB corrections to baked textures
    • Minor fixes to mask creation process

    Colorify on Asset Store

    Use it to:
    • Enable partial recoloring of existing assets - majority of Asset Store models don't have partial recoloring option. With Colorify, you can easily change the color of the parts you need without touching everything else. (All example models are free downloads from asset store and contain only one diffuse texture and material without any built-in way for partial recoloring).
    • Dynamically change color schemes of your objects (team colors, armor & weapon customization, and more).
    • Real-time preview of possible color schemes right inside your game-play, before preparing designated assets.
    • Play with your colors and ranges procedurally to achieve some interesting effects (real-time spoiling fruits with spoiled areas growing gradually, "infection" effects on skin, smooth continuous color-swapping in real-time etc.)
    • Generate recolor map from Unity editor and use them in Colorify or your own shaders, and edit them in any image editor.
    Manual

    Package includes:
    • 68 shaders total, including Standard PBS shader variant.
    • Mobile versions of shaders supporting shader model 2.0.
    • Recolor map generator & recolored texture baker.
    • Examples for both normal and mobile versions.
    • Debug shader for precise tweaking.
    Currently there's support for up to 2 color ranges per texture to recolor.
    Colorify use rgb distance and hue filtering to recolor parts you designate without touching everything else.
    (Real-time mobile versions use only rgb distance to comply to shader model 2.0 restrictions)

    P.S. You can also check my other assets:
    ArcReactor procedural ray generator
    Shader-independent See-Through System
    Advanced Selective Coloring image effect
    U Chroma Key solution

    1.JPG
    Unity5.jpg
    2.JPG
    View attachment 123246
    4.jpg
    5.JPG
     
    Last edited: May 22, 2020
  2. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    Updated 1.0b version should be available on asset store in about 3 days.
    Update unifies the way main color is handled by different shader families and contains small manual update.
    Also, online manual is now avaliable.
     
  3. beNice

    beNice

    Joined:
    Sep 12, 2014
    Posts:
    28
    Really cool idea and implementation.

    Could one use this as a 2D-sprite shader, as an unlit, transparent cutout?

    Nicely done.
     
  4. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    Thanks!

    I just uploaded 1.1 version on Asset Store, it contains Toon Outline and Unlit(alpha,cutout and simple) versions of shaders. It should be avaliable in 3-5 days.

    Example of Toon Outline shader (outline color can be adjusted):
    toon_shader_ship.png
     
    Last edited: Sep 20, 2014
  5. beNice

    beNice

    Joined:
    Sep 12, 2014
    Posts:
    28
    I will be watching out for it then. Thank you so much!

    This really looks quite fantastic.

    Can't wait to see the variety it brings.
     
  6. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    Version 1.1 avaliable on Asset Store!
    New shaders:
    - toon outline family
    - unlit family (transparent, cutout and simple)

    Total shaders in pack as of right now: 35.
     
  7. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    1.2 version submitted to Asset Store, containing Maskless Dissolve family of shaders. These shaders use color ranges instead of dissolve masks. Recolor+Dissolve shaders also included (1 range for dissolve and 1 range for recolor).

    Note that price of new version was raised to 10$, so if you want to still pay only 5$ for Colorify, you have 3-5 days to buy it.
     
  8. DMeville

    DMeville

    Joined:
    May 5, 2013
    Posts:
    417
    This looks pretty cool. I'd love to play with a demo, I didn't see one anywhere though :(
     
  9. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    Thanks!
    Demo is in the works right now and isn't available yet.
    This asset falls into "non-tryable" category and can be refunded no question asked within 2 weeks of purchase, so you can try it that way for now.
     
    Last edited: Sep 25, 2014
  10. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    Version 1.2 is live on Asset Store.
    Added maskless dissolve shader family, which perfroms "dissolve" effect based on color ranges instead of dissolve masks.
     
  11. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    I started to upload image effect based on slightly imporved Colorify color selection algorithm.
    First in line is Advanced Selective Recolor and it's FREE for a limited time!
     
  12. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    Version 1.3 will be containing alternative to real-time color range determination: Recolor Mask baking.
    It'll allow to use full power of rgb and hue filtering on mobile devices, improve performance on all platforms, and allow you to edit recolor masks in any image editor.

    Note that there will be price increase with the new version.

    Colorify.png
     
  13. beNice

    beNice

    Joined:
    Sep 12, 2014
    Posts:
    28
    That looks great. Way to advance!
     
  14. user1j3di3j2sa3

    user1j3di3j2sa3

    Joined:
    Nov 5, 2012
    Posts:
    566
    This looks great, but I'm wondering if the shader is constantly doing it's computations during runtime or if it just does it on load.

    My thinking is do I use a mask that uses hardly any calculations at run-time but has to store the mask in memory.
    Or your system that has no mask but it probably continuously calculates during runtime. Memory vs performance.

    Also does any of these shaders react to ambient light?
     
  15. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    Thanks!

    In current version, all shaders are doing computations during run-time - it allows dynamic changes in color ranges. In the next version, there will be option for generating recolor mask in editor mode.

    Most shaders react to light - it's basically standard Unity shaders with recolor options.
     
  16. user1j3di3j2sa3

    user1j3di3j2sa3

    Joined:
    Nov 5, 2012
    Posts:
    566
    I'll probably purchase today. I will see how it stands up against masked method. It might not be an issue.
     
  17. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    Good news: just finished implementing mask baking for free version of Unity, so mask generation will be available on both Free and Pro versions (Pro will be a lot faster though, especially on big textures).
     
  18. eridani

    eridani

    Joined:
    Aug 30, 2012
    Posts:
    655
    I'm not sure I understood the intent of this asset correctly....I thought I would be able to change the color of a bunch of individual units randomly to distinguish them from one another. But it seems I can only change the color of all the units at the same time as a group.

    Do you have any way to color individual units a different color even though they are using the same material? Is that even possible? Anyway I am also etting some errors in Unity 4.6.0f3:

    Shader error in 'Colorify/Mobile/1 Color/Toon Outline': 'vert': function return value missing semantics at line 115

    Shader error in 'Colorify/Mobile/1 Color/Toon Outline': 'frag': input parameter 'i' missing semantics at line 130

    Please advise. Thank you!
     
  19. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    Hello, you understood correctly. If you're changing colors through material.SetColor, it's extremely strange behaviour. You can send me part of your project that uses Colorify on leonidmv@gmail.com, and I'll look at it.

    Thanks for bringing the errors to my attention, I didn't make compatibility check on 4.6 yet. I'll fix them and upload update during next week.
     
  20. eridani

    eridani

    Joined:
    Aug 30, 2012
    Posts:
    655
    Thank you, I started over from scratch and the individual units seem to be getting their colors set individually now. I will let you know if I see that behavior again. In any case, I think I will update to Unity 4.6.1 soon.
     
  21. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    Version 1.3 uploaded to the Asset Store!
    A lot of new shaders added, total shader count: 64. Now you can bake recolor mask from Unity editor and use them instead of real-time calculations.
    Should be avaliable for download in 3 days.
     
  22. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
  23. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    Coming in 1.4: resulting recolored texture baking from Unity Editor.
     
    Last edited: Jan 18, 2015
  24. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    Yes, I noticed them too in newer Unity versions. They're not errors and do not affect any functionality, but I can understand the annoyance. I'll make changes to the mask generator script in the next version - that should fix this issue. Should be avaliable in 1-2 weeks.

    Edit: Btw, for now you can disable warnings in the editor by clicking on the yellow icon in the right-top corner of the console.
     
  25. beNice

    beNice

    Joined:
    Sep 12, 2014
    Posts:
    28
    Hey there, Shader Wizard -- was hoping to get your expertise on our slight dilemma:

    We are using the wonderful Colorify on sprites and have had great results with the 'cutout' version and fog. When we need 'transparent' with no cutout, however, and fog comes into the mix, the sprites become ~50% transparent.

    It seems to hinge on the difference in these lines:

    #pragma surface surf Lambert alphatest:_Cutoff
    #pragma surface surf Lambert alpha

    The first line renders great with fog while just transparent does not.

    I'm not sure if this is an easy fix, but my head is kind of banged up trying to figure out these foggy sprites.

    Thank you so much for your efforts.

    Keep on coloring!
     
  26. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    Hmm, I'm not sure I understood your problem correctly. Did you look at the alpha channel of your sprites?

    Anyway, you can send me example scene with your problem and I'll look at it. My email is in publisher description on Asset Store.
     
  27. beNice

    beNice

    Joined:
    Sep 12, 2014
    Posts:
    28
    Thanks for the quick reply. I believe you are right that it is somehow sprite related.

    I'm going to keep banging my head for a little while.

    Thanks again!

    EDIT:
    Wow, it was such a stupid thing. After reducing variables and wasting so much time, all I had to do was move the fog closer to the camera.

    If particles are too close in front of an object or right on an object with a 'transparent' shader, it messes with the rendering order. Once I moved it out a bit it renders okay.

    Sorry if I wasted any of your time.
     
    Last edited: Jan 18, 2015
  28. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    No problem at all, to contact asset creator is a right thing to do if you think it might not work as expected.

    Btw, version 1.3a uploaded to Asset Store, no more annoying warning messages ;)
     
  29. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    Version 1.3a is avaliable on Asset Store. No more annoing warnings :)
     
  30. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    Coming in version 1.4: Resulting texture baking for maximum performance.
     
  31. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    Update on changes in 1.4: Colorify-enabled versions of Lux physically-based shaders will be added. Note that version 1.4 will come with price increase (from 20$ to 25$).
     
  32. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    Change of plans for version 1.4: considering Unity 5 release, instead of Lux shaders it will include Colorify-enabled standard physically-based shader.
     
  33. Zelek

    Zelek

    Joined:
    Jun 12, 2010
    Posts:
    87
    In Unity 5, the Colorify shaders make 2D sprites invisible when the local scale X is -1. I sent an email with a link to a test project to reproduce this bug nearly a month ago, but never received a response. Is this something that will be addressed in 1.4?
     
  34. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    Hello.

    I sent you a letter containing quickfix the next day after receiving your letter, please check your spam folder. If you still can't find it, please send me PM and I'll try some file hosting to send you updated files.

    More in-depth fix will come in v.1.4.
     
  35. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    Colorify versions of Unity 5 Standard shaders is ready, version 1.4 will be uploaded after some testing.
    standard shader example.png
     
  36. Duffer123

    Duffer123

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

    With this asset, could I take a (previously unaltered from it's original version) textured sword and, in runtime, change the colour of the metal, for instance, or change the hue/colour of armour in runtime, without doing anything new first to the original 3d object or texture?
     
  37. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    Yes, that's exactly the purpose of Colorify. All you need to do is to change shader of your sword material to Colorify version of said shader (for example, if your sword uses Bumped Specular, you will need to change it to Colorify\Bumped Specular). If you're using Unity 5 standard shader, you'll have to wait about a week for version 1.4 - it will include support for this.
     
  38. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,212
    Excellent - this is precisely what I need. When the Unity 5.x version is released, I'm a buyer! Presume you will also announce v1.4 on this forum (I will then get notice and buy...)
     
  39. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,212
    Some YouTube of examples in action in code and runtime would be great...?
     
  40. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    Of course, I will announce when new version is available on Asset Store.

    Good idea, but right now I'm in the process of making videos for my other assets. Once I'm done with it and 1.4 release, I'll try to make a video for Colorify.
     
    Last edited: Jun 18, 2015
  41. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,212
    Sorry - 2 more questions. What happens if you want to change colours in a colour range and not just one exact shade of say blue but all blue colour on a texture within say 5% of that in ARGB?

    Also, could this be used to take a particular colour and knock down to nothing or reduce the Alpha - thus fading it out? As you can imagine that would have some real uses as well!
     
  42. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    If Colorify could recolor only exact colors, it would be pretty useless :) You have 2 parameters for color range selection: rgb distance and hue distance, so you have precise control over what color interval will be recolored. Re-coloration algorithm also take notice of difference between real color on texture and reference color, so you don't end up with, for example, plain red instead of different shades of yellow.

    There's cutout shaders included in the pack, which are working exactly like that - they make your selected color range transparent.
     
  43. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,212
    Excellent - roll on v1.4! (and thanks for getting back to me so quickly!).

    In terms of selling this Asset in the Asset Store, I'd seriously consider setting out (for idiots like me) some of the potential applications for this Asset in runtime and I'd also (see above) attach some YouTube examples of script and runtime.
     
  44. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    Version 1.4 with Unity 5 standard PBS-based shaders is currently pending review and should be available on Asset Store by the end of this week. Note that there's a price increase, so you can save 5$ if you buy it before new version gets approved.

    Unity5.jpg

    unity 5 demo.png
     
    Last edited: Jun 30, 2015
  45. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,212
    Sold! Have purchased. Roll on 1.4. Does this Asset have Playmaker support. Just thinking about an RPG I'm making and some real possibilities (with or without Playmaker) FSMs... but with Playmaker that would be excellent...

    Also - can we use this Asset on 2d images (texture2ds)? I'm thinking here about my icons in an inventory in an RPG for example...
     
  46. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    I've never used Playmaker, so can't tell you whether it will work or not, but it's just simple Unity shaders (with recolor parameters exposed as usual). I'll try to contact Playmaker creators and ask them if there's some additional steps required to make Colorify work with their system.

    As for RPG, that's the reason this pack was born - it was made for tactical RPG/strategy my studio is making, and almost all item and character customization is handled by Colorify.

    By using it on 2D images do you mean recolor and then save result as an asset? That feature isn't completely ready yet, but I'm working on it since I receive requests for that often. Although if you know what you're doing, you can use Blit function to do that yourself - all inventory icons in our game are generated using Colorify.
     
  47. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,212
    Understood. Something to recolor texture2ds, sprites with this would be magnificent.

    From what I can gather, it's relatively simple to create FSMs for Playmaker...
     
  48. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
  49. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    Coming in v.1.5:
    - Luminosity recoloring (alternative recoloring algorithm that can achieve more hue-consistent results when your color range is too wide)
    - Results baking

    Sprites are already supported by Colorify, there's a family of Unlit shaders made specifically for sprite rendering. I'd say half of users of Colorify that I know uses them for 2D sprite rendering.
     
  50. Duffer123

    Duffer123

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

    Excellent re Sprites...

    It would be great too if Colorify could offer some Playmaker and Playmaker actions support?
     
unityunity