POV-Ray : Newsgroups : povray.bugreports : POV 3.7 RC3 : transparent image_map in front of a mirror Server Time
21 Dec 2024 23:16:37 EST (-0500)
  POV 3.7 RC3 : transparent image_map in front of a mirror (Message 1 to 2 of 2)  
From: Bastien Jacquet
Subject: POV 3.7 RC3 : transparent image_map in front of a mirror
Date: 28 Apr 2011 09:35:00
Message: <web.4db96c497d418bb2757fc4770@news.povray.org>
I am using an image_map with transparent areas in front of a mirror
 plane { z,0
    texture{
      pigment { image_map{ png "front.png" map_type 0 interpolate 2 once }} }
    finish { reflection 0 ambient 1 diffuse 0 }
 }
 plane { z,-0.000001
    finish { reflection {0.6} ambient 0.5 diffuse 0 }
 }
 plane {  z,10
    texture{
      pigment { image_map{ png "opposite.png" map_type 0 interpolate 2 once }} }
    finish { reflection 0 ambient 1 diffuse 0 }
 }

Everything was good with 3.6, but moving to 3.7, I had to increase the distance
between the texture and the mirror in order to see something else than black
areas on transparent parts.

Is this an intended behavior ?

Bastien Jacquet


Post a reply to this message

From: clipka
Subject: Re: POV 3.7 RC3 : transparent image_map in front of a mirror
Date: 29 Apr 2011 14:35:28
Message: <4dbb04f0@news.povray.org>
Am 28.04.2011 15:32, schrieb Bastien Jacquet:
> I am using an image_map with transparent areas in front of a mirror
>   plane { z,0
>      texture{
>        pigment { image_map{ png "front.png" map_type 0 interpolate 2 once }} }
>      finish { reflection 0 ambient 1 diffuse 0 }
>   }
>   plane { z,-0.000001
>      finish { reflection {0.6} ambient 0.5 diffuse 0 }
>   }
>   plane {  z,10
>      texture{
>        pigment { image_map{ png "opposite.png" map_type 0 interpolate 2 once }} }
>      finish { reflection 0 ambient 1 diffuse 0 }
>   }
>
> Everything was good with 3.6, but moving to 3.7, I had to increase the distance
> between the texture and the mirror in order to see something else than black
> areas on transparent parts.
>
> Is this an intended behavior ?

It's probably a side effect of changes to certain tolerances used in 
comparisons of numerical values.

Note that what you seem to try to do can be achieved without the second 
plane by using layered textures:

   plane { z,0
     texture {
       finish { reflection {0.6} ambient 0.5 diffuse 0 }
     }
     texture {
       pigment { image_map{ png "front.png"
         map_type 0 interpolate 2 once }}
       finish { reflection 0 ambient 1 diffuse 0 }
     }
   }

You could also use a texture_map based on the image's alpha channel 
(though I guess it would be a bit more resource-hungry):

   plane { z,0
      texture{
        image_map { png "front.png"
          map_type 0 interpolate 2 once use_alpha }
        texture_map {
          [0 texture {
            pigment { image_map{ png "front.png"
              map_type 0 interpolate 2 once }}
            finish { reflection 0 ambient 1 diffuse 0 }
          }]
          [1 texture {
            finish { reflection {0.6} ambient 0.5 diffuse 0 }
          }]
      }
   }


Post a reply to this message

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