I've been attending the Technical Art Applications class in addition to Animation.
It's actually really useful and informs the animation material a lot!
We learned how to make a custom button that would reset the rig back to it's original position!
This was really useful in making Grunt do the Time Warp.
I'll try and keep up with the work in Tech Arts as well and will decide which class I want to take by Pitch Week!
In the second week, we tried to use scripting to generate some simple objects on the screen!
Max and I sat and worked out just how to generate objects in a circle! So that was pretty cool!
We were okay with the maths in the end but Grant helped us to actually write out the script in Python.
#write a script that creates an army of cubes in a square formation
#i will need to use a 2 for loops to create identical cubes in rows and columns
#all that changes is the position
import maya.cmds
import math
radius=15
counter=0
angle=0
for counter in range(24):
angle=(counter*15)
angle_in_radians = angle / 180.0 * math.pi
x_position=((radius*(math.cos(angle_in_radians))))
z_position=((radius*(math.sin(angle_in_radians))))
maya.cmds.polyCube(w=0.75,h=2,d=0.75)
maya.cmds.xform(t=(x_position,1,z_position))
Python seems pretty simple but it could get a bit hazardous. All the indentations and things have to be done manually! It's like using TrueBasic again in high school =P
No comments:
Post a Comment