3D Text shatter – Title Sequence Animation
Tuesday, April 6th, 2010The 3d text model was fractured using the shatter plus plugin for Maya (it only works in 32-bit). Then I wrote some python to animate the pieces to fly inwards and come back together. Final Composite in After Effects. I also used trapcode form at the end.
Tools Used:
Maya, After Effects
I had some requests for the script that I used to create the animation for the pre-fractured pieces. Here is the python code to do this in Maya. Copy and paste this into the script editor:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | import maya.cmds as cmds import random foo = cmds.ls ('polySurface*') print (foo) for i in foo: xRand = random.uniform(-50,50) yRand = random.uniform(-50,50) zRand = random.uniform(-50,50) cmds.xform(i, ws=True, r=True, t=(xRand ,yRand ,zRand ), ro=(xRand*10 , yRand*10 , zRand*10 )) cmds.setKeyframe (i, t='1.0') for i in foo: xRand = random.uniform(-10,10) yRand = random.uniform(-10,10) zRand = random.uniform(-10,10) cmds.xform(i, ws=True, t=(0,0,0), ro=(xRand*5, yRand*5, zRand*5)) cmds.setKeyframe (i, t='50.0') for i in foo: cmds.xform(i, ws=True, ro=(0,0,0)) cmds.setKeyframe (i, t='60.0') } |
Hi there,
I’m interested in knowing what python script you wrote to animate this ?
Thanks.
Hi Dinesh, I updated the post with the python code. I hope that helps.