POV-Ray : Newsgroups : povray.binaries.images : IRTC WIP : Re: IRTC WIP Server Time
31 Jul 2024 04:23:02 EDT (-0400)
  Re: IRTC WIP  
From: Alain
Date: 10 Apr 2010 20:56:04
Message: <4bc11e24$1@news.povray.org>

>> BTW, I know this sounds like a newbie question but: has anyone got a nice
>> way to round or bevel the edges on those letters?
>
> Typically, I answered my own question! Here's a simple macro I just bashed
> together:
>
> #macro BevelledText( Font, Text, Thickness, AlignH, AlignV, Bevel )
>   #local Obj = text { ttf Font Text Thickness, 0 #if ( AlignH )
> h_align_center #end #if ( AlignV ) v_align_center #end }
>   union {
>    object { Obj clipped_by { plane { -z, -Bevel } } }
>    intersection {
>     #local a=0; #while ( a<  360 )
>      object { Obj translate -Bevel*z Shear_Trans(x,y,vrotate(z+x,z*a))
> translate z*Bevel }
>     #local a=a+45;#end
>     //plane { -z, 0 }
>     clipped_by { plane { z, Bevel } }
>    }
>    bounded_by { object { Obj } }
>   }
> #end
>
> It's not perfect (you can see some glitches in the concave corners) so if
> anyone has a better solution I'd like to know :)
>

It's way beter than the beveled fonts you find as a demo scene that 
ships wit POV-Ray... The sample use averaged object patterns.
It should also render faster.



Alain


Post a reply to this message

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