POV-Ray : Newsgroups : povray.text.scene-files : 3D Text with Sphere_sweeps : Re: 3D Text with Sphere_sweeps Server Time
25 Apr 2024 05:30:48 EDT (-0400)
  Re: 3D Text with Sphere_sweeps  
From: Bald Eagle
Date: 20 Jun 2022 13:30:00
Message: <web.62b0add118b1901c1f9dae3025979125@news.povray.org>
"jr" <cre### [at] gmailcom> wrote:
> hi,
>
> "Dave Blandston" <IsN### [at] protonmailch> wrote:
> > Some notes:
> > ...
> > It's fairly easy but a little tedious to make characters with this macro. What
> > worked for me was to make a bitmap image of the characters with a paint program
> > then mark locations along a path following the center of the character strokes.
>
> thinking that some code to "scan" a black+white/any high contrast image, as
> image_map texture on a box or a plane, would automate that step (leaving only
> the "tedium" of providing the char/word bitmaps :-))

I would say that since most TTF fonts are rendered using Bezier splines, it
would be most efficient to find a way to load in the control points from the
font file itself.

> > The <x, y> coordinates of the marks can then be typed into Coordinate [] array
> > entries and if necessary the diameter multipliers can be adjusted. With a little
> > practice one can achieve acceptable results. Don't forget that the first and
> > last locations aren't actually plotted since the macro uses the b_spline
> > sphere_sweep method.
>
> am still quite amazed at how few points are needed.

Well, that IS the idea behind using splines to render fonts.

Perhaps one way to transform the outline of the fonts, which is used to render
them as a prism {}, into a "centerline font" would be to employ the
inside/outside crossing number testing used for prisms, and calculate the
gradient and therefore the normal of the outline.  Then find the midpoint of
that vector to get a centerline control point for the sphere sweep.

Might be a little challenging with "forked" glyphs like E, F, K, etc....


Post a reply to this message

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