POV-Ray : Newsgroups : povray.binaries.images : alpha channel not work Server Time
1 Nov 2024 00:26:17 EDT (-0400)
  alpha channel not work (Message 1 to 10 of 16)  
Goto Latest 10 Messages Next 6 Messages >>>
From: liujg
Subject: alpha channel not work
Date: 6 Aug 2014 02:45:00
Message: <web.53e1ceaf68f323511ccfd0a0@news.povray.org>


Post a reply to this message


Attachments:
Download 'qq??20140806144335.jpg' (101 KB)

Preview of image 'qq??20140806144335.jpg'
qq??20140806144335.jpg


 

From: liujg
Subject: Re: alpha channel not work
Date: 6 Aug 2014 02:50:01
Message: <web.53e1cf44c9af29091ccfd0a0@news.povray.org>
"liujg" <seu### [at] qqcom> wrote:
>


Post a reply to this message


Attachments:
Download 'dhkx0221.png' (1250 KB)

Preview of image 'dhkx0221.png'
dhkx0221.png


 

From: clipka
Subject: Re: alpha channel not work
Date: 6 Aug 2014 03:51:44
Message: <53e1de90$1@news.povray.org>
I'm rather surprised that you do get transparency at the sides of the 
door; are you using object geometry for this?

The door image does have an alpha channel, but that channel is not used 
at all: Each and every pixel is fully opaque. There's nothing POV-Ray 
can do about that.

So whatever you did to try and create a partially transparent image, it 
doesn't seem to work.


Post a reply to this message

From: Thomas de Groot
Subject: Re: alpha channel not work
Date: 6 Aug 2014 04:03:56
Message: <53e1e16c$1@news.povray.org>
On 6-8-2014 9:51, clipka wrote:
> The door image does have an alpha channel, but that channel is not used
> at all: Each and every pixel is fully opaque. There's nothing POV-Ray
> can do about that.

My conclusion too.

liujg: If you use GIMP, load your image there, go to Colours/Colour to 
Alpha... and set Black as your Alpha channel colour. Save your new image 
and try again.

I think you have defined an alpha channel but not the transparency colour.

Thomas


Post a reply to this message

From: liujg
Subject: Re: alpha channel not work
Date: 6 Aug 2014 21:45:00
Message: <web.53e2d950c9af290999daad1c0@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> I'm rather surprised that you do get transparency at the sides of the
> door; are you using object geometry for this?
>
> The door image does have an alpha channel, but that channel is not used
> at all: Each and every pixel is fully opaque. There's nothing POV-Ray
> can do about that.
>
> So whatever you did to try and create a partially transparent image, it
> doesn't seem to work.
Yes,I just post a door picture in the scene,How can I use the  alpha channel.
Thank you!


Post a reply to this message

From: liujg
Subject: Re: alpha channel not work
Date: 6 Aug 2014 21:50:01
Message: <web.53e2da13c9af290999daad1c0@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> I'm rather surprised that you do get transparency at the sides of the
> door; are you using object geometry for this?
>
> The door image does have an alpha channel, but that channel is not used
> at all: Each and every pixel is fully opaque. There's nothing POV-Ray
> can do about that.
>
> So whatever you did to try and create a partially transparent image, it
> doesn't seem to work.
This is my pov

background {
  color rgb < 0.60, 0.70, 0.95 >
}
camera {
  location <0, 15, -60>
 direction <0, 2,  1>
  right x*1.33
 look_at <0,15,0>
}
light_source {
  <0,28,0> // position of a coner of the light plane
  rgb<1.0,1.0,1.0>
  area_light <3, 0, 0>, <0, 3, 0>, 2, 2 // light plane's edges; m by n bulbs
 adaptive 1 // if on, some rays will not be traced
 jitter // randomization of bulb's positions, emulating fuzzy shadow edges
}

  object {
      mesh2{
         vertex_vectors{
                      5
                        <-500, 0, 30>, < 500, 0, 30>,<500,  500, 30>, < -500,
500, 30>  , < 0, 250,  30>

                       }
             uv_vectors{
                       5
                         <-25.0, -25.0>,< 25.0, -25.0> ,  < 25.0,  25.0>,
<-25.0,  25.0>,  <0.0, 0.0>
                       }
           face_indices{
                       4,
                        <0,1,4>, <1,2,4>,<2,3,4>, <3,0,4>

                       }
             uv_indices{
                     4,
                        <0,1,4>, <1,2,4>,<2,3,4>, <3,0,4>

                        }

            }
     texture{
         pigment{
       uv_mapping
        image_map { png "DHKX0221.png"  map_type 0   interpolate 2 }
                }
         finish {
      specular 0.3
      roughness 0.01
                }
            }
}
How can I modify it for use the channel.
Thank you!


Post a reply to this message

From: liujg
Subject: Re: alpha channel not work
Date: 6 Aug 2014 21:55:00
Message: <web.53e2dc22c9af290999daad1c0@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:
> On 6-8-2014 9:51, clipka wrote:
> > The door image does have an alpha channel, but that channel is not used
> > at all: Each and every pixel is fully opaque. There's nothing POV-Ray
> > can do about that.
>
> My conclusion too.
>
> liujg: If you use GIMP, load your image there, go to Colours/Colour to
> Alpha... and set Black as your Alpha channel colour. Save your new image
> and try again.
>
> I think you have defined an alpha channel but not the transparency colour.
>
> Thomas
This is my pov

camera {
  location <0, 15, -40>
 direction <0, 0,  1>
  right x*1.33
 look_at <0,15,0>
}
background {
  color rgb < 0.60, 0.70, 0.95 >
}
light_source {
  <0,28,0> // position of a coner of the light plane
  rgb<1.0,1.0,1.0>
  area_light <3, 0, 0>, <0, 3, 0>, 2, 2 // light plane's edges; m by n bulbs
 adaptive 1 // if on, some rays will not be traced
 jitter // randomization of bulb's positions, emulating fuzzy shadow edges
}
object {
      mesh2{
         vertex_vectors{
                      5

                        <-500, 0, 30>, < 500, 0, 30>,<500,  500, 30>, < -500,
500, 30>  , < 0, 250,  30>

                       }
             uv_vectors{
                       5
                         <-25.0, -25.0>,< 25.0, -25.0> ,  < 25.0,  25.0>,
<-25.0,  25.0>,  <0.0, 0.0>
                       }
           face_indices{
                       4,
                        <0,1,4>, <1,2,4>,<2,3,4>, <3,0,4>

                       }
             uv_indices{
                     4,

                        <0,1,4>, <1,2,4>,<2,3,4>, <3,0,4>

                        }

            }
     texture{
         pigment{
       uv_mapping
        image_map { png "DHKX0221.png"  map_type 0   interpolate 2 }
       // image_map {sys "BACKGND4.BMP" map_type 0   interpolate 2 }
                }
         finish {
      specular 0.3
      roughness 0.01
                }
            }
 // translate <1,  2, 5>
}
How can I modify it.
Thank you!


Post a reply to this message


Attachments:
Download 'render result.png' (121 KB)

Preview of image 'render result.png'
render result.png


 

From: liujg
Subject: Re: alpha channel not work
Date: 6 Aug 2014 22:20:01
Message: <web.53e2e1c0c9af290999daad1c0@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:
> On 6-8-2014 9:51, clipka wrote:
> > The door image does have an alpha channel, but that channel is not used
> > at all: Each and every pixel is fully opaque. There's nothing POV-Ray
> > can do about that.
>
> My conclusion too.
>
> liujg: If you use GIMP, load your image there, go to Colours/Colour to
> Alpha... and set Black as your Alpha channel colour. Save your new image
> and try again.
>
> I think you have defined an alpha channel but not the transparency colour.
>
> Thomas
camera {
  location <0, 15, -40>
 direction <0, 0,  1>
  right x*1.33
 look_at <0,15,0>
}
background {
  color rgb < 0.60, 0.70, 0.95 >
}
light_source {
  <0,28,0> // position of a coner of the light plane
  rgb<1.0,1.0,1.0>
  area_light <3, 0, 0>, <0, 3, 0>, 2, 2 // light plane's edges; m by n bulbs
 adaptive 1 // if on, some rays will not be traced
 jitter // randomization of bulb's positions, emulating fuzzy shadow edges
}
object {
      mesh2{
         vertex_vectors{
                      5

                        <-500, 0, 30>, < 500, 0, 30>,<500,  500, 30>, < -500,
500, 30>  , < 0, 250,  30>

                       }
             uv_vectors{
                       5
                         <-25.0, -25.0>,< 25.0, -25.0> ,  < 25.0,  25.0>,
<-25.0,  25.0>,  <0.0, 0.0>
                       }
           face_indices{
                       4,
                        <0,1,4>, <1,2,4>,<2,3,4>, <3,0,4>

                       }
             uv_indices{
                     4,

                        <0,1,4>, <1,2,4>,<2,3,4>, <3,0,4>

                        }

            }
     texture{
         pigment{
       uv_mapping
        image_map { gif "DHKX0221.gif"  transmit 0, 1.0}
                }
         finish {
      specular 0.3
      roughness 0.01
                }
            }
 // translate <1,  2, 5>
}
Such as can render to have result picture,but I change image_map { gif
"DHKX0221.gif"  transmit 0, 1.0}to image_map { png "DHKX0221.png"  transmit 0,
1.0}. The povray will have a parse error ,keyword "transmit"cann't use with non
color_map image.Why? Thank you.


Post a reply to this message

From: clipka
Subject: Re: alpha channel not work
Date: 7 Aug 2014 01:00:55
Message: <53e30807@news.povray.org>
Am 07.08.2014 03:44, schrieb liujg:
> clipka <ano### [at] anonymousorg> wrote:
>> I'm rather surprised that you do get transparency at the sides of the
>> door; are you using object geometry for this?
>>
>> The door image does have an alpha channel, but that channel is not used
>> at all: Each and every pixel is fully opaque. There's nothing POV-Ray
>> can do about that.
>>
>> So whatever you did to try and create a partially transparent image, it
>> doesn't seem to work.
> This is my pov
...
> How can I modify it for use the channel.
> Thank you!

I think you didn't get the point: The /image/ doesn't use the alpha 
channel it has. To make it work, you have to modify the image you are using.


Post a reply to this message

From: clipka
Subject: Re: alpha channel not work
Date: 7 Aug 2014 01:12:22
Message: <53e30ab6@news.povray.org>
Am 07.08.2014 04:19, schrieb liujg:

>          image_map { gif "DHKX0221.gif"  transmit 0, 1.0}
>                  }
>           finish {
>        specular 0.3
>        roughness 0.01
>                  }
>              }
>   // translate <1,  2, 5>
> }
> Such as can render to have result picture,but I change image_map { gif
> "DHKX0221.gif"  transmit 0, 1.0}to image_map { png "DHKX0221.png"  transmit 0,
> 1.0}. The povray will have a parse error ,keyword "transmit"cann't use with non
> color_map image.Why? Thank you.

In .gif image files, for each pixel only a single value in the range 
0..255 is stored: This is an index into a table of RGB colours (the 
so-called "palette").

The syntax

     image_map { gif "DHKX0221.gif"  transmit 0, 1.0}

tells POV-Ray that each pixel referring to the first entry of the palete 
should be treated as being transparent.


PNG files (normally) don't use a palette, but store RGB colours for each 
pixel, so the above approach does not work.


Post a reply to this message

Goto Latest 10 Messages Next 6 Messages >>>

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