POV-Ray : Newsgroups : povray.newusers : Text textures? : Re: Text textures? Server Time
29 Jul 2024 18:29:00 EDT (-0400)
  Re: Text textures?  
From: Giuseppe Bilotta
Date: 19 May 2005 06:45:22
Message: <173nvsrozm3vq.61l16mimoudp.dlg@40tude.net>
On Thu, 19 May 2005 10:13:29 +0100, Mike Williams wrote:

> Wasn't it Giuseppe Bilotta who wrote:
>>Hello all,
>>
>>I definitively qualify as a newuser (heard about POV-Ray for the first
>>time last summer on a conference on TeX), so I might have missed
>>something obvious in the documentation, but for the heart of me I
>>can't find a simple, immediate way to "stamp" some text on an object,
>>esp. a curved one. For example: how would you write some text on a
>>spherical surface?
> 
> For objects that can be uv-mapped, you can create an object pattern and
> uv-map that pattern onto the curved surface. 
> 
>   camera {location  <0,0,-20> look_at <0,0,0> angle 30}
>   light_source {<-30, 100, -30> color rgb 1}
> 
>   #declare TEXT = text { ttf "crystal.ttf", "POV-Ray", 2, 0
>                          scale 0.1 translate <0.57,0.6,-0.1> }
>                                                 
>   #declare P = pigment { object {TEXT rgb <1,0,0> rgb <1,1,0>}}
> 
>   sphere {0,3 uv_mapping pigment {P}} 

Thank you very much, I think I see the idea.

Am I right in saying that I should always scale the text so that it
fits within the unit box? (At least for spheres) I'm not sure what's
the purpose of the translation, though.

-- 
Giuseppe "Oblomov" Bilotta

[W]hat country can preserve its liberties, if its rulers are not
warned from time to time that [the] people preserve the spirit of
resistance? Let them take arms...The tree of liberty must be
refreshed from time to time, with the blood of patriots and
tyrants.
	-- Thomas Jefferson, letter to Col. William S. Smith, 1787


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.