POV-Ray : Newsgroups : povray.general : RGB color cube function? Server Time
1 Nov 2024 07:27:31 EDT (-0400)
  RGB color cube function? (Message 1 to 6 of 6)  
From: Lars R 
Subject: RGB color cube function?
Date: 28 Apr 2017 17:33:27
Message: <5903b527$1@news.povray.org>
I'd like to render some objects whose RGB color pigment is just the
coordinate of that surface point.

So, when I render a "unit cube" box{<0,0,0>,<1,1,1>} it is just a RGB
color cube, but when I cut some slices than the "inner colors" are visible.

How can this be made?

Lars R.

P.S.: I don't care for the colors outside of the unit cube. It might be
"saturating" or repeating or black or transparent, I just have objects
within that unit cube.


Post a reply to this message

From: Bald Eagle
Subject: Re: RGB color cube function?
Date: 28 Apr 2017 20:35:01
Message: <web.5903df57a0a804b9acfa72180@news.povray.org>
"Lars R." <rou### [at] gmxde> wrote:
> I'd like to render some objects whose RGB color pigment is just the
> coordinate of that surface point.
>
> So, when I render a "unit cube" box{<0,0,0>,<1,1,1>} it is just a RGB
> color cube, but when I cut some slices than the "inner colors" are visible.
>
> How can this be made?

I'm sure there's a way to do it with a pigment function, but perhaps mixing 3
different orthogonal pigments with the average directive is the way to go...

http://news.povray.org/povray.advanced-users/message/%3C5837408a%241%40news.povray.org%3E/#%3C5837408a%241%40news.povra
y.org%3E


Post a reply to this message

From: William F Pokorny
Subject: Re: RGB color cube function?
Date: 29 Apr 2017 08:45:24
Message: <59048ae4$1@news.povray.org>
On 04/28/2017 05:33 PM, Lars R. wrote:
> I'd like to render some objects whose RGB color pigment is just the
> coordinate of that surface point.
>
> So, when I render a "unit cube" box{<0,0,0>,<1,1,1>} it is just a RGB
> color cube, but when I cut some slices than the "inner colors" are visible.
>
> How can this be made?
>
> Lars R.
>
> P.S.: I don't care for the colors outside of the unit cube. It might be
> "saturating" or repeating or black or transparent, I just have objects
> within that unit cube.
>
>
If you are running with POV-Ray 3.7.1 or later there is the new 
user_defined pattern for pigments where the channels are each controlled 
directly by functions. See:

http://wiki.povray.org/content/Reference:User_Defined_Pattern

For what you want something like:

pigment {
   user_defined {
     function { x },
     function { y },
     function { z },
     ,
   }
}

should work I think.

Aside: I've played only a little with Christoph's new feature here, but 
it's obvious already to me that it throws open the door - so to speak - 
on what can be done with pigments. I'm also finding this method of 
specifying pigments easy to use.

Bill P.


Post a reply to this message

From: Stephen
Subject: Re: RGB color cube function?
Date: 29 Apr 2017 08:56:44
Message: <59048d8c$1@news.povray.org>
On 4/29/2017 1:45 PM, William F Pokorny wrote:

>
> Aside:


Aside. Don't forget to vote in the second last TC-RTC Challenge.
Last day - tomorrow.
-- 

Regards
     Stephen


Post a reply to this message

From: Lars R 
Subject: Re: RGB color cube function?
Date: 29 Apr 2017 17:42:08
Message: <590508b0$1@news.povray.org>
> If you are running with POV-Ray 3.7.1 or later there is the new
> user_defined pattern for pigments where the channels are each controlled
> directly by functions. See:
> 
> http://wiki.povray.org/content/Reference:User_Defined_Pattern
> 
> For what you want something like:
> 
> pigment {
>   user_defined {
>     function { x },
>     function { y },
>     function { z },
>     ,
>   }
> }
> 
> should work I think.

Awesome! I didn't know that. It is not mentioned in the online docu,
yet, is it?

> Aside: I've played only a little with Christoph's new feature here, but
> it's obvious already to me that it throws open the door - so to speak -
> on what can be done with pigments. I'm also finding this method of
> specifying pigments easy to use.

Absolutely! I have thousands if ideas what to do with that feature!

Thanks for that!

Lars R.


Post a reply to this message

From: William F Pokorny
Subject: Re: RGB color cube function?
Date: 30 Apr 2017 07:22:03
Message: <5905c8db@news.povray.org>
On 04/29/2017 05:42 PM, Lars R. wrote:
>
>>
>> http://wiki.povray.org/content/Reference:User_Defined_Pattern
>>
...
>
> Awesome! I didn't know that. It is not mentioned in the online docu,
> yet, is it?
>
The link above is part of the online wiki documentation(1) at:

http://wiki.povray.org/content/Documentation:Contents

The feature is not of course mentioned in the online documentation for 
earlier fixed releases of POV-Ray posted at :

http://www.povray.org/documentation/

Bill P.

(1) The wiki documentation is always the most current available with 
respect to in-development versions of POV-Ray.


Post a reply to this message

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