|
|
In article <355### [at] 19417421410>,
lut### [at] stmuccom (Lutz Kretzschmar) writes:
>Hi Kevin Odhner, you recently wrote in moray.win:
>Moray can't bevel text (or rather, POV-Ray can't), Moray CAN bevel
POV-Ray *can* do beveled text... (or at least fake it good enough ;) )
// Beveled text
// Michael Lundahl, 1997
#declare bevel_depth = 0.02
#declare text_depth = 0.05
#declare nbr_of_objects = 8 // Determines how many objects should be used
// to create the bevel. Should be > 4.
// High numbers cause long renderintimes.
// Increase if edges are jagged.
#declare beveled_text =
union
{
#declare i = 0
#while (i < 1)
text //This is the bevel itself
{
ttf "brushsci.ttf", "Text", bevel_depth, 0
matrix < 1, 0, 0,
0, 1, 0,
cos(i*2*pi), sin(i*2*pi), 1,
0, 0, 0 >
}
text //This is what is behind the bevel.
{ //Remove this text if you only want the bevel.
ttf "brushsci.ttf", "Text", text_depth, 0
translate<cos(i*2*pi)*bevel_depth,
sin(i*2*pi)*bevel_depth,
bevel_depth>
}
#declare i = i + 1/nbr_of_objects
#end
}
object
{
beveled_text
pigment { Color Red }
finish {phong 1 phong_size 150 specular 1 roughness 0.01}
}
// End of beveled text
This works best with smooth-edge fonts. Takes long but gives fair results.
Here is an example (used for the title-page of a report :) )
http://www.efd.lth.se/~d93mlu/xnews.jpg
Enjoy :)
Post a reply to this message
|
|