|
|
Hi guys, I know there's probably a thread out there, but I've tried many
different search terms and can't find the answer I am looking for.
I can't seem to figure out how to get the color map to go around the disc, so to
speak, like normal rings would.
I'm sure I'm missing something silly, but I've been looking on the newsgroups
and in the documentation for a couple of hours, can't seem to find anything that
would do what I want.
This is my code for the ring(s):
disc
{
<0, 40, 0>,
<-10, 40, -10>,
35, 30
texture
{
pigment
{
onion
color_map
{
[0.2 rgb <1, 0, 0> transmit 0.8]
[0.4 rgb <0, 0, 1> transmit 0.3]
[0.6 rgb <0, 1, 0> transmit 0.3]
}
}
}
}
Post a reply to this message
|
|
|
|
Am 16.07.2010 05:14, schrieb TJ:
> This is my code for the ring(s):
>
> disc
> {
> <0, 40, 0>,
> <-10, 40, -10>,
> 35, 30
> texture
> {
> pigment
> {
> onion
> color_map
> {
> [0.2 rgb<1, 0, 0> transmit 0.8]
> [0.4 rgb<0, 0, 1> transmit 0.3]
> [0.6 rgb<0, 1, 0> transmit 0.3]
> }
> }
> }
> }
POV-Ray doesn't automatically "center" textures on a particular object,
i.e. the center of your onion pigment is still at <0,0,0>, while the
center of your disc is at <0,40,0>.
To compensate for this, you either have to (A) translate the texture
separately, or - which I find easier - (B) initially place the object at
the origin and then translate it around together with its texture:
(A)
disc {
<0,40,0>,
<-10,40,-10>,
35,30
texture {
...
translate <0,40,0>
}
}
(B)
disc {
<0,0,0>,
<-10,40,-10>,
35,30
texture {
...
}
translate <0,40,0>
}
Post a reply to this message
|
|