2
$\begingroup$

I need an way to generate a text with some thickeness giving a correct mesh after convertion for boolean operations.

I tried two methods and both of them can lead to incorrect mesh:

Text extrude parameter:

This parameter allows to give some thickeness to a text object, but once converted to a mesh, each letter is in three parts, twice the letter and the rim, with duplicated vertices: enter image description here enter image description here

Solidify modifier:

With solidify modifier, the mesh is usualy better, but some character will sometimes be deformed, Especially the "T" , but also the "4" and the "t".

enter image description here To reproduce this, Just add a text object with a solidify modifier (0.2 thick and offest to 0 in my case) and play with the size.

So my question is, is it a way to correct this? Sure there are workarounds, like adding the solidify modifier after the convertion to mesh, or removing the double in the mesh after conversion in the first case, but i'd like to find a cleaner way to do that, keeping the ability to visualize the text with thickness before conversion.

$\endgroup$
6
  • 1
    $\begingroup$ Hi, in both cases I think that the text > mesh convesion is buggy, at least with some letters like the "T"... even the new 2.79 rc1 has this behaviour, I guess it should be reported! btw why you added the "python" tag? do you need to do this from a python script? $\endgroup$
    – m.ardito
    Jul 24, 2017 at 9:34
  • $\begingroup$ update: it seems this conversion was always flawed, even back to 2.49b... O_o $\endgroup$
    – m.ardito
    Jul 24, 2017 at 9:45
  • 1
    $\begingroup$ I tried reporting, just now (developer.blender.org/T52171), let's see what happens. In the meanwhile I suggest you to correct the T (and t) letters just after conversion, or any later processing will be screwed by this letter's wrong faces... $\endgroup$
    – m.ardito
    Jul 24, 2017 at 10:07
  • $\begingroup$ Thx for reporting and for comments. Actually, i'm working with python, so a python solution would be good for me, but since this problem can be reproduced in the blender windows without using python I didn't ask for a solution with python. The problem is not python related but the solution could ;). For version, I'm working with 2.73 and i tried 2.78, both have the same problem. $\endgroup$
    – Pyros
    Jul 24, 2017 at 10:46
  • $\begingroup$ just to update all users here, my report has been "archived", with "Thanks for the report, but text “meshification” leading to terrible topology is very old know issue, nothing new here, that is not considered as a bug currently."... so it's a bug so old, that's become... a feature? I'm wordless... $\endgroup$
    – m.ardito
    Jul 26, 2017 at 18:01

4 Answers 4

3
$\begingroup$

enter image description here

I always find it easier to convert a flat text object into a mesh and to extrude the mesh. this generates a much cleaner geometry that doesn't really cause any trouble with boolean modifiers.

Here's an example:

import bpy

C = bpy.context
S = C.scene

# Add a new text object
t = bpy.data.curves.new( 'text', 'FONT' )
t.body = "Testing 1 2 3"
o = bpy.data.objects.new( 'text', t )
S.objects.link( o )

o.select = True
S.objects.active = o

# Convert to mesh
bpy.ops.object.convert()

# Extrude text
bpy.ops.object.mode_set( mode = 'EDIT' )       # Go to edit mode
bpy.ops.mesh.select_all( action = 'SELECT' )   # Select all mesh elements
bpy.ops.mesh.extrude_region_move( 
    TRANSFORM_OT_translate={"value":(0, 0, 1)} # Extrude by 1 BU on Z axis
)
bpy.ops.object.mode_set( mode = 'OBJECT' )     # Back to object mode

# Test Boolean
cube = bpy.data.objects['Cube']
m    = cube.modifiers.new( 'Bool', 'BOOLEAN' )
m.operation = 'DIFFERENCE'
m.object    = o
$\endgroup$
4
  • $\begingroup$ This is a working solution but the kind of workaround iI would like to avoid. There are two reasons: the first one, I like to keep the text editable with the thickeness already visible. In this case, as i said in the question it is possible to go back and when applying the texts but it is a "dirty" solution . The second one, I also often use the shrinkwarp modifier on text before the solidify. In this case your solution wont work at all since the text is "bended". Here i'm trying to understand why i have this bad geometry with solidify modifier and it look like it is a bug. $\endgroup$
    – Pyros
    Jul 24, 2017 at 12:33
  • $\begingroup$ The text objects are really rudimentary, and have not been originally designed to interact with other objects in this way, and they're based on curves that are in turn generated by fonts (neither of which have been built with topology in mind). That's why you'll almost always see people converting to mesh before doing anything complicated with a text object. BTW, you can still use a shrinkwrap after (or before) extruding the mesh converted text, not sure why this might be a problem. $\endgroup$
    – TLousky
    Jul 24, 2017 at 12:47
  • $\begingroup$ If you Shrinkwrap after extrude, you will loose thickeness from previous extrusion and obtain a really bad geometry. If you extrude after shrinkwrap, you will extrude in one direction and not on faces normal. In this case the solidify modifier is way better. But in any case, like @m.ardito said, the T geometry is awful after convertion even without any modifier. Just add a text, convert it, and look at the T geometry. So it looks like the only solution is to clean the mesh after conversion. $\endgroup$
    – Pyros
    Jul 24, 2017 at 12:55
  • $\begingroup$ You can use a shrinkrwap after extruding without causing too much of a mess if you use a vertex group (and include only the verts you want to deform). The text geometry is pretty awful even after conversion, but yeah - you can use a remesh modifier or other methods to clean it up. $\endgroup$
    – TLousky
    Jul 24, 2017 at 12:58
2
$\begingroup$

In 2.91 version I used solidfy complex option, and it works perfectly. Glitches are removed Solidify first option, complex mode

from enter image description here

to enter image description here

$\endgroup$
0
$\begingroup$

Thanks for the report, but text “meshification” leading to terrible topology is very old know issue, nothing new here, that is not considered as a bug currently. mont29

Blender dev don't want to correct this problem for now, so, the only way to have a good topology with text is to use another text generation, or to correct topology yoursef.

I'll give a partial answer, to solve the topology problems, but this solution is just based on somme topology problems on the T letter, and is didn't test all cases, so you'll maybe have to adapt this solution if it doesn't correct other topology problem or create other defects.

So the problem come from the bad topology generated from the conversion to mesh. Some 0 area faces are created, and with computation errors the normal of a 0 area face can be random, depending of the scale/position/rotation of the object and lead to bad result. In any cases, 0 area faces are bad for 3Dprinting.

A solution will be to use the degenerate dissolve after conversion, multiple times if necessary (until there are no edge or face removed), then triangulate the face again.

Mesh correction: Detailled explanation:

The convertion of a T-shape curve will result in a mesh with some 0 area faces. enter image description here Has we can see in this example the vertice is not connected to an edge.

enter image description here Here is the 0 area face

The limited dissolve is not able to remove 0 area face, so use the degenerate dissolve in Mesh>Clean up>Degenerate dissolve (with all faces selected). Repeat this step until no edge or face are removed.

enter image description here

Now we can see that the corner vertice is connected to all edges. enter image description here The face is an ngon, so we have to triangulate the mesh if needed. enter image description here

Using solidify anyway, the trick

Since the mesh will only be fixed after conversion, the solidify modifier on text objects can give strange results. I managed to obtained a stable rendering of solidify on text object by cheking both "Even thickness" and "High Quality normals". Not sure it will work in any case. enter image description here

The good point about this is that since the mesh is not deformed by solidify normal miscalculations of 0 area faces, the conversion can be done with the modifier, and the Mesh correction explained before will work with the generated 3D model. It is still a better solution to clean before solidify when possible.

$\endgroup$
0
$\begingroup$

Try using a combination of Collapse and Planar decimate modifiers after your solidify. In small amounts, these can often have an effect similar to removing doubles. However, this may not work depending on font and complexity of the text. Or you may find that it fixes some areas, but amounts of it that can fix others destroy detail in other areas.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .