1
$\begingroup$

I followed this tutorial https://www.youtube.com/watch?v=Y59O7wunijo making a text with a Grease Pencil and then converting it to Bezier curve so I can control the text appearing by tweaking Bevel factor End parameter. However I need a printed text with fonts, I thought if I create a text and then convert it to Bezier Curve it would give me the same result, but it doesn`t work, nothing changes. Is there a way to achieve it?

$\endgroup$
3
$\begingroup$

text writing

This is how I did it (this may not be the best solution).

Bevel factor works with non-cyclic curves. So you need to do this one character at a time.

  • Create the text object of the character
  • convert to curve (alt + c)
  • uncheck cyclic (U) option in curve object data
  • Extrude the unconnected node to have a closing edge manually
  • increase depth to a non-zero value

Now you should be able to control the curve length with bevel factor.

$\endgroup$
  • $\begingroup$ Thanks! Slightly unusual method but works for sure! The only thing that bothers me though is the text has no body but the edges\contours, but for my particular project it`s totally fine $\endgroup$ – Blender Enthusiast Oct 28 '18 at 14:51
  • 1
    $\begingroup$ Glad that it helped :) $\endgroup$ – Blender Dadaist Oct 28 '18 at 16:23
1
$\begingroup$

draw text I could not resist the temptation of writing a script for this :) especially since the last segment could be difficult to replicate manually.

You might want to give it a try. Please be careful and backup your file before running it because the script deletes the original curve objects and replaces them with the new ones. Also it's not thoroughly tested.

import bpy

depth = 0.01

def createSpline(curveData, srcSpline):
    spline = curveData.splines.new('BEZIER')
    spline.bezier_points.add(len(srcSpline.bezier_points)-1)
    spline.use_cyclic_u = False

    for i in range(0, len(srcSpline.bezier_points)):
        spline.bezier_points[i].co = srcSpline.bezier_points[i].co
        spline.bezier_points[i].handle_left = srcSpline.bezier_points[i].handle_left
        spline.bezier_points[i].handle_left_type = srcSpline.bezier_points[i].handle_left_type
        spline.bezier_points[i].handle_right = srcSpline.bezier_points[i].handle_right
        spline.bezier_points[i].handle_right_type = srcSpline.bezier_points[i].handle_right_type

    if(srcSpline.use_cyclic_u == True):
        spline.bezier_points.add(1)
        spline.bezier_points[-1].co = srcSpline.bezier_points[0].co
        spline.bezier_points[-1].handle_left = srcSpline.bezier_points[0].handle_left
        spline.bezier_points[-1].handle_left_type = srcSpline.bezier_points[0].handle_left_type
        spline.bezier_points[-1].handle_right = srcSpline.bezier_points[0].handle_right
        spline.bezier_points[-1].handle_right_type = srcSpline.bezier_points[0].handle_right_type

for obj in bpy.context.selected_objects:
    if(obj.type != 'CURVE'):
        continue

    curveData = obj.data
    if(len(curveData.splines) > 1 or curveData.splines[0].use_cyclic_u == True):
        for i, spline in enumerate(obj.data.splines):
            objCopy = obj.copy()
            dataCopy = obj.data.copy()
            dataCopy.splines.clear()
            dataCopy.bevel_depth = depth
            objCopy.data = dataCopy
            objCopy.name = obj.name+'_'+str(i)
            createSpline(dataCopy, spline)        
            bpy.context.scene.objects.link(objCopy)

        bpy.context.scene.objects.unlink(obj)
        bpy.data.curves.remove(curveData)
        bpy.data.objects.remove(obj)
$\endgroup$
  • $\begingroup$ wow thats smth new to me! Ill definitely give it a try, never dealt with Text-like scripts, just opened up a console and pasted, every line is red and errors are everywhere. Will investigate further! $\endgroup$ – Blender Enthusiast Oct 29 '18 at 15:33
  • 1
    $\begingroup$ Sure. You will find instructions to execute a script in the second part of this answer: blender.stackexchange.com/a/119694/61910 $\endgroup$ – Blender Dadaist Oct 30 '18 at 12:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.