POV-Ray : Newsgroups : povray.general : transparent sphere with image_map on surface : Re: transparent sphere with image_map on surface Server Time
30 Jul 2024 10:12:21 EDT (-0400)
  Re: transparent sphere with image_map on surface  
From: Alain
Date: 12 Mar 2009 16:32:35
Message: <49b97163$1@news.povray.org>
Massimo nous illumina en ce 2009-03-11 13:40 -->
> Hello all POV experts
> I'm a new user and wold like to create a "glass" sphere with an image on the
> surface.
> Wandering here and there and reading the documentation, I succeeded in creating
> the below added code. It would be nice, apart from the reflection of the bitmap
> to the back of the inner surface giving unwanted reflections.
> You see I added two image_maps on the front and on the back, shifted 180 deg. to
> see in transparency the back of the bitmap on the other side.
> Reflection are a catastrophe!!!! What couuld I do? any suggestion?
> Thank You
> Massimo
> 
> Attached the code I used
> 
> #include "colors.inc"
> #include "skies.inc"
> 
> sky_sphere { S_Cloud3 }
> 
> camera {
>   location <0, 2, -5>
>   look_at <0,0, 0>
> }
> 
> light_source {
>   <0, -12, 10>
>   color White
>   shadowless
>   }
> light_source {
>   <0, 0, -10>
>   color White
>   shadowless
>   }
> 
> sphere{ <0,0,0>, 1
>   texture{ pigment { color rgbf <0.9, 0.9, 0.9, 0.8> } // transparent sphere
>   finish {
>         reflection 0.2
>         refraction 1.0
>         ior 1
>         phong 0.4
>           }
>                } // end of texture 1
>   texture{ pigment{
>                 image_map{ gif "POV-Ray_215.gif"
>                         map_type 0
>                         once
>                         filter all 1
>                           }
>                  translate<-0.5,-0.2>
>                  scale<2.5,1>*0.7
>            } // end pigment
>   } // end of texture 2
>   texture{ pigment{
>                 image_map{ gif "POV-Ray_215.gif"
>                         map_type 0
>                         once
>                         filter all 1
>                           }
>                  translate<-0.5,-1>
>                  scale<2.5,1>*0.7
>                  rotate<0,180,0>
>            } // end pigment
>   } // end of texture 3
> } // end of sphere  ------------------
> 
> 
> 
> 
> 
> 
Another way to map your image is to use the warp.
   texture{ pigment{
                 warp{spherical image_map{ gif "POV-Ray_215.gif"

                         once
                         filter all 1
                           }}
                  translate<-0.5,-0.2>
                  scale<2.5,1>*0.7
            } // end pigment
With "once" it will only apears once on the surface. Without it, it will get 
tilled. You use the scale command to adjust the area the image will cover. 
Without scale, it will go from one pole to the other and meet itself on the 
back. Scale<0.25, 0.5, 1> will restrict it within 45 degree up and down and 90 
degree around.

-- 
Alain
-------------------------------------------------
You know you've been raytracing too long when you look at a matrix transform and 
know instantly what it does.
John VanSickle


Post a reply to this message

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