Adverti horiz upsell
Rendering several maya scenes and cameras
Rendering several maya scenes and cameras
andrewkerr, added 2006-04-12 11:55:36 UTC 59,151 views  Rating:
(6 ratings)
Page 1 of 1

THE PROBLEM:
You need your animation rendered by the morning. You have 3 scenes to render each scene is saved in a different maya file and one of the scenes you have two cameras, you need both of them rendered and you are a tired artist not a programmer.

THE SOLUTION:
Open notepad
type "render my_scene.mb"
Save as click_me.bat or whatever you want to call it but it must have the .bat extention ( in the note-pad file extension drop-down it only offers .txt




Double click the .bat file you have just made and Maya renders your scene as you set it up in your render globals. Maya doesn't even have to be open and it is faster than if you rendered it from inside maya.

So much for the scary "command-line"

Now that we have that running...lets render from three different maya files...

save as click_me.bat in your scenes folder....and they get rendered one after the other as set up in the render globals in your scene file...nice and simple...

You can also choose which camera you want to render from and which frames you want rendered, so lets say you have two cameras in tank_firing.mb camera1 shows the tank turning and firing from frames 25 - 45 but then you want your close up camera ( which you renamed barrel_cam in maya ) to show the action from frames 35 -45



-s is the abbreviation for start and -e the abbreviation for end, -cam tells maya which camera to render

The only problem here is that the images have the same name and are going into the same folder....set up like this it will write barrel_cam images over the camera1 images, we need to rename the images or render them in differnet folders; to render them into different folders type in -rd and then just copy and paste the path from explorer, remember to create the folders, if they do not exist they will not be created automatically

click for larger version

Alternitively you can rename the images, using -im and then just call the images whatever makes sense, don't add a .tga or .jpg ( as in firing.tga ) or it will still add the suffix from the render globals and call the image firing.tga.tga



Image sizes, image types, in fact all the settings from render globals can be written into your batch render file and if you want to write more complicated render instructions you can use the list below, but only make things as complicated as they need to be below is some of the commands and you can find more in maya help files...

remember to do a quick check that everything is working before get your well earned sleep and let your computer do the rest of the work...

Happy rendering
andrew kerr
andrew@kerr.name


Below is a command list I came across in

https://web.cs.swarthmore.edu/~finney/cs91/render-usage.txt
Usage: Render
     where  is a Maya ASCII or a Maya Binary file.

startFrame -s starting frame for an animation sequence
endFrame -e end frame for an animation sequence
byFrame -b by frame (or step)
for an animation sequence
startExtension -se starting number for the output image
frame file name extensions
byExtension -be by extension (or step) for the output
image frame file name extension
extensionPadding -pad number of digits in the output image
frame file name extension

project -proj project directory to use
renderDirectory -rd directory in which to store image file

image -im image file output name (identical to -p)
pix -p image file output name (identical to -im)
mayaExtension -me append maya file name to image name
if true
mayaFormat -mf append image file format to image name
if true

cameraOverride -cam all subsequent -im -p -ar -sa flags
apply only to
(specifying '-cam ' enables
rendering for that camera). If '-cam
' is on the command line,
then only the camera(s) specified on the
command line will be rendered.
gamma -g gamma value
ignoreFilmGate -ifg use the film gate for rendering if false
imageHeight -ih height of image in pixels
imageWidth -iw width of image in pixels
deviceAspectRatio -ard device aspect ratio for the rendered image
aspectRatio -ar aspect ratio for the film aperture
maximumMemory -mm renderer maximum memory use
(in Megabytes)
motionBlur -mb motion blur on/off
motionBlurByFrame -mbf motion blur by frame
shutterAngle -sa shutter angle for motion blur (1-360)
motionBlur2D -mb2d motion blur 2D on/off
blurLength -bll 2D motion blur blur length
blurSharpness -bls 2D motion blur blur sharpness
smoothValue -smv 2D motoin blur smooth value
smoothColor -smc 2D motion blur smooth color on/off
keepMotionVector -kmv keep motion vector for 2D motion blur on/off

useFileCache -uf use the tessellation file cache
optimizeInstances -oi dynamically detects similarly
tessellated surfaces
reuseTessellations -rut reuse render geometry to
generate depth maps
useDisplacementBbox -udb use the displacement bounding box scale to
optimize displacement-map performance
enableDepthMaps -edm enable depth map usage
enableRayTrace -ert enable ray tracing
reflections -rfl maximum ray-tracing reflection level
refractions -rfr maximum ray-tracing refraction level
renderLayers -rl render each layer separately
renderPasses -rp render passes separately
renderSubdirs -rs render layer output placed in subdirectories
shadowLevel -sl maximum ray-tracing shadow ray depth
edgeAntiAliasing -eaa The anti-aliasing quality of EAS
(Abuffer). One of:
highest high medium low
useFilter -ufil if true, use the multi-pixel filtering
otherwise use single pixel filtering.
pixelFilterType -pft when useFilter is true, identifies one
of the following filters:
box, triangle, gaussian,
quadraticbspline, plugin
shadingSamples -ss global number of shading samples
per surface in a pixel
maxShadingSamples -mss maximum number of adaptive shading
samples per surface in a pixel
visibilitySamples -mvs number of motion blur visibility samples
maxVisibilitySamples -mvm maximum number of motion blur
visibility samples
volumeSamples -vs global number of volume shading samples
particleSamples -pss number of particle visibility samples
redThreshold -rct red channel contrast threshold
greenThreshold -gct green channel contrast threshold
blueThreshold -bct blue channel contrast threshold
coverageThreshold -cct pixel coverage contrast threshold
(default is 1.0/8.0)

outputFormat -of output image file format. One of: si
soft softimage, gif, rla wave
wavefront, tiff tif, tiff16 tif16,
sgi rgb, sgi16 rgb16, alias als pix,
iff tdi explore maya, jpeg jpg,
eps, maya16 iff16, cineon cin fido,
qtl quantel, tga targa, bmp, sgimv
mv, qt Quicktime QuickTime, AVI avi
shadowPass -sp generate shadow depth maps only
abortOnMissingTexture -amt abort renderer when encountered missing texture
dontReplaceRendering -rep do not replace the rendered image if it already exists
verbose -verbose perform the render verbosely if on
iprFile -ipr create an IPR file
xResolution -x set X resolution of the final image
yResolution -y set Y resolution of the final image

xLeft -xl set X sub-region left pixel boundary
of the final image
xRight -xr set X sub-region right pixel boundary
of the final image
yLow -yl set Y sub-region low pixel boundary
of the final image
yHigh -yh set Y sub-region high pixel boundary
of the final image

displayLayer -l one or more displayLayer names to render

numberOfProcessors -n number of processors to use. 0 indicates
use all available.

tileWidth -tw force the width of the tiles. Valid values
are between 16 and 256.
tileHeight -th force the height of the tiles. Valid values
are between 16 and 256.

-cont allow renderer to continue when it hits errors

-keepPreImage keep the renderings prior to post-process around

*** Remember to place a space between option flags and their arguments. ***
Any boolean flag will take on, yes, true, or 1, as TRUE,
and off, no, false, or 0 as FALSE.

e.g. Render -x 512 -y 512 -cam persp -im test -of sgi -mb on -sa 180 file.ma