|
|
Nicolas Alvarez wrote:
> 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.
>
> Would be also good if someone could give me some basic pointers on where
> to start modifying the parser to read parameters for it (although that's
> kind of low priority, especially considering I have yet to look at the
> parser code).
I want to report I got a very basic pigment working in like 15 minutes.
sphere {
<0,0.5,0>,0.5
pigment {
my_test
}
}
Renders a green sphere. "my_test" is a new keyword, not a pre-#declared
pigment. The code that calculates the pigment color is pretty simple:
case MY_PATTERN:
Make_Colour(Colour, 0.0, 1.0, 0.0);
Colour_Found = true;
break;
Post a reply to this message
|
|