Paint Processing Textures in Maya

This is a work in progress. It lets you paint cool 2d animated textures in Maya using processing. On OpenProcessing.org there are tons of amazing sketches that could can be used to create textures in Maya, so I wanted an easy interface to bridge the two technologies. It’s also an excuse for me to code an asynchronous image loader using python threading. I learned a lot reading through Nathan Horne’s Subsonic client open-source project.

You can use pretty much any sketch you find to create textures, you just need to edit some java if you want it to interface with this tool. Download the tool and put the directories in the correct place. Then Download processing . Find and download a sketch from OpenProcessing.org or create your own. Open the sketch in the processing IDE and click the “export applet” button. Put the .java file that is created by the export button into the MayaProcessingJava folder. You need add/edit a couple lines in the java file. First, set the Global.filepath variable in the main fuction. It should look like this:

  static public void main(String args[]) {
	Global.filepath = args[0];
    PApplet.main(new String[] { "--bgcolor=#F0F0F0", "doodle_3" });
  }
 

Then find the saveFrame() function and change it to saveFrame(Global.filepath). If there is no saveFrame() function, create it at the end of the draw function. Now you need to download JDK so you can use javac to compile .java files. You also need to install the processing libraries in java so the .java will compile, which is easy. Just navigate to program files/processing/lib and copy all those files to program files\Java\jdk[whatever version]\jre\lib\ext. I don’t know much about java so it is entirely possible this is bad practice, but it worked for me. Once that is done, open command line, navigate to MayaProcessingJava, and execute “javac theJavaFile.java”. If javac doesnt show up, make sure to add jdk/bin to your PATH environment variables so it can be accessed in command line. Now the maya tool will recognize the .class file in the MayaProcessingJava directory, and it will be accessible for painting in Maya!

download the wip tool here