Search Unity

Channel Packer - Pack your maps in a texture's image channels

Discussion in 'Assets and Asset Store' started by StevenP94, Feb 12, 2017.

  1. StevenP94

    StevenP94

    Joined:
    Jun 3, 2013
    Posts:
    143
    Channel packing means using different grayscale images in each channel of a texture: Red, Green, Blue, and optionally Alpha. These channels are usually used to represent traditional RGB color data, plus Alpha transparency. However, each channel is just a grayscale image, so different types of image data can be stored in them.
    Individual channels can be then extracted by a shader to be used for particular effects, for example the red channel for glow, green channel for specular, blue channel for sound types, alpha channel for physics info, etc.

    Channel Packer is a tool that allows to do this (and more) inside the Unity Editor. It is fast and can process single images or a bunch of selected images.

    With Channel Packer you can:
    • Select the desired Packing Mode from a library of pre-made models, including:
      • Standard: Albedo/Diffuse RGB + Height Map
      • MSEO: Metallic + Smoothness + Emission + Ambient Occlusion
      • NSO: Normal + Smoothness + Ambient Occlusion
      • NSM: Normal + Smoothness + Metallic
    • Select the desired Output Size: every texture used as input will be resized, if needed, to the chosen size, to obtain a coherent output image.
    Snap 2017-02-12 at 18.53.53.png

    You can choose between the ‘Single’ mode to process one texture, or the ‘Batch’ mode to process multiple ones sequentially.

    Using ‘Single’ mode you will also have the following options for each input texture:
    • Invert Texture: to invert the image during the packing process.
    • Is a Normal Map: to use images already marked as 'Normal Map'
    • Select the channel to use: to reuse textures previously packed.
    • Choose to use a solid color instead of an image.
    Using ‘Batch’ mode you can select images from your project to create a working list. Once the list will be done, you will have to specify how to get the needed input channel by using filename fragments. For example: *_norm to select normal maps, *_diff for albedo and so on. All the options available in single mode are available when in batch mode too.

    The output textures, generated by packing operation, will be saved in the desired project folder as the portable network graphic (.PNG) or Truevision Targa (.TGA) format.

    The tool will be enhanced with a visual editor that will allows you to prepare your own packing models, adding them to the standard model library to customize the tool as you prefer.

    Available on the asset store:

    https://www.assetstore.unity3d.com/en/#!/content/84299
     
    Last edited: Apr 18, 2017
    TeagansDad, mk1978, one_one and 7 others like this.
  2. StevenP94

    StevenP94

    Joined:
    Jun 3, 2013
    Posts:
    143
    Update:
    Batch mode will be completed in a couple of days, I'm preparing the website and other stuff required to be accepted and published on the that Asset store.
     
  3. StevenP94

    StevenP94

    Joined:
    Jun 3, 2013
    Posts:
    143
    Status update:
    Single mode is done.
    Batch mode is done.
    I'm writing docs.
    submission day is near ;)
     
    Goodgulf likes this.
  4. auhfel

    auhfel

    Joined:
    Jul 5, 2015
    Posts:
    92
    I need you to finish this soon o.0 lol. I suck at texture stuff. The resize will be especially helpful too.
     
  5. StevenP94

    StevenP94

    Joined:
    Jun 3, 2013
    Posts:
    143
    I'm working hard to finish as soon as possible. Is my first submission on the asset store so I don't know exactly how to estimate timing. I Apologize for this.
     
  6. auhfel

    auhfel

    Joined:
    Jul 5, 2015
    Posts:
    92
    lol dw you're ok. I'm just looking forward to using it.
     
  7. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684
    Expect a minor complication requiring you to re-submit. It happens a lot. ;)
     
    StevenP94 likes this.
  8. StevenP94

    StevenP94

    Joined:
    Jun 3, 2013
    Posts:
    143
    First version of documentation is ready, please take a look and tell me what do you think about it.
    channelpacker.pdf
     
  9. Nateply

    Nateply

    Joined:
    May 20, 2014
    Posts:
    46
    Looks good. They are clear and understandable. Tested all packing for megasplat compatibility? Also what are requirements for input textures? PNG, jpeg, etc., and do they all need to be the same resolution?
     
  10. StevenP94

    StevenP94

    Joined:
    Jun 3, 2013
    Posts:
    143
    The tool was developed thinking to Megasplat, so all should be compatible. There are no special requirements for input textures, I've tested tga, png and jpg, they don't need to have the same resolution because the tool do the scaling to the output resolution you select.
     
  11. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    PNG has issues with alpha channels as Jason has explained in his video blogs.. PNG apparently doesn't retain them. I had issues even in Photoshop trying to merge the textures -it has issues.
     
  12. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684
    It's a Photoshop issue, but not a GIMP one. GIMP does it fine.
     
    Ascensi likes this.
  13. StevenP94

    StevenP94

    Joined:
    Jun 3, 2013
    Posts:
    143
    Anyway I made the submission to the asset store, was a long journey and I'm still preparing the website and all other things they need to start this thing.
    Meanwhile I'm working on the first update to remove the need to have a 'read/write enabled' flag on every input map as jbooth suggested. This will make an easier workflow and a faster process.
     
  14. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    It's also a Unity issue. If you have a pure white alpha channel in a png file, Unity will compress the texture as RGB24 format (or DXT1, etc). This makes sense if you think about it, because 1 is the default alpha value, so not storing alpha saves some space and lets you use a better compression format! Awesome!

    But the problem comes when you try to put that texture into a texture array, which requires that all textures be the same format, suddenly you have 30 textures as RGB32/DXT5/Etc, and one which is RGB24/DXT1/Etc because it's alpha channel is white.

    The photoshop issue comes because PNG's prefer premultiplied alpha channels. So unless you install an alternate png loader, it will often load your alpha channel as transparency in the layer rather than it being an actual alpha channel.

    Basically, all image formats suck for one reason or another, which is why we keep having new ones..
     
    evilangel89, Goodgulf and hopeful like this.
  15. StevenP94

    StevenP94

    Joined:
    Jun 3, 2013
    Posts:
    143
    At the moment the only way to save the packed texture is PNG. I'm working to add other formats, probably TGA.
    I'll keep you informed.
     
    Tethys likes this.
  16. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,610
    hopeful likes this.
  17. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
  18. StevenP94

    StevenP94

    Joined:
    Jun 3, 2013
    Posts:
    143
  19. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    851
    I would like to see channel packer do normalSAO to a tga.
     
  20. Tethys

    Tethys

    Joined:
    Jul 2, 2012
    Posts:
    672
    Greetings @StevenP94 - We picked up this asset last night and ran into an issue with the standard Single packer. Every time I pack an Albedo and Height map together, the new saved Albedo is much darker. I've tried this on a few maps now. I drop the appropriate maps in the 2 slots, leave default settings and hit save and the new map is darker than the original. I'm on Unity Pro 5.5.1 and Windows and project is in Linear color space.

    I also want to add a vote for saving in the TGA format. I bought this to save time when packing maps for MegaSplat and RTP, both of which benefit from having TGA input maps(didn't realize initially that the asset only saved in PNG's until reading through the manual). Thanks!
     
  21. StevenP94

    StevenP94

    Joined:
    Jun 3, 2013
    Posts:
    143
    hello @Tethys thanks for buying Channel Packer. I'll do some test to see what could make the output darker then the input map. Can you send me a PM or a mail with the input maps ?
    Regards.
     
  22. StevenP94

    StevenP94

    Joined:
    Jun 3, 2013
    Posts:
    143
    I found the problem and I'm submitting the new version right now. Please contact me by email or pm and send me your invoice number if you need a patched version quickly.
     
    Tethys likes this.
  23. Tethys

    Tethys

    Joined:
    Jul 2, 2012
    Posts:
    672
    Thanks, message sent!
     
  24. Tethys

    Tethys

    Joined:
    Jul 2, 2012
    Posts:
    672
    Thanks for the fix, works perfect now. My only criticism is being limited to saving in the PNG format. For those of us needing TGA we need to use a different packer or re-export out of Photoshop to TGA after saving with Channel Packer in Unity.
     
  25. StevenP94

    StevenP94

    Joined:
    Jun 3, 2013
    Posts:
    143
    Happy to hear that version 0.82 fix the problem.
    Unity allows saving bitmaps as PNG or JPG only. PNG is the only lossless format available out of the box.
    I'm working to write a custom exporter to save images as TGA, but can't estimate the timing yet.
    Meanwhile I hope that you enjoy the Channel Packer ;)
     
  26. StevenP94

    StevenP94

    Joined:
    Jun 3, 2013
    Posts:
    143
    @Tethys save as TGA is ready, but only in uncompressed format; I'm working on compression now, next version (0.83) of Channel Packer should do what you need.
     
    Tethys likes this.
  27. Tethys

    Tethys

    Joined:
    Jul 2, 2012
    Posts:
    672
    Awesome man! I should have mentioned, RTP comes with a free texture packer, it may be open source and a good reference (it saves in TGA format) but it looks like you already got it sorted. Good stuff!
     
  28. StevenP94

    StevenP94

    Joined:
    Jun 3, 2013
    Posts:
    143
    I own RTP and can't find any texture packer with TGA saving, can you be more specific, please ?
     
  29. StevenP94

    StevenP94

    Joined:
    Jun 3, 2013
    Posts:
    143
    @Ascensi, @wood333, @Tethys

    Version 0.83 is ready to be submitted to the Asset Store.
    In this version you can choose the output format between PNG, TGA Uncompressed, TGA Compressed.
    If you need a patch and can't wait for Asset Store update, please contact me giving your email address and the invoice number.
     
    Last edited: Apr 5, 2017
    Nateply and Tethys like this.
  30. Tethys

    Tethys

    Joined:
    Jul 2, 2012
    Posts:
    672
    Well done man, review incoming in the next couple days. Thanks for listening!
     
  31. gibmation

    gibmation

    Joined:
    Dec 1, 2014
    Posts:
    311
    Is it possible to include support up to 8k files please.
    Be useful for terrains etc.
    Thanks
     
  32. StevenP94

    StevenP94

    Joined:
    Jun 3, 2013
    Posts:
    143
    @gibmation Do you mean 8192x8192 resolution ?
    AFAIK Unity supports max 4096x4096 texture resolution. I'll make some experiments to test resolutions higher than 2048x2048 that is currently the upper bound.
     
  33. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684
    Unity supports up to 8k resolution, and has for about a year or so. If I click on a texture's resolution, it can go up to 8k.
     
  34. StevenP94

    StevenP94

    Joined:
    Jun 3, 2013
    Posts:
    143
    @hopeful you are right, my mistake: I never used such resolution before.

    Btw the version 0.83, already submitted to the Asset Store, allows textures up to 8192x8192, in addition to the 'save as .TGA' feature.

    @gibmation If you need a patch and can't wait for the Asset Store update, please contact me giving your email address and the invoice number.
     
  35. gibmation

    gibmation

    Joined:
    Dec 1, 2014
    Posts:
    311
    Looks like you've submitted with higher version than I have. 5.5.1f1
    There's no hurry.
    Also not sure if you already corrected this, there is a spelling error in the Generate button - texture is missing the 2nd "t".
     
  36. StevenP94

    StevenP94

    Joined:
    Jun 3, 2013
    Posts:
    143
    I've submitted with 5.5.2p4 but should work with any 5.x version (probably 4.x too)
    Thanks for reporting the typo, I'll fix in the next version ;)
     
  37. StevenP94

    StevenP94

    Joined:
    Jun 3, 2013
    Posts:
    143
    version 0.83 is now available on Asset Store:
    - New option to save as TGA Uncompressed, TGA Compressed or PNG32.
    - Added 4096 and 8192 to the list of output sizes.
     
    Tethys likes this.
  38. Tethys

    Tethys

    Joined:
    Jul 2, 2012
    Posts:
    672
    We got it yesterday and were packing up Texture Arrays for MegaSplat very quickly. I like how it autonames, initially, the new file for us so it saves time typing in a title every time. I also like how once the path is set, for each new texture I pack its already there and if I need to change it its just a quick press of the button, back one directory and boom, done. This asset has the needed features now and works very quickly. I like it. :)
     
    StevenP94 and gibmation like this.
  39. StevenP94

    StevenP94

    Joined:
    Jun 3, 2013
    Posts:
    143
    @Tethys thanks a lot, I'm really happy that the asset works well and is useful. ;)
     
    Tethys likes this.
  40. StevenP94

    StevenP94

    Joined:
    Jun 3, 2013
    Posts:
    143
    @all: Please make reviews of ChannelPacker, if you can, because is still in the 'Not enough ratings' condition, at this moment
    Thanks a lot to everybody!
     
    jbooth likes this.
  41. camel82106

    camel82106

    Joined:
    Jul 2, 2013
    Posts:
    304
    Hi,
    I have bought your asset. But now I see that it is not available for unity 5.4. Would it be please possible to add it? Or is there an reason for 5.5+ requirement?

    Thanks
    Peter
     
  42. StevenP94

    StevenP94

    Joined:
    Jun 3, 2013
    Posts:
    143
    @camel82106 Thanks for your purchase. I've submitted the asset with version 5.5.2p4 but it should work with any 5.x version (probably 4.x too) without problems.
    Btw I'll make submissions with other versions to fix this problem,

    Edit: what you mean with "not available for unity 5.4" ? You can't download the asset ?
     
  43. camel82106

    camel82106

    Joined:
    Jul 2, 2013
    Posts:
    304
    Yeah asset store will allow download only with unity version version > 5.5.2 now. As you have uploaded asset on this version.
     
  44. StevenP94

    StevenP94

    Joined:
    Jun 3, 2013
    Posts:
    143
    @camel82106 Please send me a pm with your email and your invoce number, I'll send you the asset by email, while submitting for other versions (that I suppose that needs time to be approved).
     
  45. camel82106

    camel82106

    Joined:
    Jul 2, 2013
    Posts:
    304
    I have sent you an PM thanks.
     
  46. StevenP94

    StevenP94

    Joined:
    Jun 3, 2013
    Posts:
    143
  47. StevenP94

    StevenP94

    Joined:
    Jun 3, 2013
    Posts:
    143
    The upcoming version 0.84 will extend the compatibility to all the 5.x unity versions, and will be released on the Asset Store with 5.0 as requirement.
    If anyone need the 0.84 upgrade in advance, please contact me giving email and invoice id; I'll provide to send you a patched version.
     
  48. Tethys

    Tethys

    Joined:
    Jul 2, 2012
    Posts:
    672
    Speaking of approvals, I was just asked to do a survey about the Asset Store. I listed waiting for asset update approval as being inefficient and a pain in the ass for both the developer and the consumer, and that NO ONE else is doing it this way. Companies that are much bigger, a lot more money and a lot more experience running app stores do not require developers updates to be approved. Approval should only be needed to make an asset in the store the first time, not for every update. Unity needs to step up their game and get more like Steam, Amazon, Android and Apple and just allow their developers to push updates to the store as needed and it be automatic. I implore others to speak their mind as well if you do not like the asset store process(probably not here of course, but in a survey or thread about the subject heh).
     
    hopeful and StevenP94 like this.
  49. holyfot

    holyfot

    Joined:
    Dec 16, 2016
    Posts:
    42
    Having an error when trying to convert Standard or normSAO. I have my textures set to RGBA32 and Linear and Read/Write. Cannot figure out why I get this error

    Unsupported texture format for ReadPixels - needs to be ARGB32, RGB24, RGBAFloat, ARGBFloat or RGBAHalf
    UnityEngine.Texture2D:ReadPixels(Rect, Int32, Int32)
    holoGames.ChannelPacker.CpUtils:GetTextureIgnoreRW(Texture2D) (at Assets/MegaSplat/Editor/CpUtils.cs:507)
    holoGames.ChannelPacker.CpUtils:DoBatchCombine(CpRecipe, Int32, String, Int32, Int32, Int32) (at Assets/MegaSplat/Editor/CpUtils.cs:81)
     
  50. StevenP94

    StevenP94

    Joined:
    Jun 3, 2013
    Posts:
    143
    Which version of unity are you using ?
    Please send me your invoice number and your email, I'll send you the new Channel Packer v.0.84 that has increased compatibility and should solve your problem.
    Regards.