POV-Ray : Newsgroups : povray.newusers : Alpha texture : Re: Alpha texture Server Time
5 Oct 2024 15:55:26 EDT (-0400)
  Re: Alpha texture  
From: Robert McGregor
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

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