POV-Ray : Newsgroups : povray.advanced-users : Getting the rgb from a position? : Getting the rgb from a position? Server Time
29 Jul 2024 02:20:45 EDT (-0400)
  Getting the rgb from a position?  
From: Tim Nikias v2 0
Date: 10 Mar 2003 18:08:52
Message: <3e6d1b04@news.povray.org>
I know there was some way to fetch the rgb-color off of
an object, but I'm not sure if there was a POV-inbuilt way
of doing this, or if I'd have to use a roundabout way with
functions to get what I want?

I'm basically trying to script a heightfield-generator within
POV for use with my Mesh-Modifying-Macros. Eventually,
the implementation should take care of the normals-bug
occuring with heightfields (I've never experienced problems
with the normals that were generated by my MMM), and
also leave some more flexibility in the use (cause I can
deform the heightfield later on). What I want to do now is
get a way to "read" an image with any designated amount of
resolution. But to begin with, I need to read the image-map's
rgb-components.

And I know, how about using bigger resolutions with smaller
images? I plan to have two versions for this: one which will
just read the image, extrapolate the heights and build the mesh,
another one will read the image, extrapolate the heights and
may use interpolations between pixels when heightfield
resolution exceeds the User-Specified pixel-resolution, and
build the mesh from that. As a final step, the MMM may be
used to get the normals for smooth-heightfields.

So, question remains: how to fetch the rgb from an image
(better yet: from a pigment)?

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


Post a reply to this message

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