POV-Ray : Newsgroups : povray.binaries.images : 3D Text with Sphere_sweeps : Re: 3D Text with Sphere_sweeps Server Time
16 Apr 2024 09:23:55 EDT (-0400)
  Re: 3D Text with Sphere_sweeps  
From: Bald Eagle
Date: 21 Jun 2022 18:25:00
Message: <web.62b2444b18b1901c1f9dae3025979125@news.povray.org>
"Dave Blandston" <IsN### [at] protonmailch> wrote:
> Alain Martel <kua### [at] videotronca> wrote:
> > How so ?
> > What we see in those circled areas is exactly as expected.
> >
> > To smooth out those areas out, you'd probably need to convert the whole
> > thing into an iso_surface and apply some blobing.
>
>
> Yes that's what I'm thinking of trying. Bald Eagle has made some amazing code
> that does the smoothing. It's a small detail but I think it would make the
> letters look better.

I just translated Inigo Quilez's Shadertoy code into SDL.  I'm sure he got the
basics of that from OpenGL

"jr" wrote:

> that's an interesting page, some of the other posts I scanned cursorily looked
> worth returning to.  thanks.

> (sticking my neck out) I think we'd need WFP to become interested, make 'povr'
> export/make visible the TTF data it (as pointed out) already has, in the parser;
> pass in a text{} and get back metrics, that sort of thing.

Well, I would say that as "purists", we tend to dismiss 3rd party/"other"
software, but I would strongly encourage everyone to explore what's out there
and _make use of_ those software packages and programming languages and use them
as inspiration for functions, macros, and other things that are in SDL.

If I was going to pursue this project, I'd probably start out by contacting
Inigo Quilez or Martijn Steinrucker (Art of Code on YouTube) and asking about
how to write functions to make the required sphere sweep segments.  I'd also
find somewhere to post on the ShaderToy forums to see if anyone has written code
to translate TTF into renderable ShaderToy code.
Look for TTF importing/decoding libraries in languages that you understand.
Perhaps Freya Holmer has done some work on this in relation to ... her ...
presentations on Bezier curves.

Casting about on the internet in places you don't often go can broaden your
horizons, give you new idea and inspiration, and you can _communicate with
people about POV-Ray_ which may spark their interest in some way.

I'm confident that a lot of the necessary steps can be done in SDL, but perhaps
there's a simple command-line thing that will spit out the bezier spline control
points of the segments that make up the glyphs in a font.  Then you could use
that to generate a text file for use in POV-Ray.
I'd say first get it to work, then if you want, you can do the programming
needed to gather it all into an SDL-only scene file.

But rule #1 is usually "See if this has been done before" and use other people's
code - it will save a ton of time, mistakes, and debugging frustration.

The other point/aside I wanted to make, is that if there was a way to make a
signed distance function for the whole glyph, then you could probably just code
them at an undersized diameter, and then "inflate" them to get the rounding
automatically, but I think that would be a very very long shot, and probably not
something that would lend itself to automation.


Post a reply to this message

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