Page 1 of 1

Channel Packing Images?

Posted: Fri Dec 07, 2018 6:19 pm
by dskeithbuck
Hi,

I'm trying to automate the process of combining 3 grayscale images into one RGB image. I'm also hoping to automate the conversion of an RGBA image into one RGB image and one Greyscale image.

I noticed the channel mapper - which seems sort of what I'm looking for, but best I can tell it only works for audio.

If this isn't natively available, is it possible to write a plugin for FFAStrans that would allow for this?

As to why I would want to do this? I'm working with 3D software that generates Metalness, Roughness, and Ambient Occlusion maps as individual images, and the next program in my pipeline requires they be encoded into a single RGB image.
Thanks!

Donovan

PS: FFAStrans is an incredible piece of software. Glad to have discovered it.

Re: Channel Packing Images?

Posted: Fri Dec 07, 2018 8:55 pm
by emcodem
Hey Donovan,
i am sure Steinar, the creator has to say something about that in the next few hours but might i ask up in front if there is a reason why you desperately want this as a native plugin instead of just executing some commandline batch?

Re: Channel Packing Images?

Posted: Fri Dec 07, 2018 10:41 pm
by dskeithbuck
Hey emcodem,

No great reason except that I'd like to build as many workflows as possible around ffastrans as it seems much simpler (for me) than generating a bunch of command line scripts for processing images.
Thanks,

Donovan

Re: Channel Packing Images?

Posted: Sat Dec 08, 2018 11:53 am
by admin
Hi Donovan, thank you for using FFAStrans and welcome to the forum! :-)

I'm glad you like FFAStrans and want to use it as much as you can, but I think your scenario is a bit "odd" in regards to what FFAStrans normally should do natively. Not that it's very complicated but it seems like a highly specialized scenario. Luckily, FFAStrans enables you to do very complex stuff by incorporating AviSynth and the ability to run scripts/commands. This lets you do virtually anything from within FFAStrans but you need to do SOME special adaptations yourself. Now, I'm suprised your 3D-software does not let you create complete finished image... How do you normally solve this?

-steinar

Re: Channel Packing Images?

Posted: Mon Dec 10, 2018 6:24 pm
by dskeithbuck
Hi Steinar,

I'm using a 3D application which bakes out the Metalness/Roughness/Ambient Occlusion into separate grayscale maps. I'm then ingesting these into a realtime 3D application which needs those maps combined into a single image for (I assume) filesize reasons. I'm also hoping to bake out full resolution (2k or 4k) maps, which I then compress down to 256x256 or 512x512 (as needed) JPGs so that I can reach my filesize targets. The process is relatively simple with the exported maps for one object (I use photoshop) - but it becomes more challenging when attempting to export dozens of maps than then recompressing them one by one to achieve a 2mb max filesize in my realtime application.

But yes, it's an incredibly specific workflow. Can you please direct me to examples of AviSynth scripting w/ FFAStrans?
Thanks,

Donovan

Re: Channel Packing Images?

Posted: Mon Dec 10, 2018 7:51 pm
by emcodem
Hey Donovan, here is an example workflow for you that merges R G and B channels from separate jpg files.

...just scroll down to the bottom... viewtopic.php?f=5&t=774

Although this workflow was created for you personally, please ask any related question in this very thread and not in the linked one.

Re: Channel Packing Images?

Posted: Thu Dec 20, 2018 2:06 am
by dskeithbuck
emcodem wrote: Mon Dec 10, 2018 7:51 pm Hey Donovan, here is an example workflow for you that merges R G and B channels from separate jpg files.
Thanks so much @emcodem! Exactly what I was looking for. Took me a second to figure out what you were doing to generate the image names for the G & B channels - quite clever.