POV-Ray : Newsgroups : povray.programming : Implementing a new pigment : Re: Implementing a new pigment Server Time
23 Apr 2024 22:44:10 EDT (-0400)
  Re: Implementing a new pigment  
From: Reactor
Date: 29 Nov 2008 14:20:00
Message: <web.4931952ef92217e5a731690@news.povray.org>
Nicolas Alvarez <nic### [at] gmailcom> wrote:
> Chambers wrote:
> >> -----Original Message-----
> >> From: Nicolas Alvarez [mailto:nic### [at] gmailcom]
> >> I want to know how do I go about implementing a new pigment type. It's
> >> not a pattern, and it's not a new bitmap file format for image_map; I
> >> have to get a x,y,z point as input and return a rgbt color.
> >
> > Have you implemented it as a function in SDL?
>
> No. I haven't implemented it yet :) Although I will surely start my C++
> hacking by implementing a *very* simple pigment that you could just do in
> SDL!
>
> My final goal is something that I don't think is possible at all from SDL.

I think what Chambers meant is have you tried using a pigment-related function
in SDL.  You can use a custom function as your pigment pattern, and it can take
an x,y,z point (or x,y,z,t,a,b,c,...) and spit out a value to be used with a
color map.  This value is a float, not a vector, but you could have variation
of your function for each channel.

Then, there are also pigment functions, in which you can specify an x,y,z
coordinate, and a the color vector associated with that coordinate is returned.

Can you describe what the desired end result is?


-Reactor


Post a reply to this message

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