Posts

Showing posts from October, 2013

Maya Exporter: Tabs and Tools!

Image
I've been chipping away at my Maya Exporter and have a few Photoshop functions tied into it now, along side the original exporter functionality. Behind the scenes the Photoshop commands are built on Standard modules, using Subprocess and some string manipulation in order to get JavaScript commands to the Photoshop application. As the tool has expanded beyond it's initial export-only functionality, there has been a decent amount of clean up and re-factoring behind the scenes to make sure that it doesn't just turn into a mega-script. Maya-side functions and Photoshop functions have been split into separate classes and files from the GUI, which has made keeping track of the code a lot easier. The GUI is built using the Pyside QT Libraries, which comes standard with Maya 2014. Next on the list, adding the option to load different project environments.

Python Photoshop Automation without win32com- The Example

Image
So here is a working example of what I was talking about in my last blog post- making Photoshop automation possible without needing to use the win32com module. This specific example is not cross-platform compatible. It relies on getting the Photoshop application through it's registry entry, but the subprocess module is cross platform so it shouldn't be too hard to hammer this into a shape that can be used on Mac and PC. Or just Mac. Or whatever. Essentially there is no real magic going on here, just lots of string manipulation behind the scenes. Like I said in my last post, the biggest hole in this right now is the lack of feedback from Photoshop, but that's something I'm looking into when I get a few spare minutes here and there. Here is the example. When you run it, you should come up with something that looks like this: What an Amazing document.  And the code! This is a particularly long snippet. Hang in there! Essentially when the commands are called, like add_new_...

Python Photoshop Automation without win32com.

Clunky but kinda fun, its possible to automate Photoshop using Javascript files passed as arguments to the subprocess.  Although this essentially means you have to write your script in two languages (PS's native JS and Python for pipeline) the practical aspect of this is that it allows scripts to be written that do not require people to have the win32com/comtypes modules installed, and paves the way for cross platform scripts that aren't tied to windows only modules.  I've had some success with creating a dynamic JavaScript builder that wraps Python functions around Photoshop's native Javascript commands. When the list of commands is executed it is compiled into a jsx file and then passed on to the Photoshop subprocess as an argument. The only short coming right now is obtaining the output from Photoshop and making it into a two-way street. I have some ideas on how to do this, and will update with the solution I end up using. 

Zbrush Speedsculpt: Cup

Image
I didn't choose this theme this week, but it was a great chance to abuse the radial symmetry brush for my own nefarious cup-theme related purposes. This was a true speed sculpt and was completed under the hour. Yes. Technically a goblet is still a cup. 

Model Monkey: A Maya Exporter

Image
When I started on the project I have been working on for the last few months, it lacked any kind of automation or pipeline tools for the Art department. There was no kind of convention in the names, and no kind of structure to the project. It was a nightmare! Did I mention the pipeline had artists working on two different platforms? Compensating within the tools for the different folder structures on Mac and PC computers also became a concern, although it did not end up being as much of a problem as I thought it would be. From day one it was a goal of mine to introduce naming conventions, and restructure the project to be more pipeline friendly. It was a crazy-big job, but now its starting to pay off with some art tools. To address the lack of exporting tools I wrote a Maya exporter that takes advantage of the new naming conventions, predictable folder structure and Python's awesome ability to manipulate strings. Behind the scenes it has a dictionary that matches the scene file...

ZBrush Speed Sculpt: "Worried"

Image
I was meant to do this yesterday, but I have been spending most of my time writing an export script for our project. I was able to nab some time this morning before work to do a quick speed sculpt for the "Worried" theme.

ZBrush Speedsculpt: Blunderbuss!

Image
The theme for this week was 'firepower' so I went with a Blunderbuss... Note my hour was up before I could complete the flintlock mechanism... so this thing is pretty harmless. So much for firepower! Need more flintlock thingy-mah-bobs!

3d Print- Wagon

Image
Another 3d Print! This time the results not *exactly* what I was hoping for.  This model is created using polished fine Fine Polyamide (Nylon), the same as my other prints but with an extra step- mechanical polishing.  It was this extra step where things went wrong- the model is put into a little container with a large quantity of smaller stones, and vibrated to smooth the surface using mechanical abrasion. Unfortunately this process also takes a significant amount of surface material away, resulting in the thinner parts of the model either snapping or disintegrating all together.  Although the quality on the majority of the model was pretty good some of the details on the front of the model were destroyed. The spokes on the wheels were also completely compromised. Apart from that, Its still an awesome looking model... might try fixing it with some putty! Note the wearing down of the thinner elements of the model. Without the polish, these would have been pretty sturdy....