Hi all! I need to create a PNG file containing masks stored in its colour channels. These masks will be used by a game engine (UE4). The question is: How to get those masks in their corresponding channels? It has been advised to use Decompose to separate the colour channels, and while separated one can edit them. Then once done, you put the 3 RGB channels back together with either Recompose or Compose. The problem I have with this method is that after I define what the masks should look like for each colour channel, and put it together, each of the colour channels show the same thing, just in their respective colours of course. Basically as if nothing was done. I attached the a PNG file (from the original TGA), if you inspect it you'll see how each colour channel stores a different mask. Thanks in advance guys
It's difficult to recreate the problem without seeing the xcf, but here's what I tried to save masks to channels: 1) Opened an image (JPG) in GIMP. (Did not flatten or add alpha channel etc) 2) Colors > Components > Decompose to RGB with layers. You should now have 2 images; leave them both open. 3) On the "decomposed" (black-and-white) image: make whatever changes you want to the individual layers. Then Colors > Components > Recompose. 4) The last step should have automatically edited the original image (as long as it was left open). Now export the original image as PNG without flattening. If you check the channels of the original image, it should also show your edits. If this is unclear, I can post screencaps...
Hi Sydney, Thanks a bunch for replying. That's exactly what I have been doing. Mind you, Recompose is not doing a thing, even though the original file is still open. Reason why I use Compose instead. But at the end it simply brings all the layers together without keeping my edits DPC
i tried the steps and works for me, if your having issues maybe try reinstall gimp or make sure you have the latest stable version.
Thanks for joining us Seloquin I did uninstall the previous one along with GimpShop just in case. Then I did reinstall the latest version. But no difference . Still using Recompose does nothing (and the original file is open while I use it). I attached a ZIP file with 3 XCFs. The original, the Decomposed, and the Composed. I hope we solve this mystery DPC
Looks like the transparent background was the issue. I tried this on the original xcf: 1) Decomposed to layers with RGBA. 2) On the decomposed: Edited the blue layer, to be like the one you attached. Then filled in the transparent part of the blue layer with black. Recomposed. 3) The original image now shows the edits, and the muffin is more of a yellow/mustard color. I think the channels needed some color to interpret as transparency, and according to the docs, it's black. EDIT: Ha, saulgoode on Gimpchat beat me to it! I promise I was not quoting him.
haha yeah that explains it all and Sydney your correct. okay ill explain, when you make an image, you have RGB, an image with an alpha channel is RGBA, your image is RGBA, this is visable because your image has some transparancy showing. when you decompose and start editing the colours your actually editing their layermask, its like having 3 layers completely filled; one red, one blue, one green, with each layer having a layer mask, which when you edit your showing/hiding more of the colour, black being transparancy, white opacity (more visable), your saying, i want more or less of this colour here, does that make sense? the reason why your edits arent showing when you recompose, is because your Alpha channel, is set to 100% transparent in the areas your making your changes. so you may for example of added more red outside the bounds of the original image, but you wont see it because that area where you made changes is set to 100% transparent. to fix this, decompose to rgba and make the Alpha channel 100% visable or at least the area's in the alpha channel that you need visable, that way when you recompose you will see all the changes you've made. to make all the alpha channel visable; select the Alpha mask, press the del key, and bucket fill white. if you need to only make part of the image transparent, couple of ways you can do this, the simplest being; follow the above steps, recompose, selection tool [select by colour] > select the black > delete. hope that's helped
This is GREAT! Thank you both for solving this long and annoying mystery! Btw, Seloquin, Ofnuts from GimpForums.com advised not to bother uninstalling/reinstalling as Gimp does not use the Windows registry (of course, assuming one is using Windows, like me). I thought you would like to know. Finally I can move on! DPC