|
![](/i/fill.gif) |
"-_-==TheCa5e==-_-" <Kee### [at] hotmail com> wrote in message
news:web.468e988ba97195aba5ca18bf0@news.povray.org...
> Hi, this might be easy for most of you, but after reading some tutorials I
> still wasn't able to do it. So, I would be very pleased and grateful if
> somebody could help me out.
>
> I have generated a scene of a molecule consisting of atoms (spheres) and
> bonds (cylinders) in POV-Ray.
>
> Now I want certain spheres look like metal balls with non reflecting text
> on
> top of it, like it is printed. More specifically, I want to put the atom
> identification on top of the sphere. I have tried something with
> object_pattern but probably did something wrong??
>
> Any comments and suggestions are very welcome,
>
> thanx in advance,
>
> Kees
>
Hi Kees,
Here's a simple example of writing text onto a sphere. The text object
'YourText' starts at the origin and is 2 units thick, stretching from z=0 to
z=2. Translating it brings it in line with the surface of a 1 unit radius
sphere centred at the origin.
The pigment declared as 'TextPigment' uses the object as a pigment and sets
the 3D space inside the object to a yellow colour with the 3D space outside
the object being set to transparent. The texture is applied to the object
layered on top of another texture, which in this case is red, but could
equally well be the your shiny texture.
camera {location <0,0,-20> look_at <0,0,0> angle 30}
light_source {<-30, 10, -30> color rgb 1}
#declare YourText = text {ttf "crystal.ttf", "POV-Ray", 2, 0
translate <-1.5,-0.5,-3> }
#declare TextPigment = pigment {object {YourText rgbt 1 rgb <1,1,0>}}
sphere {0,3
texture {pigment {color rgb <1,0,0>}}
texture {pigment {TextPigment}}
}
Regards,
Chris B.
Post a reply to this message
|
![](/i/fill.gif) |