POV-Ray : Newsgroups : povray.binaries.images : question image mapping on shiny ball Server Time
2 Aug 2024 22:19:18 EDT (-0400)
  question image mapping on shiny ball (Message 1 to 2 of 2)  
From: Johan Feyaerts
Subject: question image mapping on shiny ball
Date: 13 Jan 2007 14:00:24
Message: <45a92c48@news.povray.org>
Hi ,


I'm experimenting with picture map on a ball with mlpov.

using the following texture
texture{
   pigment { color rgb <1,1,1>  }       
  finish { ambient 0.007 diffuse 0.05 reflection { 
<2.5,1.2,0.1>*minreffac,<0.5,0.5,0.5>*maxreffact*(3)  } }  

}
texture{
   pigment {          
   
         image_map
            {
               gif   "balpic.gif"
               map_type 1          
               #declare j=255;       
               #while (j<256)
                        filter   j, 1 
               #declare j=j+1;
               #end//       
             
           }
               
         translate <0,1.1,0>
            rotate 100*y    
            rotate x*-22  
                 scale  0.1
            
             }  
        finish { ambient 0.007 diffuse 2 reflection { 
<2.5,1.2,0.1>*minreffac*0.6,<0.5,0.5,0.5>*maxreffact*(2)  } } 
       

}

When I change scale 0.1 to some other value that only seems to change 
the position of the image and not the size of it.
The mapped picture is a transparent canvas with the face pic in the 
middle.
 Is it possible to change the size of the mapped face picture without 
changing the position? 
or should i make the transparent bord of the mapped image bigger in 
order to make the face relatively smaller?


Post a reply to this message


Attachments:
Download 'iso-8859-1' (5 KB)

From: Alain
Subject: Re: question image mapping on shiny ball
Date: 13 Jan 2007 17:54:28
Message: <45a96324$1@news.povray.org>
Johan Feyaerts nous apporta ses lumieres en ce 13-01-2007 13:59:
> Hi ,


> I'm experimenting with picture map on a ball with mlpov.

> using the following texture
> texture{
>    pigment { color rgb <1,1,1>  }      
>   finish { ambient 0.007 diffuse 0.05 reflection { 
> <2.5,1.2,0.1>*minreffac,<0.5,0.5,0.5>*maxreffact*(3)  } } 

> }
> texture{
>    pigment {         

>          image_map
>             {
>                gif   "balpic.gif"
>                map_type 1         
>                #declare j=255;      
>                #while (j<256)
>                         filter   j, 1
>                #declare j=j+1;
>                #end//      

>            }

>          translate <0,1.1,0>
>             rotate 100*y    
>             rotate x*-22 
>                  scale  0.1

>              } 
>         finish { ambient 0.007 diffuse 2 reflection { 
> <2.5,1.2,0.1>*minreffac*0.6,<0.5,0.5,0.5>*maxreffact*(2)  } } 


> }

> When I change scale 0.1 to some other value that only seems to change 
> the position of the image and not the size of it.
> The mapped picture is a transparent canvas with the face pic in the middle.
>  Is it possible to change the size of the mapped face picture without 
> changing the position?
> or should i make the transparent bord of the mapped image bigger in 
> order to make the face relatively smaller?

You can use a spherical warp instead of map_type 1. Don't forget to add the 
keyword once, otherwise, it will get tilled.
That way, your image is first maped on a plane, starting at <0,0> as the botom 
left corner and <1,1> as the top right corner, then, it's wraped around your 
sphere. You first translate by -0.5 to center it around the origin, then you 
scale as you need and to the correct aspect ratio. This allow you to easily 
scale it as you need.

-- 
Alain
-------------------------------------------------
Fighting for peace is like screwing for virginity.
  - public toilet wall, The Bayou, Baton Rouge , LO


Post a reply to this message

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