Tuesday, January 22, 2013

Maya playblasts on windows!

Maya 64bit Windows appears to be the only version without quicktime support, which to me means crappy codecs, and/or huge filesizes (and more than likely both)

To combat this, I made a little script to compress your playblasts with x264.

You're going to need to save the x264.exe to your C:/ root directory.
Download x264 here!

Then just run this script:

 # Runs the PB Script and saves the file  
 from pymel.core import *  
 from pymel.util.path import path  
 import os  
 import subprocess  
 filename = path(str(fileDialog2(ff='*.mp4')[0]))  
 nicename = filename.strip('.mp4')  
      blast = playblast(fmt='avi', v=0, os=1, wh=[1080,720], p=100, filename=nicename, fo=1)  
      print 'Playblast interrupted; continuing compression'  
      os.system('C:\\x264.exe -o {nn}.mp4 {nn}.avi'.format(nn=nicename))  
      player = subprocess.Popen(filename, shell=1)  

You can edit the playblast line to suit your needs, also. (resolution, etc)
Try everything out and let me know how it goes!

Monday, January 14, 2013

Adding lights into the DX11 Shaders for Maya

I made a shader that added support for 5 lights instead of the default 3.
It took me about 5 minutes just poking around the default UberShader to figure out how to do it.

Feel free to download the shader I made, this one has support for 5 lights and I'll probably make another shader with support for more lights in the future.

Download MayaUberShader5Lights.fx