POV-Ray : Newsgroups : povray.general : Can I use a function to create a pigment WITHOUT using a colour_map? : Re: Can I use a function to create a pigment WITHOUT using a colour_map? Server Time
30 Jul 2024 00:23:33 EDT (-0400)
  Re: Can I use a function to create a pigment WITHOUT using a colour_map?  
From: Alain
Date: 11 Apr 2010 15:03:55
Message: <4bc21d1b$1@news.povray.org>

> I just can't get my head around this problem...
>
> I am trying to render a high resolution image of Saturn's rings. I can't use
> colour maps for this as they won't have the resolution required (I believe
> colour_maps are limited in the number of elements you can have!)
Yes. The limit is 255 entries.

>
> I have written a group of float functions that produce the red, green, blue,
> transparency and several various albedo values. I also have a function that
> varies between 0 and 1 across the ring plane... OK so far.
>
> My problem is that I cannot seem to combine these to produce a pigment.
>
> The following code fails with a "numeric expression expected" error...
> disc
> {
>      0, z, OuterEdge, InnerEdge
>      pigment
>      {
>          rgbt<fRingRed(x,y,z), fRingGreen(x,y,z), fRingBlue(x,y,z),
> fRingTrans(x,y,z)>
>      }
> }
>
> It appears you can't put functions into a rgbt<>.
No, but you can have a function that will return a pigment.
pigment{ rgbt fRingPigment(x,y,z) }
or even
pigment{ fRingPigment(x,y,z) }

You can also use a macro.

>
> Can anyone else suggest how to do this?
>
> Rarius
>
>

Other peoples have used a combination of scattering media with 
extinction turned off and absorbing media.

You can also use a disk or a whide, thin cylinder with an image_map.
If you use a disk and also use media elswhere in the scene, such as 
saturn's athmosphere, you must add hollow to the disk, as the disk have 
an interior and will interfere with nedia.



Alain


Post a reply to this message

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