Enhancement request - Use alpha channel for non-transparent information

View: New views
4 Messages — Rating Filter:   Alert me  

Enhancement request - Use alpha channel for non-transparent information

by Snake Arsenic :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Okay I made a feature request at
http://bugzilla.gnome.org/show_bug.cgi?id=543810 but it's missing a
solution that will not remove any functionality.

Martin mentioned something about supporting auxiliary channels in RGB
mode and I'm not sure what that means so if anyone could help me out on
that or give advise on how this could work. Also
http://bugzilla.gnome.org/show_bug.cgi?id=486902 was referenced and
again, I don't see how that relates to my feature request but I am open
to hear from anyone willing to explain.

A copy of the request is below.

When I use GIMP I sometimes use the alpha channel for things like bump maps,
specular maps or even parallax maps and would be good if there was a
check box
when you right-click the alpha layer that would enable/disable it's use for
transparency.

This could have the same effect as using the threshold alpha with a
setting of
0 while it's disabled.

Another way to do it could be if you make the alpha channel invisible it
would
look like the threshold alpha mentioned above and when only the alpha
channel
is selected then you could edit and apply effects to the alpha channel
as if it
were a custom channel.

This could apply with all channels but I believe the alpha channel needs
this
the most.

_______________________________________________
Gimp-developer mailing list
Gimp-developer@...
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

Re: Enhancement request - Use alpha channel for non-transparent information

by Raphaël Quinet :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sun, 20 Jul 2008 21:22:11 +1000, Snake Arsenic <snakearsenic@...> wrote:
> Okay I made a feature request at
> http://bugzilla.gnome.org/show_bug.cgi?id=543810 but it's missing a
> solution that will not remove any functionality. [...]

I think that it would be a big mistake to use the alpha channel for
anything else than transparency.  I assume that you are asking for this
because you have some program (I don't know which one) that is
incorrectly using the alpha channel to store bump map information or
something else that is not related to transparency.  It is likely that
this program doesn't use a file format that supports layers or independent channels, so its authors of have decided to hijack the
alpha channel in some existing file format.

The correct way to solve this problem is to use layers instead of
abusing the alpha channel (or maybe additional channels, but I think
that using layers would be more convenient in this case).  With layers,
it is very easy to toggle the visibility of the image or the bump map
layer, specular map layer or whatever else you are working on.

So instead of extending the mistakes done by the authors of some other
software, it would be much better to know what file format has been
subverted, and to perform the conversion in the file plug-in:
* When the plug-in loads a file that uses this strange format, it would
  convert the alpha channel into a layer and mark that layer (using a
  special name like the GIF plug-in does for animations, because that
  can be edited easily by the user if necessary).
* You would then be free to edit the image in GIMP and modify the layer
  containing what should be visible or the layer containing the bump
  map.
* When saving the file, the plug-in would detect that some layers have
  a special name and would then combine these layers in a way that can
  be read by whatever other program you are using.

So I suggest that you:
1) Identify what file formats need some special treatment.
2) Check if there is a way to detect what files using that format are
   special, so that we do not have to ask the user every time if a file
   using that file format should be read in the intended way (alpha
   channel = transparency) or in the non-standard way (bump map).
3) Suggest improvements to the corresponding file plug-ins, instead of
   requesting major changes in the GIMP core.

-Raphaël
_______________________________________________
Gimp-developer mailing list
Gimp-developer@...
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

Re: Enhancement request - Use alpha channel for non-transparent information

by Joao S. O. Bueno Calligaris :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sunday 20 July 2008, Raphaël Quinet wrote:
> On Sun, 20 Jul 2008 21:22:11 +1000, Snake Arsenic
<snakearsenic@...> wrote:
> > Okay I made a feature request at
> > http://bugzilla.gnome.org/show_bug.cgi?id=543810 but it's missing
> > a solution that will not remove any functionality. [...]
>

Hi!
Going beyond all of Raphael's excelent remarks, I still see some
issues here :
1) The ability to  "ciew teh layer sans transparency" and "edit the
alpha channel as if it where any other channel" is provided in GIMP -
you copy the alpha channel to the layer's mask, and edit it (the
layer's mask).

2) The request indeed points a thing: GIMP _has_ the ability to set
each channel "visible" or not - in the layers channel. If the <image>
channel is disabled in the channels dialog, channel cvaleus are
considere as zero for all display operations.  However, setting  the
alpha channel to zero in this way - which is what gimp does -is
useless - you just can't see anything in the image, as it is rendered
with alpha = 0 for all layers.
I'd suggest that when the alpha channekll si disabled in the channel
dialog, image is rendered with alpha =1.0  (255)  insetead.  That
would:
   a) enable the feature thought when the ability to run channel'son
and off was included;
   b) Make gimp attend the requesterś (Snake) needs.

Maybe the bug request should be chanegd accordingly?

Moreover -  I really think it is a more usefull (even if seldom used)
behavior for disabling the alpha. What do you say of doing it?

> I think that it would be a big mistake to use the alpha channel for
> anything else than transparency.  I assume that you are asking for
> this because you have some program (I don't know which one) that is
> incorrectly using the alpha channel to store bump map information
> or something else that is not related to transparency.  It is
> likely that this program doesn't use a file format that supports
> layers or independent channels, so its authors of have decided to
> hijack the alpha channel in some existing file format.

> The correct way to solve this problem is to use layers instead of
> abusing the alpha channel (or maybe additional channels, but I
> think that using layers would be more convenient in this case).
> With layers, it is very easy to toggle the visibility of the image
> or the bump map layer, specular map layer or whatever else you are
> working on.
>
> So instead of extending the mistakes done by the authors of some
> other software, it would be much better to know what file format
> has been subverted, and to perform the conversion in the file
> plug-in: * When the plug-in loads a file that uses this strange
> format, it would convert the alpha channel into a layer and mark
> that layer (using a special name like the GIF plug-in does for
> animations, because that can be edited easily by the user if
> necessary).
> * You would then be free to edit the image in GIMP and modify the
> layer containing what should be visible or the layer containing the
> bump map.
> * When saving the file, the plug-in would detect that some layers
> have a special name and would then combine these layers in a way
> that can be read by whatever other program you are using.
>
> So I suggest that you:
> 1) Identify what file formats need some special treatment.
> 2) Check if there is a way to detect what files using that format
> are special, so that we do not have to ask the user every time if a
> file using that file format should be read in the intended way
> (alpha channel = transparency) or in the non-standard way (bump
> map). 3) Suggest improvements to the corresponding file plug-ins,
> instead of requesting major changes in the GIMP core.
> -Raphaël
> _______________________________________________
> Gimp-developer mailing list
> Gimp-developer@...
> https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


_______________________________________________
Gimp-developer mailing list
Gimp-developer@...
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

Parent Message unknown Re: Enhancement request - Use alpha channel for non-transparent information

by Snake Arsenic :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

That sounds really good Joao, I was thinking of a "use layer as alpha"
overriding

option for the TGA save dialog(which eliminates the layer being used in the final image
other than to serve as the alpha channel, of course).

I'm also thinking of an "extract alpha to layer" option
in a menu such as transparency or as a filter that also performs the function of
setting the alpha channel to 1.0 in all pixels of that layer.

This could provide easy editing of multiple layers with individual masks/alpha as
the combined alpha has messed up the mapping in a few cases as well as providing an easy
method of re-editing an image if the original is lost as TGA files only have one layer.

It also makes it easy to hide all unnecessary layers before using this "extract alpha channel"
function to extract the correct information if more than one layer is present.

The reason I say TGA is because that is the only format I know
of being used in this way and is very common for a wide range of 3d applications.

What do you think of these ideas on top on Joao's?

Joao S. O. Bueno wrote:

> On Sunday 20 July 2008, Raphaël Quinet wrote:
>  
>> On Sun, 20 Jul 2008 21:22:11 +1000, Snake Arsenic
>>    
> <snakearsenic@...> wrote:
>  
>>> Okay I made a feature request at
>>> http://bugzilla.gnome.org/show_bug.cgi?id=543810 but it's missing
>>> a solution that will not remove any functionality. [...]
>>>      
>
> Hi!
> Going beyond all of Raphael's excelent remarks, I still see some
> issues here :
> 1) The ability to  "ciew teh layer sans transparency" and "edit the
> alpha channel as if it where any other channel" is provided in GIMP -
> you copy the alpha channel to the layer's mask, and edit it (the
> layer's mask).
>
> 2) The request indeed points a thing: GIMP _has_ the ability to set
> each channel "visible" or not - in the layers channel. If the <image>
> channel is disabled in the channels dialog, channel cvaleus are
> considere as zero for all display operations.  However, setting  the
> alpha channel to zero in this way - which is what gimp does -is
> useless - you just can't see anything in the image, as it is rendered
> with alpha = 0 for all layers.
> I'd suggest that when the alpha channekll si disabled in the channel
> dialog, image is rendered with alpha =1.0  (255)  insetead.  That
> would:
>    a) enable the feature thought when the ability to run channel'son
> and off was included;
>    b) Make gimp attend the requesterś (Snake) needs.
>
> Maybe the bug request should be chanegd accordingly?
>
> Moreover -  I really think it is a more usefull (even if seldom used)
> behavior for disabling the alpha. What do you say of doing it?
>
>  
>> I think that it would be a big mistake to use the alpha channel for
>> anything else than transparency.  I assume that you are asking for
>> this because you have some program (I don't know which one) that is
>> incorrectly using the alpha channel to store bump map information
>> or something else that is not related to transparency.  It is
>> likely that this program doesn't use a file format that supports
>> layers or independent channels, so its authors of have decided to
>> hijack the alpha channel in some existing file format.
>>    
>
>  
>> The correct way to solve this problem is to use layers instead of
>> abusing the alpha channel (or maybe additional channels, but I
>> think that using layers would be more convenient in this case).
>> With layers, it is very easy to toggle the visibility of the image
>> or the bump map layer, specular map layer or whatever else you are
>> working on.
>>
>> So instead of extending the mistakes done by the authors of some
>> other software, it would be much better to know what file format
>> has been subverted, and to perform the conversion in the file
>> plug-in: * When the plug-in loads a file that uses this strange
>> format, it would convert the alpha channel into a layer and mark
>> that layer (using a special name like the GIF plug-in does for
>> animations, because that can be edited easily by the user if
>> necessary).
>> * You would then be free to edit the image in GIMP and modify the
>> layer containing what should be visible or the layer containing the
>> bump map.
>> * When saving the file, the plug-in would detect that some layers
>> have a special name and would then combine these layers in a way
>> that can be read by whatever other program you are using.
>>
>> So I suggest that you:
>> 1) Identify what file formats need some special treatment.
>> 2) Check if there is a way to detect what files using that format
>> are special, so that we do not have to ask the user every time if a
>> file using that file format should be read in the intended way
>> (alpha channel = transparency) or in the non-standard way (bump
>> map). 3) Suggest improvements to the corresponding file plug-ins,
>> instead of requesting major changes in the GIMP core.
>> -Raphaël
>> _______________________________________________
>> Gimp-developer mailing list
>> Gimp-developer@...
>> https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
>>    
>
>
> _______________________________________________
> Gimp-developer mailing list
> Gimp-developer@...
> https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
>  



_______________________________________________
Gimp-developer mailing list
Gimp-developer@...
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer