POV-Ray : Newsgroups : povray.advanced-users : Getting the rgb from a position? : Re: Getting the rgb from a position? Server Time
29 Jul 2024 02:31:14 EDT (-0400)
  Re: Getting the rgb from a position?  
From: Tim Nikias v2 0
Date: 1 Apr 2003 09:44:45
Message: <3e89a5dd$1@news.povray.org>
Thats what the function was about. I'm not very used
to functions, but they return only float values AFAIK.
Thus, you'd need to have three functions, each using
the pigment from the texture, and then accessing
only red, green and blue via .red, .blue und .green.
You've got to look at the documentation for that.

Your method is only useful for coloring objects, but not
when I want to calculate stuff based on the color...

Regards,
Tim

--
Tim Nikias v2.0
Homepage: http://www.digitaltwilight.de/no_lights
Email: Tim### [at] gmxde

> Hello,
>
> I experienced similar problem, I needed the color from texture at point P.
> The trick which worked for me was:
>
> #declare TEX=texture {
> ....
> }
>
> sphere {
>   <0, 0, 0>, 1
>   texture {
>     TEX
>     translate -P
>     scale 1000
>     ...
>   }
>   translate ...
>   ...
> }
>
> This way the spere has color from the given point on texture. But if there
> is some better way, please enlighten me, i would like something:
>
> color=TEX[P]
>
> or alike :)
>
>
> Regards,
> Vlada
>


Post a reply to this message

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