|
![](/i/fill.gif) |
Hershel Robinson wrote:
> I can get the letters to appear to be cut out of the button, but when I do
> it, I lose the green color of the letters, I presume because most of the
> engraved letter is in shadow and so it shows up black. Do you know how I
> can create this engraved effect and yet still retain the full color of the
> letters?
When you want to cut something away, you have to use the 'difference' of
the both objects. So:
difference{
A
B
}
This will cut away object B from object A. The texture the resulting
objects depends where you put the 'texture' statements. If you put it at
the end then the whole object has the same texture, if you put it into each
of the two objects then it will have all over the texture form A except
where B cuts A.
This kind of operation is called 'CSG'. There is some documentation about
it (besides the manual of course!) at
http://www.cs.mtu.edu/~shene/COURSES/cs3621/LAB/povray/csg.html
> My code (without any fancy color manipulations):
Using difference this should look like:
>
> #include "colors.inc"
> #include "textures.inc"
>
> #declare Cam3 = camera { location<3.1,2,-7>
> look_at <3.1,2,0>}
> camera{Cam3}
>
> light_source{<-12,15,-15> color White}
>
difference{
> blob {
> threshold .65
>
> cylinder { <0,0 ,0>, <6,0 ,0>, 1, 1 }
> cylinder { <0,.5 ,0>, <6,.5 ,0>, 1, 1 }
> cylinder { <0,1 ,0>, <6,1 ,0>, 1, 1 }
>
> // pigment { Blue }
> pigment { rgb <0.1 , 0.5, .9> }
> finish { phong 1 }
>
> translate .65*z
> }
>
> text { ttf "timrom.ttf" "View Pipeline" .1, 0
>
// > pigment { Black}
I thought you wanted them green. So you need
pigment{Green}
>
> translate <0, .20, 0.03>
>
> finish { diffuse .9 }
>
> }
}
>
> plane {<0,0,-1>, -.25
> pigment {color White}
> finish { diffuse 10 }
> }
>
Note that I have not tested the scene. I hope it works all the same ;)
- Micha
P.S. The pages at www.povworld.de/objects and www.povworld.de/book might be
interesting for you. The first provides more than 250 source code for
povray objects, with the second you find a list of tutorials found on the
web.
--
Ceterum censeo Microsoft esse dividendum.
Post a reply to this message
|
![](/i/fill.gif) |