Announce: Pomelo - a text to mesh generator

I’m happy to announce the first pre-release version of my text to mesh generator, called Pomelo. (Why Pomelo? I’m not really sure, and am open to better naming ideas.)

A bit of background. About half a year ago I tried beveling text in Blender. It was painful. I naively thought that all you needed to do was to write text, extrude and bevel. But this caused lots of bad geometry that needed to be fixed manually. I thought there must be a better way, and after several prototypes, studying 2D and 3D topology, learning gtkmm, pango, cairo, freetype, I finally built Pomelo.

The generation of a text mesh is a two step process in Pomelo. The first step is a 2D algorithm called straight skeleton. It turns out that this is quite slow, so I separated the step from the second step which I called profiling. The profiling uses the skeleton and pushes it up into 3D to generate a mesh.

Eventually I would like to have a rich set of profiles, but currently I only added a rounded corner profile.

The source code repository for pamelo is at: http://github.com/dov/pomelo .

I created a Windows installer which can be downloaded at https://github.com/dov/pomelo/releases/download/v0.0.1/InstallPomelo-w64-0.0.1-f2fc26.exe

I’m open for suggestions, and even more so, for code contributions.

And please don’t get me wrong. Blender is a fantastic amazing program! It just doesn’t do text meshes very well.

15 Likes

Thanks for doing this, Dov. Maybe you could post some pictures of what you can achieve with this?

Thanks for the suggestion Howard. Here are a few images.

First the meaning of profiling. Check the difference of different bevel radii:

(More in the next post, as I as a newbie can only put one media per reply)

4 Likes

Here is the result of loading a random mesh from Pomelo (note the use of the :heart: unicode character) into Blender and looking at it with MatCap:

3 Likes

International and cursive languages are supported as well. Here is “peace” in arabic:

This still isn’t perfect, as the joining of characters create complex geometries.

Hope these three examples are enough for starters.

1 Like

I have created a new version of pomelo with the following changes:

  1. Fixed some bad geometry issues.
  2. Added another parameter that allows defining an outline ridge.
  3. Added an 2D skeleton viewer

See the github page at http://github.com/dov/pomelo for download.

4 Likes

I have released a new version v0.0.3 of Pomelo that adds the ability of importing svg files. This allows creating your artwork in any 2D editor, or just cleaning up bad font geometry, and then push the result into 3D.

The windows installer is available for download from: github dot com /dov/pomelo/releases/download/v0.0.3/InstallPomelo-w64-v0.0.3-675cad.exe (This forum does not allow me to link there!). Linux users have to compile it on their own.

2 Likes

This looks good. It would be nice to have build instructions for Linux.

Thanks. There is a building.md file in the main repo. Try following its instructions and open an issue if something is not working.

I really should add a blurb about external dependencies as well, but at the time you’ll just have to look at the error messages and figure it out on your own.

Thanks for the suggestion however I do not see the file there.

https://github.com/dov/pomelo/search?q=build.md

Oops. My mistake. I added it now. It’s called building.md.

Well Done. Personally I have not used typeset and fonts extensively in my works, but I am 100% interested in the part that turns shapes to relief surfaces. I was able to gain some understanding by looking at your source code on turning SVGs to surfaces, perhaps this is something similar of what I am trying to do.

Thanks for the encouragement.

By SVGs I assume that you mean SVG paths (and since all SVG elements can be turned into paths, it is one and the same), then this is exactly what I’m trying to achieve. I should document my methodology and code one day, but in short, by turning the 2D contour into a straight skeleton, I can create a relief function that depends only on the distance from the corresponding edge. Currently I only supply one such relief function, an arc followed by a constant, but I’m planning of allowing user defined functions in the future.

In any case, as I assume that you have already discovered, all the heavy machinery is in the source file pangocairo-to-contour.cc. And I assume that you saw that in the latest version I allow importing svg paths directly, so you no longer have to through fonts.

Yeah, this example image with the fish does exactly what I wanted to do. It can’t get any better. :slight_smile:

Untitled-1.fw
Hello, how should one proceed ?
Windows 10 using installer.

That missing DLL was added a few commits back. Which installer did you grab? You should get the v0.0.3 version from https://github.com/dov/pomelo/releases . Did you?

Thanks !
This is such a useful standalone program ! :smiley:

1 Like

THAT is a brilliant little app.
Thank you.
Robert

1 Like

What a nice app you created! Just used it as I am starting to lookdev a title for my Pen&Paper group. It says “The Yellow Buttons” in german if anyone is curious. Long story how that name came about.
I generated the type in Illustrator, exported as SVG, processed this in Pomelo and exported to Blender as an STL.
Pomelo worked like a charm. The only thing I missed was like a “reset view” button (or keyboard shortcut). Like the functionality the home or . numpad button provides in Blenders viewport.
Thanks a lot for the tool!

1 Like

Thanks! That’s beautiful! Would you mind documenting the steps you used for your ray tracing in Blender? I’m quite a newbie regarding with regards to blender.

Also nice with the Pen&Paper group. It sounds like it refers to calligraphy. I used to be a calligrapher myself in my youth. :slight_smile:

Regarding “reset view” button, I already bound it to both 【1】 and 【f】 . But I see that Home and . are doing something a bit different in blender. I have to think about it.

Thanks for your encouragement!

1 Like