POV-Ray : Newsgroups : povray.general : Select distinct colors from image into color_map? : Re: Select distinct colors from image into color_map? Server Time
29 Jul 2024 16:33:24 EDT (-0400)
  Re: Select distinct colors from image into color_map?  
From: Kenneth
Date: 31 Dec 2010 02:20:01
Message: <web.4d1d83e457130631196b08580@news.povray.org>
Le_Forgeron <jgr### [at] freefr> wrote:

>
> The function eval_pigment(pigment,vector) from functions.inc can be used
> to sample the image_map (that's a pigment) at various places.

and Clipka wrote:
> In POV-Ray 3.7, you can use the min_extent/max_extent function on an
> image_map to get its true dimensions; if you don't use interpolation
> this allows you to loop over all the pixels.

I was thinking along the same lines. If the OP wanted to sample all the colors
in the *entire* image, I guess he would need to set up a nested #while loop
scheme, and step (carefully!) pixel by pixel...in x and y, I'm assuming (the
default orientation for an image_map.)

When using eval_pigment on such an image, oriented in the default plane, does
the z-position matter? In other words, is the image considered 'infinite' in z?

Ken


Post a reply to this message

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