|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I was trying out some of the demos/tutorials, and ran into a problem with the
"filter" command. The problem being that "filter" does not seem to work. This
is in the "csgdemo.pov" tutorial. I followed the code more or less as it
appears in the help guide, but I'm not getting any transparency as the tutorial
says I should. Here's the code as I've written it (slightly different from the
tutorial):
// BEGIN HERE
#include "colors.inc"
camera {
location <0, 1, -10>
look_at 0
angle 36
}
light_source { <500, 500, -1000> White }
plane { y, -1.5
pigment { checker Green White }
rotate y*25
}
#declare Lens_With_Hole =
difference {
intersection {
sphere { <0, 0, 0>, 1
// pigment { Blue }
translate -0.5*x
}
sphere { <0, 0, 0>, 1
// pigment { Red }
translate 0.5*x
}
pigment { Red }
// scale <1, .25, 1>
// rotate <30, 0, 45>
rotate y*90
}
cylinder { <0, 0, -1> <0, 0, 0>, .35
pigment { Blue }
}
// rotate y*-30
}
merge {
object { Lens_With_Hole translate <-.65, .65, 0> }
object { Lens_With_Hole translate <.65, .65, 0> }
object { Lens_With_Hole translate <-.65, -.65, 0> }
object { Lens_With_Hole translate <.65, -.65, 0> }
pigment { Red filter .5 } // um, filter does not seem to be working
}
// END HERE
Any ideas? Is the tutorial wrong, or did I miss something? Any help would be
appreciated.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Your Lens_With_Hole def still has pigments in it. These are overriding the final
pigment (the one with the filter). Comment or remove them and it should work
fine.
Bill
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"movie_geek" <nomail@nomail> wrote:
> I was trying out some of the demos/tutorials, and ran into a problem with the
> "filter" command. The problem being that "filter" does not seem to work. This
> is in the "csgdemo.pov" tutorial. I followed the code more or less as it
> appears in the help guide, but I'm not getting any transparency as the tutorial
> says I should. Here's the code as I've written it (slightly different from the
> tutorial):
>
> // BEGIN HERE
> #include "colors.inc"
> camera {
> location <0, 1, -10>
> look_at 0
> angle 36
> }
>
> light_source { <500, 500, -1000> White }
> plane { y, -1.5
> pigment { checker Green White }
> rotate y*25
> }
>
> #declare Lens_With_Hole =
> difference {
> intersection {
> sphere { <0, 0, 0>, 1
> // pigment { Blue }
> translate -0.5*x
> }
> sphere { <0, 0, 0>, 1
> // pigment { Red }
> translate 0.5*x
> }
> pigment { Red }
> // scale <1, .25, 1>
> // rotate <30, 0, 45>
> rotate y*90
> }
>
> cylinder { <0, 0, -1> <0, 0, 0>, .35
> pigment { Blue }
> }
> // rotate y*-30
> }
>
> merge {
> object { Lens_With_Hole translate <-.65, .65, 0> }
> object { Lens_With_Hole translate <.65, .65, 0> }
> object { Lens_With_Hole translate <-.65, -.65, 0> }
> object { Lens_With_Hole translate <.65, -.65, 0> }
> pigment { Red filter .5 } // um, filter does not seem to be working
> }
>
> // END HERE
>
>
> Any ideas? Is the tutorial wrong, or did I miss something? Any help would be
> appreciated.
Remove the previous "pigment {Red}" from the object declaration. You have
already given the spheres a solid red pigment, the second pigment in the merge
only gets applied to objects that don't have previously declared pigments. It
doesn't override previous ones. (the same is true for finish, normal, texture,
material, etc.)
-tgq
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Excellent! Worked perfectly! Thanks for your help. I knew it was something
simple like this.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|