2
$\begingroup$

I have a unique issue. I am trying to create animation effects similar to those found in the below tutorials using text objects that can be customized later with the text options in the object data tab. To achieve this, my text objects cannot be converted to a mesh, as both tutorials describe. I'm not sure if there is a way to use an unconverted text object with the boolean modifier as described in the second tutorial, or have a text object emit particles as described in the first tutorial.

http://www.blenderdiplom.com/en/tutorials/all-tutorials/394-tutorial-dissolve-your-logo-in-blender-262.html

http://www.blenderskool.cf/carve-a-text-from-a-wooden-block/

Again, it is very important that these text objects not be converted into mesh objects! Any help is greatly appreciated, even if it is a simple confirmation that what I am trying to achieve is not yet possible in Blender. Thanks!

$\endgroup$

1 Answer 1

3
$\begingroup$

After a bit of experimentation my conclusion is that there's no direct way to add a particle system to a text object, or to use it for boolean operations.

However, you can make your life easier by using a single button to create and update a mesh version of your text, using the script below.

enter image description here

I tried making the mesh updates automatic by running the update function in the scene update event handlers, but this proved to be a bad idea, and caused memory usage to increase continuously every second.

The script will add a "Text" tab in the tools panel, where you have a button called "Update text mesh".

Pressing the button will generate a mesh version of your text, or update an existing one to any changes you made to your text object. It will also hide the text object so as to make it a bit easier to work. To update anything, just unhide the text object, make your changes, then press the button again.

To make things simple, the script assumes your text object's name is "Text". No other name will work, and if no such object appears, you will not even see the "Text" tab in the tools panel.

Copy and paste this to a text editor and press "Run Script", or install as an addon for more permanent usage.

bl_info = {
    "name"        : "Update text to mesh",
    "blender"     : (2, 75, 0),
    "version"     : (0, 0, 0, 1),
    "location"    : "3D View > Toolbox",
    "description" : "Update mesh copy of text object",
    "category"    : "Object"
}

import bpy

class update_text_mesh( bpy.types.Operator ):
    bl_idname      = 'object.update_text_mesh'
    bl_label       = 'Update text mesh'
    bl_options     = {'REGISTER', 'UNDO'}

    @classmethod
    def poll( self, context ): return 'Text' in context.scene.objects

    def generate_text_mesh( self, context ):
        if 'TextMesh' not in context.scene.objects:
             m = bpy.data.meshes.new_from_object( 
                context.scene, context.scene.objects['Text'], True, 'RENDER', True, True 
             )

             o = bpy.data.objects.new( 'TextMesh', m )
             context.scene.objects.link( o )

    def execute( self, context ):
        o = context.scene.objects['TextMesh']
        t = context.scene.objects['Text']

        t.hide = True
        o.location = t.location

        o.data = t.to_mesh( context.scene, True, 'RENDER', True, True )

        return {'FINISHED'}


class UpdateTextPanel( bpy.types.Panel ):
    bl_idname      = "UpdateTextPanel"
    bl_label       = "Text to Mesh Updater"
    bl_category    = "Text"
    bl_space_type  = 'VIEW_3D'
    bl_region_type = 'TOOLS'

    @classmethod
    def poll( self, context ): return 'Text' in context.scene.objects

    def draw( self, context):
        layout = self.layout
        col    = layout.column()

        col.operator(
            'object.update_text_mesh',
            text = 'Update text mesh'
        )

def register():
    bpy.utils.register_module(__name__)

def unregister():
    bpy.utils.unregister_module(__name__)

if __name__ == "__main__":
    register()

EDITED: added a version that updates the mesh automatically with every frame change. Also requires the text object to be named "Text", but otherwise requires nothing else. Copy this script to the text editor and press "Run Script" to activate.

import bpy

def update_text( scene ):
    if 'TextMesh' not in scene.objects:
         m = bpy.data.meshes.new_from_object( 
            scene, scene.objects['Text'], True, 'RENDER', True, True 
         )

         o = bpy.data.objects.new( 'TextMesh', m )
         scene.objects.link( o )

    o = scene.objects['TextMesh']
    t = scene.objects['Text']

    t.hide = True
    o.location = t.location

    o.data = t.to_mesh( scene, True, 'RENDER', True, True )

bpy.app.handlers.frame_change_pre.append( update_text )
$\endgroup$
3
  • $\begingroup$ BTW, do let me know if you want to use this for an animation. If so, it will be pretty easy (and safe) to create a version of this script that updates automatically with every frame change. $\endgroup$
    – TLousky
    Oct 13, 2015 at 20:56
  • $\begingroup$ Wow, this sounds like exactly what I need! I actually am using this for an animation, so if you don't mind creating that second version, I would greatly appreciate it. Thank you for your help! $\endgroup$
    – Emelie K.
    Oct 13, 2015 at 21:19
  • $\begingroup$ @EmelieK. Updated the script, use the 2nd script to update the mesh automatically with every frame change. $\endgroup$
    – TLousky
    Oct 13, 2015 at 21:39

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.