POV-Ray : Newsgroups : povray.binaries.images : Help needed : Re: Help needed Server Time
19 Nov 2024 15:39:48 EST (-0500)
  Re: Help needed  
From: Dave Blandston
Date: 4 Dec 2001 11:40:01
Message: <3c0cfc61@news.povray.org>
I believe the original author of the bevel macro was Chris Huff. It's a
great macro, but doesn't work well on certain fonts. It's easily converted
to work on any object that has a flat face. Here's the macro, along with a
usefull "Italicize" macro, and an example picture of both macros in action.
However, for the particular image that you're working on, I agree that
another method is needed to produce that type of bevelling.

Regards,
Dave Blandston

//BevelText (String, Cuts, BevelAng, BevelDepth, Depth, Offset)
//String: the text string
//Cuts: the number of "cuts" to use to get the bevel effect. Multiple of 4
is best.
//BevelAng: the angle of the bevel.
//BevelDepth: the thickness of the bevelled portion.
//Depth: the total thickness of the text object
//Offset: the offset vector for the text object. Might screw stuff up...

#macro BevelText (String, Cuts, BevelAng, BevelDepth, Depth, Offset)
   union {
      text {ttf "sfb_____.ttf", String Depth - BevelDepth, Offset}
      intersection {
         #local J = 0;
         #while (J < Cuts)
            #local A = 2 * pi * J / (Cuts);
            #local CA = cos( radians (BevelAng));
            #local SA = sin (radians (BevelAng));
            text {ttf "sfb_____.ttf", String BevelDepth, Offset
               translate -z * (BevelDepth - J * .0001)
               Shear (x, y, <cos (A) * SA, sin (A) * SA, CA> / CA)
            } //text
            #local J = J + 1;
         #end //#while
      } //intersection
      translate z * BevelDepth
   } //union
#end //macro BevelText

#macro Shear (A, B, C)
   matrix <A.x, A.y, A.z,
           B.x, B.y, B.z,
           C.x, C.y, C.z,
           0, 0, 0>
#end //macro Shear

#macro Italicize ()
   matrix < 1,  0,  0,
           .2,  1,  0,
            0,  0,  1,
            0,  0,  0>
#end //macro Italicize

Example Usage:
            object {
               BevelText ("Hi There, Sportsfans!", 16, 45, .04, .2, 0)
               Italicize ()
               texture {YourTexture}
            } object

"Nekar Xenos" <j-p### [at] citywalkcoza> wrote in message
news:3c0cb86e@news.povray.org...
> I did our company's logo in CorelDraw, but I'd like to redo it in Pov-Ray
with
> photons.
>
> I don't have a clue how to do the text. The bevel macro's that I have
don't
> round off edges. I do recall some-one posting an image of bevelled text
earlier
> this year but I can't remember who. It looked like something done with a
router.
> I think some-one still said it looked like chocolate. Can anyone remember
who
> did that macro and where I can get it or something similar?
>
> Any help will be greatly appreciated.
>
> Thanks,
>
> --
> - Nekar
>
> http://nekar_xenos.tripod.com/metanoia/
>
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.298 / Virus Database: 161 - Release Date: 2001/11/13
>
>
>


Post a reply to this message


Attachments:
Download 'temp.jpg' (5 KB)

Preview of image 'temp.jpg'
temp.jpg


 

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