POV-Ray : Newsgroups : povray.binaries.images : Sci-Fi Scene Assets : Re: Sci-Fi Scene Assets Server Time
3 May 2024 00:45:11 EDT (-0400)
  Re: Sci-Fi Scene Assets  
From: Kenneth
Date: 22 Feb 2021 18:20:01
Message: <web.60343a20a906d8e3d98418910@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
>
> Because it's hiding under you nose - under the hood.
> It the image_map "function" that is all shoved into ... one pigment pattern.
> [snip]
> So how does a function work?
> We take <x, y, z> and plug those into the function, which computes a color
> value.
>
> But you could also pre-calculate the color values, and store them - in a
> file-- to reference when you're looping through all of the position values -
> and that's called an image file.  That gets implemented via the pigment
> {image_map} syntax.

Yeah, I guess that my 'dream scheme' of...
     trace --> eval_pigment --> a SINGLE function{pigment...} [somehow?]
....is kind of an attempt to mimic what goes on 'under the hood'... a sort of
'reverse engineering' scheme, devised in SDL.

The seemingly effortless way that POV-ray itself can take an image_map and turn
it into a single function{pigment...}-- with all of the original pixels in the
correct order-- is like Black Magic to me.
>
> Now, you could manually construct a function as a giant polynomial that
> intersects all the right rgb values given the right xyz values --- but that's
> just encoding the image file data into an equation - which is probably
> wasteful of effort, time, and storage.

Yeah, those little caveats did occur to me. :-[
I agree: My hoped-for scheme seems to be not-so-elegant after all. Compared to
that, my older scheme of...
       trace --> eval_pigment --> 480,000 colored boxes
.... suddenly looks like an elegant and simple stroke of genius! :-P
>
> So how does one take 48,000 boxes and color them all with one function?
>
> union {
> .... all your boxes ...
> pigment {image_map}
> }
>
Yes, very straightforward-- once my single and way-too-elaborate function itself
is created! But I guess I need to discard my eval_pigment idea itself as
unworkable (i.e., initially evaluating every *individual* pixel of an input
image, to ultimately create some sort of single function to represent all the
colors and pixel positions.)


Post a reply to this message

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