POV-Ray : Newsgroups : povray.newusers : Image function : Re: Image function Server Time
14 Apr 2024 03:38:40 EDT (-0400)
  Re: Image function  
From: Bald Eagle
Date: 28 May 2023 16:10:00
Message: <web.6473b4558a5f67eb1f9dae3025979125@news.povray.org>
Once again, I'm asking WHY?

Kenneth tried to do this circular process a while back - but if all you're doing
is tiling a plane with an image, then just use an image_map pigment and don't
specify "once".

If you do, however, have some future use for the function version, then you need
to invoke it like this:

plane {
  y, 0
  pigment { function { imageFunction (x,y,z) } }
  }

eval_pigment is just a macro wrapper for the same kinda thing, which means that
will be an extra layer, and another layer on top of that to un-macro-ify it (if
even possible) for use in the way you want.


- BE

kurtz le pirate <kur### [at] gmailcom> wrote:
> Hello,
>
>
> I'm racking my brain over this problem :
> I'd like to have a function that can give me the color of a pixel in an
> image (the equivalent of "eval_pigment") to fill a plane.
>
>
> I've tried a lot of things but none of them work.
>
> What I would like :
>
> plane {
>  y, 0
>  pigment { color imageFunction(x,y,z) }
>  }
>
> With the function like that :
> #declare imageFunction = function {
>  pigment {
>   image_map { jpeg imageName }
>   rotate -x*90
>   translate <-0.5, 0, -0.5>
>   scale <imageWidth, 1, imageHeight>
>   }
>  }
>
> Of corse, this does not work and i get parse errors but the idea is here.
>
> So can you tell me if this "kind of thing" is possible or not before I
> go *crazy* ?
>
>
>
> (@﹏@)
>
>
> --
> Kurtz le pirate
> Compagnie de la Banquise


Post a reply to this message

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