-
Notifications
You must be signed in to change notification settings - Fork 18
2014f Day 4
Selecting and iterating over a group:
target = selected() for i in range(0,len(target)): py.select(target[i]) for j in range(0,106,6): currentTime(j) scale(4,4,4) setKeyframe()
First look at motion capture:
Brekel Kinect (free):
http://brekel.com/kinect-3d-scanner/
iPi Studio for Windows (30-day demo):
http://ipisoft.com/
Mac OpenNI installer: http://sensecast.com/files/Sensecast.and.Libs.Installer.v.0.02.dmg
Unity Kinect packages
...for MS SDK: https://www.assetstore.unity3d.com/en/#!/content/7747
...for OpenNI: https://www.assetstore.unity3d.com/en/#!/content/7225
...for OpenNI 2: https://www.assetstore.unity3d.com/en/#!/content/10693
PyMel API
Activate import/export formats by going to Window > Settings/Preferences > Plug-In Manager and choosing the formats you need. Especially important are:
objExport.bundle (OBJ files)
fbxmaya.bundle (FBX files)
If your manipulators get oddly sized (often, too huge), go to:
Window > Settings/Preferences > Preferences > Display > Manipulators
Set Global scale to 1.
FBX import tips
- Make sure your FBX exports from Maya have Animation and Bake Animation checked.
- You may need to correct scale when importing into Unity; select the FBX in the Project pane and change its scale value in the Inspector pane. Click Apply when you're done.
- Also in the Inspector pane, you can turn looping on for imported animations. Click both Loop and Loop pose.
Install new scripts in:
Mac:
/Users/YOUR USERNAME/Library/Preferences/Autodesk/YOUR MAYA VERSION/scripts/
Windows:
C:\Users\YOUR USERNAME\Documents\maya\YOUR MAYA VERSION\scripts\
**Python scripting in Maya**
1. **Windows > General Editors > Script Editor**
2. Make sure you're on the **Python** tab, not the Mel tab.
3. Run a Python script by clicking the blue play icon or pressing Ctrl-Enter.
4. Begin a session by importing the Python library. I recommend:
from pymel.core import *
5. You might also see examples importing one of Maya's two Python APIs into its own namespace, like:
import pymel.core as py
import maya.cmds as mc
6. Some other useful Python libraries:
from random import uniform as rnd
7. Here's an initial script to try:
for i in range(0,1000):
currentTime(1)
polyCube()
move(rnd(0,10),rnd(0,10),rnd(0,10))
setKeyframe()
currentTime(200)
move(rnd(0,10),rnd(0,10),rnd(0,10))
setKeyframe()
8. Remember that you can preview a really heavy scene with **Window > Playblast** instead of watching it in the viewport.9. Most Maya Python commands return an object. You can store that object in a variable and access it later:
bob = polyCube() select(bob) move(5,0,0)
You can practice in Processing, using the Python mode.
Basic Java Processing sketch:
void setup() {
size(640,480);
}
void draw() {
background(random(255));
if (mousePressed) {
fill(255,0,0);
} else {
fill(0,0,255);
}
for (int i=0; i<100; i++) {
ellipse(random(width),random(height),10,10);
}
}
Basic Python Processing sketch:
sW = 640;
def setup():
size(sW,480)
def draw():
background(random(255))
if (mousePressed):
fill(255,0,0)
else:
fill(0,0,255)
for i in range(0,100):
ellipse(random(width),random(height),10,10)
item category OS purpose link
iPi Studio Basic Edition--edu price software Win motion capture http://ipisoft.com/store/
Primesense Carmine 1.09 hardware Mac/Win/Linux motion capture http://www.faceshift.com/get-faceshift/
Zbrush--Studica discount software Mac/Win 3D modeling http://www.studica.com/ZBrush
ReconstructMe--retail price software Win 3D scanning http://shop.profactor.at/product_info.php?info=p3_reconstructmeqt-einzelplatzlizenz.html
Skanect--edu price software Mac/Win 3D scanning http://skanect.manctl.com/download/
Faceshift--edu price software Mac/Win face capture http://www.faceshift.com/get-faceshift/
Unity Pro--edu price software Mac/Win game engine https://store.unity3d.com/
PrioVR suit hardware Win motion capture http://priovr.com/
Bitmap2Material--edu price software Mac/Win material designer http://www.allegorithmic.com/buy
Blackmagic H.264 Pro USB2 hardware Mac/Win video capture http://www.bhphotovideo.com/c/product/686596-REG/Blackmagic_Design_VIDPROREC_H_264_PRO_Recorder.html
Blackmagic Ultrastudio 4K 2 Thunderbolt hardware Mac video capture http://www.bhphotovideo.com/c/product/1016029-REG/blackmagic_design_bdlkulsr4k2_ultrastudio_4k_thunderbolt_2.html
Makerbot Digitizer hardware Mac/Win/Linux 3D scanning https://store.makerbot.com/digitizer
AVPro Quicktime playback for Unity software Mac/Win video playback https://www.assetstore.unity3d.com/en/#!/content/2307
Marmoset Skyshop for Unity software Mac/Win HDR lighting https://www.assetstore.unity3d.com/en/#!/content/8880