1. We've introduced thread tags, search within a thread and similar thread search. Read more here.
    Dismiss Notice
  2. Learn how you'll soon be able to publish your games to China in four simple steps with Xiaomi. Sign up now for early access.
    Dismiss Notice
  3. Get further faster with the Unity Plus Accelerator Pack, free for new Unity Plus subscribers for a limited time. Click here for more details.
    Dismiss Notice
  4. We've released our first Timeline Experimental Preview, our new tool for creating cutscenes and more! To check it out click here.
    Dismiss Notice
  5. Unity 5.5 is now released.
    Dismiss Notice
  6. Check out all the fixes for 5.5 in patch releases 1 & 2.
    Dismiss Notice
  7. Unity 5.6 beta is now available for download.
    Dismiss Notice

Texture Tools - Remove white halos, resize, tweak HSL of your textures inside Unity!

Discussion in 'Assets and Asset Store' started by gabs, Sep 21, 2012.

  1. gabs

    gabs

    Joined:
    Sep 11, 2010
    Posts:
    39
    [​IMG]

    Texture Tools is a plugin that enables you to tweak some aspects of your textures inside Unity. All filters/tasks run in a separate thread, so they don't stop you from working on your game scenes.

    Features:

    [​IMG]

    Pixel Art Editor (NEW) - Create and edit sprites inside Unity; Import color palettes from PNG, GIF or Abode Swatch Exchange; Alpha compositing support; Multiple layers support; Multiple frames support (animated sprites); Export PNG sequence images;

    [​IMG]

    SWF2PNG AIR App - Your MovieClip animations to png sequences without having to deal with messy registration points manually.

    [​IMG]

    Solidify - Removes white halos from transparent textures. Solidify fixes the fully transparent pixels of your textures so they can be displayed properly when they are sampled by the engine.

    [​IMG]

    Resize - Lanczos (great for reduction), HQ2X, HQ4X and HQ4X Smooth (great for enlarging pixel-art textures).

    [​IMG]

    Photo Filters - InstaRetro, Sepia and Warm70s.
    HSL - Hue, Saturation and Lightness/Luminance. This can be useful if you're building for mobile and can't afford a custom shader due its performance cost.


    [​IMG]

    Unpack/cut sprite atlases - A fast way to use sprite-sheets from Tiled to your favorite 2d sprite plugin.

    [​IMG]

    Batch Processing - All texture modifiers can do multiple textures at once.

    All filters can be run in-game! Here's an example. This is useful for editing avatars pictures inside your game.

    Asset store link ($20)
    Request a feature | Report a bug

    See it in action (youtube):
    Introduction
    SWF2PNG
    Pixel Art Editor (new)

    What is planned for future versions:
    • Enhancements for the Pixel Art Editor (Onion skin, drag import more) [1.3.1];
     
    Last edited: Feb 28, 2013
  2. gabs

    gabs

    Joined:
    Sep 11, 2010
    Posts:
    39
    Updated [v 1.0.1]:
    Added (3) Photo Filters:
    [​IMG]
     
  3. jrDev

    jrDev

    Joined:
    Nov 5, 2008
    Posts:
    1,521
    Sounds good...will look into it. Currently doing solidify in photoshop, so this will definitely help with speeding up the process...
     
  4. gabs

    gabs

    Joined:
    Sep 11, 2010
    Posts:
    39
  5. gabs

    gabs

    Joined:
    Sep 11, 2010
    Posts:
    39
    Updated to 1.1.0:
    New solidify algorithm (50x faster. Now 2048x2048+ textures are solidified fast enough);
    New feature: Unpack/Cut texture/spriteatlas (useful for importing atlases from Tiled):
    [​IMG]
     
  6. gabs

    gabs

    Joined:
    Sep 11, 2010
    Posts:
    39
    Submitted v1.2 (awaiting review).

    New addition: SWF2PNG
    Export MovieClips as PNG image sequences!
     
  7. pdp

    pdp

    Joined:
    Nov 28, 2012
    Posts:
    3
    Hey, the solidify thingy is awesome! Thanks.
     
  8. gabs

    gabs

    Joined:
    Sep 11, 2010
    Posts:
    39
    Thanks :)

    --

    Coming soon:
    Installer wizard that makes the usual 2d sprite plugins solidify its texture atlases after packing.
    [​IMG]

    P.S.: Obviously, I won't include any source code from these 3rd party plugins, it justs inserts the solidify batch at the bottom of the texture packer functions.
     
  9. gabs

    gabs

    Joined:
    Sep 11, 2010
    Posts:
    39
    * added issue tracking system support
     
  10. Burletech

    Burletech

    Joined:
    Jul 1, 2010
    Posts:
    73
    Looks good! Purchased.
     
  11. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    18,520
    does it support ex2D, or would this be easy to add? just curious, its not a biggie for us as we're only interested in saving a few minutes on not solidifying in ps.
     
  12. gabs

    gabs

    Joined:
    Sep 11, 2010
    Posts:
    39
    It's possible. Actually, it's the first on the list to be integrated. It will be up probably by the next weekend.
     
  13. gabs

    gabs

    Joined:
    Sep 11, 2010
    Posts:
    39
    Thanks!

    --

    Submitted v1.2.2:
    Automatic solidify support for ex2D.

    Next (v1.2.3 - soon):
    Automatic solidify support for Sprite Manager 2.
     
    Last edited: Dec 13, 2012
  14. tranvandinh

    tranvandinh

    Joined:
    Dec 6, 2012
    Posts:
    49
  15. gabs

    gabs

    Joined:
    Sep 11, 2010
    Posts:
    39
  16. ShawnMcCoo1

    ShawnMcCoo1

    Joined:
    Dec 26, 2011
    Posts:
    39
    Could you tell me more about what you mean regarding spritesheets from tiled? I use tiled for tilemap editing. Do people using it to animate sprites?
     
  17. gabs

    gabs

    Joined:
    Sep 11, 2010
    Posts:
    39
    Well, on Tiled you have fixed size sprites contained in a texture for tiling. If you're going to be using the same sprites for your maps/levels in Unity, and if you're using a 3rd party sprite plugin (ex2D, SM2, etc..) you will need to cut the sprites and name them properly (that's what Texture Tools does automatically) so the 3rd party plugin can repack them. Now I don't see that being used to animate something.
     
  18. ShawnMcCoo1

    ShawnMcCoo1

    Joined:
    Dec 26, 2011
    Posts:
    39
    I'm just asking for my own information.

    Is it considered a good practice to use (for example) ex2d sprites for tilemapped 2d? If so, is Unity3D's automatic culling of objects outside of the camera's view a reasonable way to handle performance when handling large tilemaps or should one keep an area around the player loaded and manage that manually?

    One final question. The tiled functionality that you mentioned that can bring the tilesets into ex2d sprites. Can this be executed at runtime?
     
    Last edited: Dec 17, 2012
  19. gabs

    gabs

    Joined:
    Sep 11, 2010
    Posts:
    39
    1. Although the sprites are culled off, you would still have one GameObject per tile, at least, so if you're loading and unloading levels at runtime, it's best to use an object pool instead of Object.Instantiate(). Other than that, it should run fast withe the whole level loaded from a tile map.

    2. With some modification, yes. But why? Are your tilesets dynamic?
     
  20. ShawnMcCoo1

    ShawnMcCoo1

    Joined:
    Dec 26, 2011
    Posts:
    39
    I'm just wondering how much time that this tool could offer me out of the box (prevent me from writing the code myself). My development build loads virtually everything at runtime. We can hit a button and have the tilemaps reload instantly, etc to make it easier to iterate. All of our tools are external (it fits for us).
     
  21. gabs

    gabs

    Joined:
    Sep 11, 2010
    Posts:
    39
    Basically, without the fancy editor stuff, the cut texture tool that I wrote for getting the textures from the usual tiled spritesheet is this:
    Code (csharp):
    1.  
    2. int cols = Mathf.CeilToInt((float)Target.width / (float)tileWidth);
    3. int rows = Mathf.CeilToInt((float)Target.height / (float)tileHeight);
    4. for(int x0 = 0; x0 < cols; x0++)
    5. {
    6.     for(int y0 = 0; y0 < rows; y0++)
    7.     {
    8.         string suffix = (x0 + y0 * cols + nameIndexStartAt).ToString();
    9.         Texture2D t2d = new Texture2D(tileWidth, tileHeight, TextureFormat.ARGB32, false);
    10.         int cutWidth = Mathf.Min(tileWidth, previewTexture.width - (x0 * tileWidth));
    11.         int cutHeight = Mathf.Min(tileHeight, previewTexture.height - (y0 * tileHeight));
    12.         Color[] pix = previewTexture.GetPixels(x0 * tileWidth, Mathf.Max(previewTexture.height - ((y0+1) * tileHeight),0), cutWidth, cutHeight);
    13.         t2d.SetPixels(0, tileHeight - cutHeight, cutWidth, cutHeight, pix);
    14.         byte[] ba = t2d.EncodeToPNG();
    15.         using (FileStream fs = File.Create(baseDir + "/" + customPrefix + suffix + ".png"))
    16.         {
    17.             fs.Write(ba, 0, ba.Length);
    18.             fs.Close();
    19.         }
    20.     }
    21. }
    22.  
    Feel free to use it :). Well, I still don't know if this is actually useful for you (like, it would be useful if you had the textures repacked to be used on a 3rd party sprite plugin, like ex2d).
     
  22. gabs

    gabs

    Joined:
    Sep 11, 2010
    Posts:
    39
    Just an update of what's coming on the next update (image attached).
    An editor (runs inside Unity) for pixel art, with layers and animation support.
     

    Attached Files:

  23. nixter

    nixter

    Joined:
    Mar 17, 2012
    Posts:
    312
    Huh. I'm surprised I missed this before. I can view your Asset Store page from your link, but it doesn't show up when I search the term "Texture", only when I search "Tools".

    Any plans for more filter controls?
     
    Last edited: Feb 15, 2013
  24. nilton_felicio

    nilton_felicio

    Joined:
    May 17, 2012
    Posts:
    64
    Texture Tools, works with Unity free?
     
  25. gabs

    gabs

    Joined:
    Sep 11, 2010
    Posts:
    39
    That's weird. It should show up when people search "texture". Anyway, more filter controls are planned (once the pixel art editor is ready). Do you have any filter in particular you would like to see?
     
  26. gabs

    gabs

    Joined:
    Sep 11, 2010
    Posts:
    39
    Yes
     
  27. nixter

    nixter

    Joined:
    Mar 17, 2012
    Posts:
    312
    Well, I meant effects that are similar to standard image editing programs like Photoshop or GIMP, etc. Blurs, Distorts, Noise, Sharpen, Stylize, etc. I spent a little time looking around and the only other script that does that is "Filter Me!". Sounds like your tools would be a good fit for it, especially if you could make it filter quick enough for animation.
     
  28. gabs

    gabs

    Joined:
    Sep 11, 2010
    Posts:
    39
    An update on the Pixel Art Editor:
    [​IMG]

    What's left to add:
    Animation tab;
    Export/import color palettes;
    Onion skin (for animation);
     
  29. gabs

    gabs

    Joined:
    Sep 11, 2010
    Posts:
    39
    Submitted v1.3:
    Pixel Art Editor;
    Fixed odd behavior when the target build was set to webplayer or iOS;

     

    Attached Files:

  30. arvie

    arvie

    Joined:
    Nov 14, 2012
    Posts:
    10
    Awesome. Bought.

    Two things:

    1.) Is / Will there be a toggle switch for the grid on the Pixel Art Editor?

    2.) Will there be an option to import pixel art created from other apps, say, Pixen and continue working on Pixel Art Editor?
     
  31. Kiori

    Kiori

    Joined:
    Jun 25, 2014
    Posts:
    136
    is this asset still being worked on?