POV-Ray : Newsgroups : povray.newusers : Alpha texture Server Time
1 Nov 2024 08:13:14 EDT (-0400)
  Alpha texture (Message 1 to 5 of 5)  
From: tony
Subject: Alpha texture
Date: 5 Sep 2009 13:45:00
Message: <web.4aa2a326d3411cef48d890540@news.povray.org>
Hi all:

I wish to make a render of a tree.

I am papped uv the leaves. I put the following code:


texture {
  pigment { image_map{ png "palmera.png"  interpolate 2}}
  normal { bump_map{ png "palmera_bump.png" bump_size 0.8}}
  finish { diffuse 0.8 specular 0.5 ambient 0.100000 roughness 1/50 }
 }

what it takes to put for the plane transparent?

Thanks.

Tony


Post a reply to this message

From: Robert McGregor
Subject: Re: Alpha texture
Date: 5 Sep 2009 14:15:00
Message: <web.4aa2aa5bae2533104726e92b0@news.povray.org>
"tony" <nomail@nomail> wrote:
> Hi all:
>
> I wish to make a render of a tree.
>
> I am papped uv the leaves. I put the following code:
>
>
> texture {
>   pigment { image_map{ png "palmera.png"  interpolate 2}}
>   normal { bump_map{ png "palmera_bump.png" bump_size 0.8}}
>   finish { diffuse 0.8 specular 0.5 ambient 0.100000 roughness 1/50 }
>  }
>
> what it takes to put for the plane transparent?
>
> Thanks.
>
> Tony

That would be the same technique that Edouard demonstrated before except using a
palmera_mask where the area outside the leaf is black and inside the leaf is
white. Transparent texture for the black areas and leaf texture for the white
areas, something like:

#declare T_Palmera = texture {
   pigment { image_map{ png "palmera.png"  interpolate 2}}
   normal { bump_map{ png "palmera_bump.png" bump_size 0.8}}
   finish { diffuse 0.8 specular 0.5 ambient 0.100000 roughness 1/50 }
}

texture {
   image_pattern { png "palmera_mask.png" }
   texture_map {
      [0 pigment { rgbt 1 } finish { ambient 0 diffuse 0 } ]
      [1 T_Palmera ]
   }
}


Post a reply to this message

From: tony
Subject: Re: Alpha texture
Date: 5 Sep 2009 17:00:00
Message: <web.4aa2d0e3ae25331048d890540@news.povray.org>
Thank you, Robert McGregor.

With this community is not laziness.

Greetings.

Tony


Post a reply to this message

From: Christian Froeschlin
Subject: Re: Alpha texture
Date: 7 Sep 2009 18:35:08
Message: <4aa58a9c$1@news.povray.org>
Robert McGregor wrote:

> That would be the same technique that Edouard demonstrated before except using 
> a palmera_mask where the area outside the leaf is black and inside the leaf is
> white.

Wouldn't POV-Ray simply use the alpha channel of the png file as well?


Post a reply to this message

From: clipka
Subject: Re: Alpha texture
Date: 8 Sep 2009 04:09:36
Message: <4aa61140$1@news.povray.org>
Christian Froeschlin schrieb:
>> That would be the same technique that Edouard demonstrated before 
>> except using a palmera_mask where the area outside the leaf is black 
>> and inside the leaf is
>> white.
> 
> Wouldn't POV-Ray simply use the alpha channel of the png file as well?

Only if the png /has/ an alpha channel ;-)

But if it does, then yes.


Post a reply to this message

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