POV-Ray : Newsgroups : povray.advanced-users : image_map and eval_pigment : Re: image_map and eval_pigment Server Time
12 May 2024 03:24:47 EDT (-0400)
  Re: image_map and eval_pigment  
From: Alain
Date: 6 Dec 2016 20:05:36
Message: <58476060@news.povray.org>

> "Leroy" <whe### [at] gmailcom> wrote:
>
>> PosX and PosY are the size of Picture in pixels
>> but the image_map is always 0,0 to 1,1
>
> Aha.  That very well may be it.  I'll check when I get home.
> It's deceptive when max_extent reports the pixels size, but the image_map is a
> unit square...  :|
>
> But then of course, that makes me wonder - doesn't a regular image_map pigment{}
> definition extend in the x-y plane infinitely?  Unless 'once' is included?
>
>
>
>
The image occupy a unit square and get repeated ad infinitum in the X 
and Y directions, in both directions. Using once you only get the 
<0,0>-<1,1> square.
You want to scale your image to the desired dimentions. Using 
max_extent() gives you the pixel size of the image, so, you can use
scale max_extent(My_Image)
to extend your image so that each pixel occupy an unit square and use 
the pixels coordinate in your eval_pigment() statement.


Post a reply to this message

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