Graphics Pipeline Tool
This tool is four seperate files all written in Python. This was my first attempt at taking advantage of Python's ability to be object oriented, so each file is its own class and the Main.py brings them all together.
Main.py Here is the Main.py file which will show you each class being imported that is required for use for the full tool pipeline as well as a fairly extensive help portion to assist the user should he/she leave out any required information, or supply an invalid argument.
MayaBatch.py Here is the MayaBatch.py file which gives the user the ability to do any edits to their scene or render it through Maya's extensive command line interface. All of the edits done to the scene either before, or during rendering are done via MEL commands much like how most things are done within Maya, except here you just have to type them out. This one has a slightly more involved help portion as it is one of the more complext scripts in the tool.
MTOR.py This is the MTOR.py or the Renderman portion of the tool. This is a very powerful script letting the user render out an entire Maya scene with including motion blur and other camera or basic edits allowable through Renderman's command line (for a complete list of capabilities check out the Renderman Command Line reference in the documentation). This script also allows the user to simply generate any and all RIBs for the scene if they so choose instead of doing a full on render. When rendering the scene it doea also generate the RIBs for all aspects being rendered as well. Just like the others there is an extensive help portion to the script as it has a few required aspects in order to work properly.
ShakeComp.py To be honest this is one of my favorite aspects of this tool. Mostly because upon developing this tool I went into find out how powerful Shake's commandline version really is, I had never worked with it before so I had no clue. This portion simply composites two images together and outputs them in a variety of formats. The help documentation in this one isn't too complex as it basically only requires a background image, a foreground image and an image name to output to, but those are required.
Basic Use
Here is a basic way to use this tool, it can get much more complex but you also have much more control at that point, as one might expect.
Maya Use
The following line will set the lampShape's dropoff to 350 and save the file out and then render frames 1 through 5 with a motion blur setting of 0.5 from the Maya scene light2.mb. It also puts the images in the directory /home/images/
python Main.py -m -m '-command "setAttr "lampShape.dropoff" 350; file -f -save;" ' -r -f 1 -l 5 -b 0.5 -i /home/images light2.mb
Renderman Use
The following line will render five frames beginning with frame one (Renderman deals with frames as you pass it the first frame you want to render and the next value is how many frames you want to render), and put them in the directory /home/images/ and the Maya file that is being rendered is light2.mb
python Main.py -r -r -f 1 -l 5 -r -i /home/images light2.mb
Shake Use
The following line will composite the images myBackground.tif and myForground.tif into the final output image myCompositedImage.tif in NTSC resolution (720 X 486). It will be put in the current active directory the user is working from. The script allows the user to specify a resolution to render at, either NTSC or Widescreen, it then scales the images while witholding the original resolution constraints of the image so it doesn't looked squashed or streched.
python Main.py -s -t NTSC -d -b myBackground.tif -f myForeground.tif -o myCompositedImage.tif
All of these aspects of this tool can be used individually without even using or touching the other elements of the tool. So if the user just wanted to edit a Maya scene quickly, or pop off a few scenes from the Maya scene they can, or if the user needs to show how his/her current results look on top of the originally planned backplane they can.
I must say that currently the Renderman and Shake scripts are setup to work specifically for The Art Institute of California - San Francisco's Linux setup as they had slightly installed Shake and Renderman incorrectly so I had to change the path environment for each of those at each use. I am working on putting in an argument so the user can put in "AI" or "Other" so it will work on any platform where these programs are installed right. By installed right I mean so you can simply type "maya" or "mtor" in the Linux shell and get the program to work.
All Works ©2006 Kenneth Stojevich
|