Blender Does Wordle

Hi All,

I just discovered Wordle.net. It is a website that generates a word cloud from text you enter or the tags it can fetch from a website or RSS feed. I know, everybody else has probably already heard about it, I guess I have had my head under a rock.

What I did was generate a word cloud from my website and click the print button. But instead of actually sending it to the printer, I sent it to a PDF (care of PDF Creator). Then I opened the PDF in Illustrator and saved it out as a SVG file. I imported the SVG file into Blender and told the importer to use the colors and make an object out of every curve.

Yikes, I ended up with over 400 letters to manage. So there was some fixup time, about 2 hours, then I had my word cloud as 2D curves inside Blender. Feeling kind of discouraged about having to set the extrude for 400 objects, I wrote a little script to do that for me.

Here is the Wordle helper script that will apply the same extrude to all curve objects it finds in the scene.


import Blender as B
import math

def SetCurveExtrusions():
    scn = B.Scene.GetCurrent()
    obs = scn.objects

    for i in obs:
        if i.getType() == 'Curve':
            print ("Working on [" + i.name + "].")
            curvedata = i.data
            # Set the extrude value for this curve.
            curvedata.setExt1(0.06)
            i.update()
    B.Redraw()
            
if __name__ == '__main__':
    SetCurveExtrusions ()

Even with the fixup time, it was still fairly quick to create a bunch of text that is layed out in an artistic way with an eye pleasing palette.

Attachments



great job, that’s really cool.
you should let Mato know about this for his svg work.

Who is Mato and what SVG work? I do have some suggestions if you are referring to the 2.5 SVg import.

Mato is this guy http://graphicall.org/builds/builds/showbuild.php?action=show&id=1105
working on the vectex(svg texture) builds, he has got very far. :slight_smile:
you would most likely be a valuable help to him & both ways.
just bumped his thread / macouno’s thread in scripts.