Hello. I have been trying, unsuccesfully, to insert, or create, an alpha channel, into a preexisting png image that initially does not have it. Specifically, I am trying to inster the greyscale watermask into the alpha channel of a base texture, to use it (the alpha) as specular texture. I am trying to do this with ImageMagick, and I have been reading the documentation and the web, without success. Does anybody know how to instruct the "convert" tool to do this? Thanks in advance.
Guillermo
Alpha channel cration
Like too many technically simple operations, it's as if the authors went out of their way to make the command obscure. It doesn't help that the functionality actually is broken in some of the releases
Code: Select all
convert rgb_input_image.png greyscale.png +matte -compose CopyOpacity -composite rgba_output.png
Selden
- t00fri
- Developer
- Posts: 8772
- Joined: 29.03.2002
- Age: 22
- With us: 22 years 7 months
- Location: Hamburg, Germany
Re: Alpha channel cration
abramson wrote:Hello. I have been trying, unsuccesfully, to insert, or create, an alpha channel, into a preexisting png image that initially does not have it. Specifically, I am trying to inster the greyscale watermask into the alpha channel of a base texture, to use it (the alpha) as specular texture. I am trying to do this with ImageMagick, and I have been reading the documentation and the web, without success. Does anybody know how to instruct the "convert" tool to do this? Thanks in advance.
Guillermo
Guillermo,
as Selden said, ImageMagick is unfortunately broken in many places and also works badly for large files. It has always been a mystery to me why in IM the quality control is sooo bad. They fix one bug and introduce two new ones instead . The number of (sub)versions is also kind of inflationary...Imagine the author started off with this project when we were all using ATARI computers...!
You did not tell us whether your typical png images are small enough to be loaded into GIMP given your RAM size? In GIMP things are MUCH easier and more reliably done.
Bye Fridger
-
Topic authorabramson
- Posts: 408
- Joined: 22.07.2003
- With us: 21 years 4 months
- Location: Bariloche, Argentina
Thanks, guys. I will try with IM as Selden says, or switch to Gimp. It is my first attempt at specularity. Eventually I would like to put the 64k watermark into the 64k base map. I don't know if tile by tile or at some intermediate step. I have 1GB at home, 2GB at my office, and probably access to some machine with more memory, they keep commint and I dont remember any more.
I have just returned from the lakeside, where we saw comet McNaught setting behind the Andes. It's the first day its visible from here. Tomorrow I will go outside with the telescope.
Thanks,
Guillermo
I have just returned from the lakeside, where we saw comet McNaught setting behind the Andes. It's the first day its visible from here. Tomorrow I will go outside with the telescope.
Thanks,
Guillermo
- t00fri
- Developer
- Posts: 8772
- Joined: 29.03.2002
- Age: 22
- With us: 22 years 7 months
- Location: Hamburg, Germany
selden wrote:Don't forget that Celestia can use a separate specularity texture map. You don't have to make it part of the surface texture map image file.
But using RGBA instead of /separate/ RGB + spec saves lots of graphics card memory as explained by Chris already a long long time ago in the dev list...
Incidentally, the best way of manipulating the alpha channel with a recent version of IM is via the 'fx' special effects image operator!
There is even a special tutorial of FX stuff:
http://www.imagemagick.org/script/fx.php
Bye Fridger