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:21:23 EDT (-0400)
  Re: Image map doesnt start at given coordinates  
From: Alain
Date: 24 Jul 2007 05:53:53
Message: <46a5cc31$1@news.povray.org>
Florin Ochiana nous apporta ses lumieres en ce 2007/07/24 04:08:
> 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
> 
> 
Create your door starting at the origin: the bottom left corner at <0,0,0>
Apply your image_map and scale it to fit your object. The maping start from 
<0,0> to <1,1>.
Rotate and translate the door to it's final location.
Make the door distinct from it's frame.

As an added bonus, you can now rotate the door so that it can be opened.

-- 
Alain
-------------------------------------------------
   The other day I came home and a guy was jogging, naked. I asked "Why?"  He 
said "Because you came home early."
	Rodney Dangerfield


Post a reply to this message

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