|
|
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
|
|
|
|
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
|
|