Due Dec 13th:
lit and rendered or screen cast of script in action
Mark: IK to FK switch
Dane: Grenade explosion
Casey: The coolest firework ever
April: Grand finale fireworks
Sierra: Lava flow out of a tube onto the floor
Wednesday, December 5, 2012
Python beginings
Show your homework.
Use the powers of the internet to help you:
Create a python script that makes 20+ spheres in a loop and place them randomly around your scene.
Look up (google) how to move/rotate/scale things with python in Maya and copy someone else's code tweak it to get your own altered results.
-------------------------------------
What does this script do?
lightsInScene = cmds.ls(type='light')
percentage = 1.0
# If there are no lights in the scene, there is no point running this script
if not lightsInScene:
raise RuntimeError, 'There are no lights in the scene!'
# Loop through each light
for light in lightsInScene:
# The getAttr command is used to get attribute values of a node
currentIntensity = cmds.getAttr('%s.intensity' % light)
# Calculate a new intensity
newIntensity = currentIntensity * percentage
# Change the lights intensity to the new intensity
cmds.setAttr('%s.intensity' % light, newIntensity)
# Report to the user what we just did
print 'Changed the intensity of light %s from %.3f to %.3f' % (light, currentIntensity, newIntensity)
Change this script so it will set all lights to the desired exact intensity.
Just like the Homework:
import maya.cmds as mc
from random import uniform as rand # import python's random.uniform module and give it a nickname
for i in range(20): # create 20 of these
mc.polySphere(radius=rand(0.2,1)) # create a sphere with random radius
mc.move(rand(-5,5),rand(-5,5), rand(-5,5)) # move to a random position within a 10x10x10 cube
Change this so the sphere are dispersed across a larger area and more variety in radius (between 1 and 20).
Final Assignment
Each student will choose a project which involves either scripting(mel/python) or fluids or dynamics of some sort. The concept will be extremely short but developed to completion, so it could appear on your reel.
For example: If you want to make a Python or Mel tool create a working script/UI/etc and screen cast yourself demonstrating how your script works.
For example: If you want to create a bottle rocket launching see the project through to render and show break down of what you created.
You have 1 hour to inform the Instructor of what you want to deliver.
Use the powers of the internet to help you:
Create a python script that makes 20+ spheres in a loop and place them randomly around your scene.
Look up (google) how to move/rotate/scale things with python in Maya and copy someone else's code tweak it to get your own altered results.
-------------------------------------
What does this script do?
lightsInScene = cmds.ls(type='light')
percentage = 1.0
# If there are no lights in the scene, there is no point running this script
if not lightsInScene:
raise RuntimeError, 'There are no lights in the scene!'
# Loop through each light
for light in lightsInScene:
# The getAttr command is used to get attribute values of a node
currentIntensity = cmds.getAttr('%s.intensity' % light)
# Calculate a new intensity
newIntensity = currentIntensity * percentage
# Change the lights intensity to the new intensity
cmds.setAttr('%s.intensity' % light, newIntensity)
# Report to the user what we just did
print 'Changed the intensity of light %s from %.3f to %.3f' % (light, currentIntensity, newIntensity)
Change this script so it will set all lights to the desired exact intensity.
Just like the Homework:
import maya.cmds as mc
from random import uniform as rand # import python's random.uniform module and give it a nickname
for i in range(20): # create 20 of these
mc.polySphere(radius=rand(0.2,1)) # create a sphere with random radius
mc.move(rand(-5,5),rand(-5,5), rand(-5,5)) # move to a random position within a 10x10x10 cube
Change this so the sphere are dispersed across a larger area and more variety in radius (between 1 and 20).
Final Assignment
Each student will choose a project which involves either scripting(mel/python) or fluids or dynamics of some sort. The concept will be extremely short but developed to completion, so it could appear on your reel.
For example: If you want to make a Python or Mel tool create a working script/UI/etc and screen cast yourself demonstrating how your script works.
For example: If you want to create a bottle rocket launching see the project through to render and show break down of what you created.
You have 1 hour to inform the Instructor of what you want to deliver.
Monday, December 3, 2012
Python in Maya
To Begin we need the right tools:
First, install the same version of Python on your machine as is being used inside of Maya.
To find out what version you are running go to your Python Tab and execute:
import sys
print sys.version
What version are you running?
Go here to download the correct version:
http://www.python.org/download/releases/
We also need to install
Ipython:
pyreadline:
and
Let's Create some items
mc.sphere()
mc.spaceLocator()
mc.camera()
mc.polyCube()
Select objects of different types
mc.ls(type='mesh')
mc.ls(type='geometryShape')
Put those items in a list
shapes = mc.ls(type='geometryShape')
print shapes[]
print shapes[0]
BREAK-----------------------------
self teaching...
----------------------------------------
Let's install Eclipse plugins
after launching Eclipse:
Help-> "pydev - http://pydev.org/updates/" Add and step through installing a Python Dev environment
Homework:
Use the powers of the internet to help you:
Create a python script that makes 20+ spheres in a loop and place them randomly around your scene.
Look up (google) how to move/rotate/scale things with python in Maya and copy someone else's code tweak it to get your own altered results.
First, install the same version of Python on your machine as is being used inside of Maya.
To find out what version you are running go to your Python Tab and execute:
import sys
print sys.version
What version are you running?
Go here to download the correct version:
http://www.python.org/download/releases/
We also need to install
Ipython:
and
numpy
http://www.scipy.org/Download
Download Eclipse Classic from:
http://www.eclipse.org/downloads/?osType=win32
Show ipython inside a command prompt
import numpy
use tab complete to find:
numpy.random.sample?
Where can we execute python in Maya?
from the command line of Maya
create sphere
create polyCube
Script Editor:
create new tabs
show "quick help" and call documentation
New Scene, use import maya.cmds
import maya.cmds
Explain modules in Python, think about Photoshop, or booting your PC
Ways to execute import maya.cmds?
Use Enter by the num pad, or right-click marking menu execute, or "play" button
next
import maya.cmds
dir()
dir(maya)
dir(maya.cmds)
dir(maya.cmds.CreatePolygonSphere)
How many commands are inside of maya.cmds?
print (len(dir(maya.cmds)))
List what is in my scene:
maya.cmds.ls()
maya.cmds.ls(assemblies=True)
Create an Alias for maya.cmds
import maya.cmds as mc
Show ipython inside a command prompt
import numpy
use tab complete to find:
numpy.random.sample?
Where can we execute python in Maya?
from the command line of Maya
create sphere
create polyCube
Script Editor:
create new tabs
show "quick help" and call documentation
New Scene, use import maya.cmds
import maya.cmds
Explain modules in Python, think about Photoshop, or booting your PC
Ways to execute import maya.cmds?
Use Enter by the num pad, or right-click marking menu execute, or "play" button
next
import maya.cmds
dir()
dir(maya)
dir(maya.cmds)
dir(maya.cmds.CreatePolygonSphere)
How many commands are inside of maya.cmds?
print (len(dir(maya.cmds)))
List what is in my scene:
maya.cmds.ls()
maya.cmds.ls(assemblies=True)
Create an Alias for maya.cmds
import maya.cmds as mc
Let's Create some items
mc.sphere()
mc.spaceLocator()
mc.camera()
mc.polyCube()
Select objects of different types
mc.ls(type='mesh')
mc.ls(type='geometryShape')
Put those items in a list
shapes = mc.ls(type='geometryShape')
print shapes[]
print shapes[0]
BREAK-----------------------------
self teaching...
----------------------------------------
after launching Eclipse:
Homework:
Use the powers of the internet to help you:
Create a python script that makes 20+ spheres in a loop and place them randomly around your scene.
Look up (google) how to move/rotate/scale things with python in Maya and copy someone else's code tweak it to get your own altered results.
Monday, November 26, 2012
Monday, November 19, 2012
Only HW due Wed is Flamethrower
Flamethrower is Due by Wed midnight, email me the playblast or animation you have posted on youtube.
Wed night class is a walk.
Wed night class is a walk.
Particle Tutorial
Last Chance to submit your slag movie.
In Class tonight we will step through Fluids via Gnomon.
http://aii.gnomonlibrary.com.ai.libproxy.edmc.edu/training/tutorial/370
In Class tonight we will step through Fluids via Gnomon.
http://aii.gnomonlibrary.com.ai.libproxy.edmc.edu/training/tutorial/370
Wednesday, November 14, 2012
Balloon Homework
Homework Due next class:
Last chance to turn in your slag movie!
a playblast and show me your Maya scene of your animated Balloon popping.
Last chance to turn in your slag movie!
a playblast and show me your Maya scene of your animated Balloon popping.
Monday, November 12, 2012
11/12/2012
Turn in your movie!
=========================
Instructor Share coding experience:
Python:
mkmovie
remote animators in production tool
submission plugins tool (AE to RR)
Mel:
select and render specific geo with the rest a hold out (background shader)
fairy dust
What is MEL?
Maya Embedded Language = MEL
Now most scripting is done in pyMel
MEL is what is written to a .ma file.
Solve a simple problem:
We want a light to flicker
How do we do that?
light1.intensity = noise(time)*0.1+1.6;
How do we make a 1x1 box? sphere? with MEL?
Syntax, ':' <object>.<attribute>
What does the mod operator do?
MEL:
What is a variable? why do we need them?
strings
int
float
Declare Var:
string $myName = "<myName>";
int $myAge = <age>
float $myHeight = <hight in inches>
Declare Array:
string $drawer[];
$drawer[0] = ?
$drawer[1] = ?
print $drawer;
string $allInScene[] = `ls`;
string $onlySelected[] = `ls -sl`;
Rand:
rand(-300,500);
Key all your cubes
For Loop:
string $objects[] = `ls -sl`;
print $objects;
for ($singleObj in $objects)
{
float $rx = rand(-30-30);
float $ry = rand(-30-30);
float $rz = rand(-30-30);
move -a $rx $ry $rz $singleObj;
}
move forward in time: key all your cubes
Flags:
polyCube -w 5 -h 2 -d 1 -sx 1 -sy 1 -sz 1 -ax 010 -ch 1;
Show:
- Create a shelf button from the Script Editor
Class: Model a stone
How to Execute others MEL scripts
Download rockGen.mel
source rockGen File, launch rockGen
Wednesday, November 7, 2012
Wednesday, October 31, 2012
Happy Halloween!
Work on rendering your breakdown of the slag project.
Show your passes and particles on its own layer.
breakdown example:
http://www.youtube.com/watch?v=j4tXik2pVtk
Homework:
Show your passes and particles on its own layer.
breakdown example:
http://www.youtube.com/watch?v=j4tXik2pVtk
Homework:
- Finish rendering frames and bring you passes into AE so we can comp starting next class.
- Artists Guide to MEL
http://www.digitaltutors.com/11/training.php?pid=3163
Do #1-11
Wednesday, October 24, 2012
Continue and submit scene to the farm, layers and passes
Goal for today: Submit your scene to the farm
Instructor to cover render layers and render passes
Instructor to cover render layers and render passes
Wednesday, October 17, 2012
Monday, October 15, 2012
Wednesday, October 10, 2012
Monday, October 8, 2012
Turn in Assignment
Show your 3 playblasts to the class
Next dynamics: (was supposed to be HW but is now your in class work)
Lessons 1-6 and 9-12 (total time less than an hour of tutorials)
http://www.digitaltutors.com/11/training.php?vid=7863
Next dynamics: (was supposed to be HW but is now your in class work)
Lessons 1-6 and 9-12 (total time less than an hour of tutorials)
http://www.digitaltutors.com/11/training.php?vid=7863
Thursday, August 23, 2012
Submit your movie, more MEL
Movie:
Submit your movie showing your layers and the name of the passes with transitions.
MEL:
Explain last weeks first, % ...
What is a variable? why do we need them?
strings
int
float
Declare Var:
string $myName = "<myName>";
int $myAge = <age>
float $myHeight = <hight in inches>
Declare Array:
string $drawer[];
$drawer[0] = ?
$drawer[1] = ?
print $drawer;
string $allInScene[] = `ls`;
string $onlySelected[] = `ls -sl`;
Rand:
rand(-300,500);
Key all your cubes
For Loop:
string $objects = `ls -sl`;
for ($singleObj in $objects)
{
print "\n"
print $singleObj;
}
or
{
float $rx = rand(-30-30);
float $ry = rand(-30-30);
float $rz = rand(-30-30);
move -a $rx $ry $rz $singleObj;
}
move forward in time: key all your cubes
Flags:
polyCube -w 5 -h 2 -d 1 -sx 1 -sy 1 -sz 1 -ax 010 -ch 1;
Show:
Submit your movie showing your layers and the name of the passes with transitions.
MEL:
Explain last weeks first, % ...
What is a variable? why do we need them?
strings
int
float
Declare Var:
string $myName = "<myName>";
int $myAge = <age>
float $myHeight = <hight in inches>
Declare Array:
string $drawer[];
$drawer[0] = ?
$drawer[1] = ?
print $drawer;
string $allInScene[] = `ls`;
string $onlySelected[] = `ls -sl`;
Rand:
rand(-300,500);
Key all your cubes
For Loop:
string $objects = `ls -sl`;
for ($singleObj in $objects)
{
print "\n"
print $singleObj;
}
or
{
float $rx = rand(-30-30);
float $ry = rand(-30-30);
float $rz = rand(-30-30);
move -a $rx $ry $rz $singleObj;
}
move forward in time: key all your cubes
Flags:
polyCube -w 5 -h 2 -d 1 -sx 1 -sy 1 -sz 1 -ax 010 -ch 1;
Show:
- The Command Prompt
- Create a shelf button from the Script Editor
Class: Model a stone
How to Execute others MEL scripts
Download rockGen.mel
source rockGen File, launch rockGen
Monday, July 9, 2012
Assignment #1
Assignment #1
Bring to class, on Thursday night, camera reference of your 3 favorite moving camera shots along with previz Geo.
Example of what we are making:
Bring to class, on Thursday night, camera reference of your 3 favorite moving camera shots along with previz Geo.
Example of what we are making:
Subscribe to:
Posts (Atom)