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