POV-Ray : Newsgroups : povray.binaries.scene-files : Dakota Red Granite macro - beta #1 : Re: Dakota Red Granite macro - beta #1.1 Server Time
24 Apr 2024 11:28:15 EDT (-0400)
  Re: Dakota Red Granite macro - beta #1.1  
From: Bald Eagle
Date: 17 May 2021 13:45:00
Message: <web.60a2aaeb581f2f681f9dae3025979125@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:

> You make an error here I believe. The first expression is /not/ the
> x-value but the *color_map entry*! And so the last one is /not/ a filter
> value. Below, this gets wrong as a consequence:

Nope.
I converted the entire color map into an array of /4-component/ vectors, with
the color map entry as the first number.  And, as I anticipated, this might be
confusing.  Maybe this should be rearranged to have the color map entry be the
filter, or (better?) constructed as a 2D array?
It was just a quick example of how to not write out the whole color map twice,
and make any changes easier.

>
> > #local C_gr21_DakotaRed_map1 = //the granite colour_map proper
> > color_map {
> >    #if (version >= 3.8)
> >      blend_mode 2
> >    #end
> >    #local Entries = dimension_size (CM, 1)-1;
> >    #for (E, 0, Entries)
> >    [CM[E].x rgb <CM[E].y, CM[E].z, CM[E].filter>]
> This line is confusing. How would you write the line above? Like this?
> (? used for unknown expression):
>       [CM[E].? rgb <CM[E].x, CM[E].y, CM[E].z>]
>
> >    #end
> > }
> >
>
> Also, in the above example with CSC=1 ('raw' srgb option) should 'rgb'
> not be 'srgb'? I am getting ab bit lost here.

That line above is wrong, but for a different reason.
It's SUPPOSED to be:
 [CM[E].x Convert  (CSC, SatBoost, BrightBoost, <CM[E].y, CM[E].z,
CM[E].filter>)]

That way the one macro gets used for every CSC, and the rgb / srgb / function
gets implemented in the macro, not directly in the color map.
I got distracted and made an oopsie.

See if anything special needs to be done in the full macro so that the srgb
option works even though SatBoost, BrightBoost are not explicitly specified - in
other words, an unused default placeholder value just gets passed into the
macro.

Attaching file so it's all (hopefully) clearer.


Post a reply to this message


Attachments:
Download 'smallcolormap.pov.txt' (2 KB)

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