POV-Ray : Newsgroups : povray.binaries.images : Shot glass test : Re: Shot glass test, with liquid Server Time
5 May 2024 08:13:00 EDT (-0400)
  Re: Shot glass test, with liquid  
From: Stephen
Date: 26 Oct 2018 05:26:16
Message: <5bd2ddb8$1@news.povray.org>
On 25/10/2018 23:08, StephenS wrote:
> On 2018-10-25 1:58 p.m., Stephen wrote:
> ....
>> I thought that I would try this with a transparent texture. 
>> Unfortunately this is the best I could get. Your method is better.
>> I used a png with a RGB=0 set to transparent. You can see the darkened 
>> area of the transparent part of the image map. Also the copy of the 
>> image at the back is a question mark. It is not a reflection.
>>
> My texture is:
> 
> #declare Nova_Scotia_Crest_ =
> texture {
>    pigment {
>      image_map{
>        png 
> "E:/Documents/Bishop3d/Objects/Glass_containers/Nova_Scotia_image.png"
>        map_type 0
>        once
>      }
>      scale     <1.000,1.250,1.000>
>      translate <-0.500,0.750,0.000>
>    }
> 
> }
> 

I'll show you mine.

#declare Glass_Image =
material{
   texture {
     #declare BISHOP3D_TEMPORARY_IDENTIFIER =
       texture {
         pigment {
           colour rgbft <0.259,0.384,0.200,0.000,0.950>
         }

         finish {
           ambient     rgb <0.000,0.000,0.000>
           brilliance  1.000
           crand       0.000
           diffuse     0.190
           metallic    0.000
           phong       0.000
           phong_size  40.000
           specular    1.000
           roughness   0.001
           conserve_energy
           reflection {
             rgb <0.040,0.040,0.040>, rgb <0.500,0.500,0.500>
             fresnel   0
             falloff   1.500
             exponent  2.000
             metallic  0.000
           }
           irid {
             0.275
             thickness 0.100
             turbulence 0.000
           }
         }

       }
       texture {
         pigment {
           image_map{
             png "F:\Graphics\B3D Data\Maps\Odds\Mask_1a.png"
             map_type 2
             once
           }
           scale     <2.000,2.000,2.000>
           translate <-0.500,-0.500,-0.500>
         }

         finish {
           ambient     rgb <0.000,0.000,0.000>
           brilliance  1.000
           crand       0.000
           diffuse     0.850
           metallic    0.000
           phong       0.000
           phong_size  40.000
           specular    1.000
           roughness   0.001
           conserve_energy
           reflection {
             rgb <0.040,0.040,0.040>, rgb <0.040,0.040,0.040>
             fresnel   0
             falloff   1.500
             exponent  2.000
             metallic  0.000
           }
         }

       }
     ;/* the semicolon is necessary or POV-Ray will not figure out that 
the declarations has ended /*
     BISHOP3D_TEMPORARY_IDENTIFIER
   }

   interior{
     ior                 2.010
     caustics            0.000
     dispersion          1.030
     dispersion_samples  7.000
     fade_power          0.000
     fade_distance       0.000
     fade_color          rgb <0.000,0.000,0.000>
   }

}


> I think all of the magic is in the alpha channel, in a graphics program 
> (Gimp) it looks like a black/white mask.
> 

I need to do some reading on the png file format, transparency and alpha.

-- 

Regards
     Stephen


Post a reply to this message

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