montage: preserving all channels in .exr...
montage: preserving all channels in .exr...
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?
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...
Which version of ImageMagick are you using?
Re: montage: preserving all channels in .exr...
hmm I've tried all sorts of other combinations, can't make this work.
anybody has any ideas?
cheers
anybody has any ideas?
cheers
Re: montage: preserving all channels in .exr...
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...
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
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...
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...
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
?
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...
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 !
thanks !
Re: montage: preserving all channels in .exr...
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}