Page 1 of 1
montage: preserving all channels in .exr...
Posted: 2015-06-14T13:06:38-07:00
by flamz
hello,
I am trying to "montage" a bunch of RGBA exr files into 1 tiled image.
I literally want to "copy and paste" each image into the tiled image without modifying any RGBA pixel values.
But ImageMagick insists on messing around with my alpha channel. No matter what option I use, it insists on treating it like a mask, when it is basically just part of the "color data".... (some pixels are blue, but 50% transparent, some pixels are blue but 10% transparent).
I use this:
montage.exe {image0} {image1} {image2} {image3} {image4} {image5} -background none -channel rgba -alpha on -tile 6x1 -geometry +0+0 ";
any tips?
Re: montage: preserving all channels in .exr...
Posted: 2015-06-14T13:09:06-07:00
by dlemstra
Which version of ImageMagick are you using?
Re: montage: preserving all channels in .exr...
Posted: 2015-06-14T13:11:14-07:00
by flamz
6.9
Re: montage: preserving all channels in .exr...
Posted: 2015-06-20T04:40:59-07:00
by flamz
hmm I've tried all sorts of other combinations, can't make this work.
anybody has any ideas?
cheers
Re: montage: preserving all channels in .exr...
Posted: 2015-06-20T04:48:57-07:00
by dlemstra
Can you share an image on something like dropbox/onedrive and post the command that you are using?
Re: montage: preserving all channels in .exr...
Posted: 2015-06-20T05:03:51-07:00
by flamz
Sure, here's a zip with the source RGBA images, and the resulting montage (called cubemap_color_m414.233_75.38_373.8693.exr)
Command line I'm using "montage.exe top.exr bottom.exr left.exr right.exr up.exr down.exr -background none -channel rgba -alpha on -tile 6x1 -geometry +0+0 result.exr";
In the resulting image, the alpha channel is "correct", but the color components where alpha was < 1.0 were set to black (the clouds and sky are gone and replaced by black pixels).
https://drive.google.com/open?id=0B_KkT ... authuser=0
Re: montage: preserving all channels in .exr...
Posted: 2015-06-20T05:30:11-07:00
by dlemstra
I cannot reproduce your issue with ImageMagick 6.9.1-6 beta (will be released soon). How are you testing if the image still has transparency? If I convert 'cubemap_color_m414.233_75.38_373.8693.exr' to a png file I get an image with an alpha channel. Are you converting the image to a .jpg file? JPEG has no transparency and will make the transparent color black.
Re: montage: preserving all channels in .exr...
Posted: 2015-06-20T05:50:38-07:00
by flamz
I am not doing anything other than calling the command line I posted. I am not converting into JPEG or anything like that.
I am simply piping RGBA exr files into montage, but somehow it drops the color of pixels that have transparency.
here's a picture showing what I see when I open a source image (top) and the result (bottom) in Photoshop.
As you can see, the source image has a blue sky and clouds (which have an alpha value of 0.0) and mountains which have an alpha value of 1.0.
https://drive.google.com/a/unity3d.com/ ... pmak0/edit
In the resulting image however, you can see that the sky RGB pixel values were not "copied", only the alpha values were successfully copied.
I am missing some operation on the command line?
-background none -channel rgba -alpha on -tile 6x1 -geometry +0+0 result.exr
?
Re: montage: preserving all channels in .exr...
Posted: 2015-06-20T12:08:05-07:00
by flamz
I solve my problem by first splitting all input files into 4 files representing each R G B and A channels. I then "montage" each channels into 4 tiled cubemaps and finaly recombine all those into a single RGBA cubemap.
thanks !
Re: montage: preserving all channels in .exr...
Posted: 2015-06-21T08:08:11-07:00
by dlemstra
I think you are getting this output because of how the montage is created. I just realized you could also just do this:
Code: Select all
convert.exe {image0} {image1} {image2} {image3} {image4} {image5} +append {output}