|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I'm trying to recreate this object in POV-Ray:
http://en.wikipedia.org/wiki/Image:HSLSphere1.png
What I'm having trouble with is creating a single texture for the entire
object.
I can do the Hue and Saturation paramaters, but can't quite get the
Saturation parameter. Using a slope map for the Saturation parameter works
OK, except when I create the cut-away the slope reverts to 100% or 0% at
those sections.
Is there a pattern I can use that mimics the way the Saturation parameter
works in the above image?
Thanks.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Ideal here would be these three functions:
function{ f_th(x,y,z) }
function{ f_ph(x,y,z) }
function{ f_r(x,y,z) }
- Slime
[ http://www.slimeland.com/ ]
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Slime" <fak### [at] emailaddress> wrote:
> Ideal here would be these three functions:
>
> function{ f_th(x,y,z) }
> function{ f_ph(x,y,z) }
> function{ f_r(x,y,z) }
>
> - Slime
> [ http://www.slimeland.com/ ]
I've never used functions as pigments. I would appreciate some assistence.
Thanks!
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> I've never used functions as pigments. I would appreciate some assistence.
> Thanks!
Just use it like a pattern:
pigment
{
function{f_th(x,y,z)}
pigment_map
{
[0 rgb 0]
[1 rgb 1]
}
}
- Slime
[ http://www.slimeland.com/ ]
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Slime" <fak### [at] emailaddress> wrote:
> > I've never used functions as pigments. I would appreciate some assistence.
> > Thanks!
>
> Just use it like a pattern:
>
> pigment
> {
> function{f_th(x,y,z)}
> pigment_map
> {
> [0 rgb 0]
> [1 rgb 1]
> }
> }
>
> - Slime
> [ http://www.slimeland.com/ ]
I wouldn't know how to define the function... The math is a bit beyond me.
:(
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Oops! In the first message I meant to say that I was having trouble with the
luminence parameter--not the saturation parameter!
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> I wouldn't know how to define the function... The math is a bit beyond me.
You should be able to just use the functions I gave you, with pigment maps.
For instance, if you apply the pigment I provided to a sphere, you should
see how the f_th function looks and then you can make a pigment map to work
with it.
Or, if you want to use three functions to describe the R, G, and B color
components and combine them, you can do it like this:
pigment
{
average
pigment_map
{
[1 function{redfunc(x,y,z)} color_map{[0 rgb 0][1 rgb <3,0,0>]}]
[1 function{greenfunc(x,y,z)} color_map{[0 rgb 0][1 rgb <0,3,0>]}]
[1 function{bluefunc(x,y,z)} color_map{[0 rgb 0][1 rgb <0,0,3>]}]
}
}
If you just use f_th, f_r, and f_ph for the red/green/blue functions, you
will already have an interesting pigment.
- Slime
[ http://www.slimeland.com/ ]
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Oh! I didn't realize these functions existed in functions.inc.
I thought you were just making them up as an example.
Thanks!
One more thing: what is the proper way of scaling the pigments or functions?
Their frequency is so high that the pattern occurs more than once on a
single sphere.
"Slime" <fak### [at] emailaddress> wrote:
> > I wouldn't know how to define the function... The math is a bit beyond me.
>
> You should be able to just use the functions I gave you, with pigment maps.
> For instance, if you apply the pigment I provided to a sphere, you should
> see how the f_th function looks and then you can make a pigment map to work
> with it.
>
> Or, if you want to use three functions to describe the R, G, and B color
> components and combine them, you can do it like this:
>
> pigment
> {
> average
> pigment_map
> {
> [1 function{redfunc(x,y,z)} color_map{[0 rgb 0][1 rgb <3,0,0>]}]
> [1 function{greenfunc(x,y,z)} color_map{[0 rgb 0][1 rgb <0,3,0>]}]
> [1 function{bluefunc(x,y,z)} color_map{[0 rgb 0][1 rgb <0,0,3>]}]
> }
> }
>
> If you just use f_th, f_r, and f_ph for the red/green/blue functions, you
> will already have an interesting pigment.
>
> - Slime
> [ http://www.slimeland.com/ ]
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> One more thing: what is the proper way of scaling the pigments or
functions?
> Their frequency is so high that the pattern occurs more than once on a
> single sphere.
f_ph probably returns an angle from -pi/2 to pi/2. You can use f_ph(x,y,z) /
pi + .5 to get that between 0 and 1.
f_th probably returns an angle from 0 to 2*pi. You can use
f_th(x,y,z)/(2*pi) to get that between 0 and 1.
f_th might actually return an angle from -pi to pi, in which case
f_th(x,y,z)/(2*pi) + 1 will work.
- Slime
[ http://www.slimeland.com/ ]
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Slime" <fak### [at] emailaddress> wrote:
> > One more thing: what is the proper way of scaling the pigments or
> functions?
> > Their frequency is so high that the pattern occurs more than once on a
> > single sphere.
>
> f_ph probably returns an angle from -pi/2 to pi/2. You can use f_ph(x,y,z) /
> pi + .5 to get that between 0 and 1.
> f_th probably returns an angle from 0 to 2*pi. You can use
> f_th(x,y,z)/(2*pi) to get that between 0 and 1.
> f_th might actually return an angle from -pi to pi, in which case
> f_th(x,y,z)/(2*pi) + 1 will work.
>
> - Slime
> [ http://www.slimeland.com/ ]
Thank you. FYI, the angle returned by f_ph is between 0 and pi.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|