|
![](/i/fill.gif) |
I'm trying to understand layered textures better,
but I don't understand why the colors of the left
spheres in the attached image don't match the
colors of right spheres.
See my code below.
Can anyone please explain ?
And what do I have to do in order to make the
colors of the right spheres equal to the colors
of the left spheres (using subtractive color
mixing for the right ones and additive for the
left ones) ?
E.g.: Any changes to the finish {} part of the textures ?
Tor Olav
// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7 =
#version 3.5;
#default {
texture {
finish {
ambient 0
diffuse 1
}
}
}
// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7 =
// Red
sphere {
2*<-1, 2, 0>, 2
texture { pigment { color rgbt <1, 0, 0, 0.0> } }
}
// Green
sphere {
2*<-1, 0, 0>, 2
texture { pigment { color rgbt <0, 1, 0, 0.0> } }
}
// Blue
sphere {
2*<-1, -2, 0>, 2
texture { pigment { color rgbt <0, 0, 1, 0.0> } }
}
// White - Blue - Green = Red
sphere {
2*< 1, 2, 0>, 2
texture { pigment { color rgbt <1, 0, 1, 0.0> } }
texture { pigment { color rgbt <1, 1, 0, 0.5> } }
}
// White - Red - Blue = Green
sphere {
2*< 1, 0, 0>, 2
texture { pigment { color rgbt <1, 1, 0, 0.0> } }
texture { pigment { color rgbt <0, 1, 1, 0.5> } }
}
// White - Green - Red = Blue
sphere {
2*< 1, -2, 0>, 2
texture { pigment { color rgbt <0, 1, 1, 0.0> } }
texture { pigment { color rgbt <1, 0, 1, 0.5> } }
}
// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7 =
// Red + Green = Yellow
sphere {
2*<-3, 2, 0>, 2
texture { pigment { color rgbt <1, 1, 0, 0.0> } }
}
// Green + Blue = Cyan
sphere {
2*<-3, 0, 0>, 2
texture { pigment { color rgbt <0, 1, 1, 0.0> } }
}
// Blue + Red = Magenta
sphere {
2*<-3, -2, 0>, 2
texture { pigment { color rgbt <1, 0, 1, 0.0> } }
}
// White - Blue = Yellow
sphere {
2*< 3, 2, 0>, 2
texture { pigment { color rgbt <1, 1, 1, 0.0> } }
texture { pigment { color rgbt <1, 1, 0, 0.5> } }
}
// White - Red = Cyan
sphere {
2*< 3, 0, 0>, 2
texture { pigment { color rgbt <1, 1, 1, 0.0> } }
texture { pigment { color rgbt <0, 1, 1, 0.5> } }
}
// White - Green = Magenta
sphere {
2*< 3, -2, 0>, 2
texture { pigment { color rgbt <1, 1, 1, 0.0> } }
texture { pigment { color rgbt <1, 0, 1, 0.5> } }
}
// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7 =
background { color rgb <1, 1, 1>/2 }
light_source { 1000*<0, 5, -5> color rgb <1, 1, 1>*1.2 shadowless }
camera {
location <0, 0, -14>
look_at <0, 0, 0>
orthographic
}
// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7 =
Post a reply to this message
Attachments:
Download 'layered.jpg' (19 KB)
Preview of image 'layered.jpg'
![layered.jpg](/povray.binaries.images/attachment/%3C3BB24583.FE858816%40hotmail.com%3E/layered.jpg?preview=1)
|
![](/i/fill.gif) |