POV-Ray : Newsgroups : povray.binaries.images : alpha channel not work : Re: alpha channel not work Server Time
6 Oct 2024 04:58:09 EDT (-0400)
  Re: alpha channel not work  
From: Thorsten Froehlich
Date: 7 Aug 2014 23:45:01
Message: <web.53e446c9c9af290914ed8b7f0@news.povray.org>
> > PNG files (normally) don't use a palette, but store RGB colours for each
> > pixel, so the above approach does not work.
>
> SO How can I use PNG files which contains alpha channel to be treated as being
> transparent in some area.

Your problem is not how to use the alpha channel in POV-Ray, your problem is
that your alpha channel inside the PNG image does not specify any transparent
parts. The alpha channel inside your PNG image currently says all pixels are not
transparent. You need to change the alpha channel inside your PNG image to
specify which parts of the PNG image are to be transparent.

To modify the all-non-transparent alpha channel inside your PNG image, you need
to open your PNG image inside an image editor that supports PNG images with
alpha channel. Then you modify the alpha channel inside the PNG image using the
image editor to specify which parts of the image are transparent. You can only
modify the PNG image inside an image editor. You cannot modify the PNG image
inside POV-Ray.

Once you have specified, using the image editor, which parts of the PNG image
are transparent, the image editor will save a valid alpha channel for your PNG
image. This alpha channel, created by the image editor, needs to specify the
transparent parts of the image, meaning the data in the alpha channel will be
different for transparent and non-transparent parts of the image. All this is
done in an image editor, it is not done in POV-Ray.

After you have specified the transparent parts of the image using your image
editor, you can save the modified PNG image and use it in POV-Ray. But as said,
you need to use the image editor first. This is not a problem with POV-Ray or a
problem using POV-Ray. This is a problem with your PNG image that does not
contain transparent areas in its alpha channel. Its alpha channel currently says
all pixels are non-transaprent. You need to specify which pixels are transparent
inside the PNG image using an image editor.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.