POV-Ray : Newsgroups : povray.general : Image map doesnt start at given coordinates : Re: Image map doesnt start at given coordinates Server Time
31 Jul 2024 08:25:37 EDT (-0400)
  Re: Image map doesnt start at given coordinates  
From: Penelope20k
Date: 24 Jul 2007 05:43:25
Message: <46a5c9bd@news.povray.org>
image map is extended from <0,0> to <1,1>

then if you create a box from <0.2,0.1> to <0.75,0.57> for exemple, the
image will be always centered as <0,0> to <1,1>


hence if you want an image map center then do always your object like this


method one

box {pt1, pt2
texture {
        pigment {
        image_map{myimage}
        translate -.5   // wil always centered you image to <0.5,0.5>
        scale myscale  //scale to an ppropriate scale
        translate pt3   //pt3 is the center of the face you want to texture}
should be (pt1+pt2)/2
    // note: that will translate you pigment ...not your object
}}}

or
box {  - corner , corner pigment {image_map {myimage}  translate -0.5 scale
myscale}   translate Point2  // will translate your object and as well you
pigment which as been applied on it}






web.46a5b36b5f494fa5d779672f0@news.povray.org...
> Hi all,
>
> I'm trying to apply an image map to a section of the wall. The image is a
> door which you can see here.
> http://www.evolve.ro/files/nuc_national_p.jpg
>
> After rendering the door you can see that it is a little bit off.
> http://www.evolve.ro/files/bedroom.jpg
>
> What do I have to do to make the mapping start from the first point and
not
> from the middle of the area?
>
> The code for the door is this
>
> box{<33,1,34><33,7,37>
> pigment
> { image_map
>   { jpeg "./tiles/usi/nuc_national_p.jpg"
>     map_type 0
>   }
>   scale 7
>   rotate y*90
> }
> }
>
> Thanks
>
>


Post a reply to this message

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