I'm not Dead Yet!

by Nicholas Stevenson

Work has been pretty wild this last year or so, working on Infinite Warfare and Modern Warfare Remastered.  But aside from that, I have been volunteering my free time am working on short film named Trollbridge.  The web site explains it in much more depth, but basically, the story is an authorized offshoot involving one of the characters of the Discworld series.  The character of Cohen the Barbarian is a very famous character in a series of books created by late Terry Pratchett.  The film is a blend of both live action and digital, which we use to tell the story of Trollbridge.  For this film, I have done several animation sequences involving Mica the Troll, and am currently rigging another troll character named Scree.


The film is always looking for help, so if you have any skills such as Animation, Art, Modeling, Texturing, Compositing, FX, etc.  And have an interest in helping, send off an email and join the team!  The passion from the entire crew is just incredible, and I am very humbled to have the opportunity.  


As a neat aside, a frame from one of my animations is on the main page and is the banner for joining the team.  Very cool...  Again, please, consider helping!



Modo Python Series

by Nicholas Stevenson

About a year ago, I created a short series of videos that explain some of the basics of working with Python in Modo.  The videos ended up being much more broad, and don't deal directly with Modo.  The hope is to expand the series and show how to create some Modo specific tools and utilities, and eventually even PySide UIs.  If you have any comments or requests, please don't hesitate to let me know!  Below is a link to the collection and the first video of the series, which is the introduction.



What have I been up to?

by Nicholas Stevenson

It has been far too long since I posted anything of my personal undertakings, so I thought I'd post a render of a model that I have been working on.  The model is of an Israeli tank titled Merkava Mark IV.  The body of the tank really caught my eye and I thought it was an incredibly cool shape, very different from many of the boxy or classic looking tank designs.  My goal with this model is to use subd meshes exclusively.  I understand that most production assets are not restricted to this limitation, but I wanted this project to push my subd modeling skills, and I feel that it has done just that.  I also plan to pull the completed asset into Mari and tackle the texturing using its internal UDIM workflow and painting tools, and to ultimately finish the model by fully rigging it.  I chose a tank because I had never modeled, textured, or rigged anything as complex as a tank.  There are also many technical challenges involved in a tank, such as a very unique suspension system, treads, and the overall body motion being separate from its lower and upper half.  Having worked in games for many years, a fully articulating tank is far above and beyond what would be necessary for a typical game asset, there are far cheaper solutions, that are much easier on game engines.  So with this project, I wanted to create a film quality asset, at least that's my hope.  With luck I will post more updates over the year, and we'll see where the project goes!


Created using Modo, Mari, & Nuke Studio, by The Foundry

Remotely sending code to Maya from Wing

by Nicholas Stevenson

Note:  This is the second part of a series of posts regarding Wing IDE and Maya.  For the first post, please follow this link. Alternatively, look further down this page for the post titled 'Using Wing IDE with Maya'.

Before I continue, I would like to thank Eric Pavey for his work on expanding Wing, allowing you to remotely execute your code in Maya while working in Wing.  

I had the pleasure of working with Eric on Modern Warfare 3 and to say that he was a prolific technical animator wouldn't do him justice, he did an absolutely astounding amount of work on that project.

I later discovered that he had created this Python module that I was already using in Wing.

So, huge thanks to Eric Pavey.

Installing the Wing Module

The first step is to install Eric's Wing Module, I have remotely hosted the Python file: wingHotkeys.py

The original can be found on Eric's web site: http://mayamel.tiddlyspot.com/

After download this file, you will need to place it in a directory where Wing can find it.  Wing already provides a directory for custom scripts, but it can be a little difficult to find, particularly if your OS is hiding system directories.

Open Wing and from the top bar, choose Edit -> Preferences

Towards the bottom of the preference list, choose IDE Extension Scripting


In this section you can see Wing's primary location for housing custom scripts, as well as a place for adding your own.  

Place the downloaded module in to either Wing's current script directory, or point wing at the directory where you saved the script.

My provided version of the module is  a slightly modified version, though all of its original contents are still available.  The module basically takes your currently highlighted text in Wing, dumps it to a temporary file, and then triggers Maya to read in that text file line by line and execute it as either Python or Mel code.   

The creation of the socket connection will be the largest hurdle, since the OS and its network settings may block certain socket connections.  My home machine worked without hassle, while my work machine took much more persuasion.  

My modified version has an extra line or two which was necessary for my work machine to function properly.

There will be a troubleshooting section at the end of this post and I'll try to explain how you may need to modify this module to work with your current system.  But for now, there is more to be done!

Installing the Maya Module

The next step will be to provide Maya with the module that performs the task of reading in the temporary text file as Python or Mel text.  

Take this provided script (which is also available at Eric's web site): executeWingCode.py

Place this script inside your Maya script directory (Eg. C:\Users\username\Documents\maya\scripts\)

To ensure that Maya can find the module, try importing it inside Maya by using the python code

import executeWingCode

If Maya responds with an error, please see the previous blog post, particular the section about appending your sys.path with other directories that Maya may not be watching.

Modifying Wing's Hotkeys

Next, we need to bind a hotkey inside Wing that will execute our newly installed Module.  

Inside Wing, choose Edit -> Preferences, and on the left, under User Interface, choose Keyboard.

In the center right of the Keyboard section is where you can add custom key combinations to execute code.  In this example, I have bound Control + Return as my key combination for executing my selected text as Python code in Maya.


The code for the command comes from the wingHotkeys.py file that you placed in Wing's script directory.  You can also bind a combination to mel_to_maya to perform the same with Mel code.

Opening the Command port in Maya

Now that you have installed and bound the Wing module to a hotkey, as well as installed the script that Maya is going to use for executing the text file created by Wing, we now need to open up Maya Command Port.  Opening the command port is very similar to modifying your Firewall to allow in a connection from outside your network.  Maya will ignore all command port connections unless you specifically open one.

Take this code and bind it to a Maya Python shelf button.

cmds.commandPort(name="", echoOutput=True)

Take this code and bind it to another shelf button, this code will close the command port.  Occasionally the connection between Wing and Maya will break, closing the command port and re-opening it frequently fixes this.

cmds.commandPort(name="", close=True, echoOutput=True)


If you have followed all of the steps, You can hopefully execute your Wing code in Maya, allowing you to work entirely from inside Wing, without ever needing to use Maya's built in script editor.


First, lets go over a checklist and ensure that all assets are accounted for:

  • wingHotkeys.py : Is this located in a place where Wing can find it?

To test, when adding python_to_maya to a hotkey from inside Wing's Preferences -> Keyboard section, Wing should start to fill in the Command section as soon as you start typing python_to_maya.  This shows that Wing has scanned the file and added the functions to its list of available functions.

If Wing doesn't do this, double check the location of the file

  • executeWingCode.py : Is this located in a place where Maya can find it?

To test if Maya is able to find the executeWingCode module, use the following code while inside Maya.  If this fails, follow the directions in the previous blog post that explain how to add specific file paths to your python sys.path.

import executeWingCode
  • Did you open Com Port 6000 inside Maya?

If you are certain that Wing is able to find its module, you can actually monitor what Maya is returning to Wing when Wing attempts to connect through the command port.

In Wing, open up the Messages Tab, and switch the Show Messages option to Scripts

If you see sent plus a random number, this means that the wingHotkeys module is working and is able to connect to Maya.  If however, you see Send to Maya fail, Maya is likely rejecting the socket connection.


Connection refused...

If Maya is rejecting the connection, or if you are having another issue relates to sockets, there are several things that you can try, and all of them exist inside the wingHotkeys module.

Open up the wingHotkeys.py file that you saved in Wing's script directory.  

Useful Note:  If you have the file open in Wing, and make changes to it, Wing will reload the script after you save the file.  This is really helpful when trying various fixes.

Inside wingHotkeys.py, there are two important sections that you will need to look at.  The first section deals with creating the socket.


Try commenting out the current mSocket method and un-commenting one of the other two options further up.


Same with the mSocket.connect lines here, if you are having trouble, comment out the mSocket.connect currently being used, and un-comment out one of the other lines.

You will likely need to fight with both of these sections before you find a combination that will work.  The current setup provided in my hosted file works perfectly for both my Windows 7 machine at home, and my Windows 7 machine at work, though my work machine typically requires several Ctrl+Return entries before it makes a connection.

I hope this helps, and please let me know if you have any issues!

Thank you for reading!

Using Wing IDE with Maya

by Nicholas Stevenson

Hey Everyone,  I created this post because I have found that using an external IDE and Debugger with Maya to be one of the best investments I have ever made.  With this post, I hope to explain a lot of the technical details, and hopefully enough to get you up and running!

What is an IDE?

This question has been answered many times before, but to quickly summarize, an IDE is simply a programming environment for use in scripting and programming.  Maya’s script editor is a basic example of an IDE.  More full featured IDE tools, such as Wing IDE, fulfill all of the basic functions that Maya’s script editor offers, as well as incorporating many additional features.  

What is a Debugger?

A debugger is simply an extension to an IDE.  An IDE with a built in debugger allows you to not only code in a more friendly environment, but to also evaluate your code while it’s being executed, making larger scripts and programs worlds easier to create.

Getting Started with Wing

This section is going to cover how you can configure Wing to completely replace the need for the Script Editor in Maya.  Allowing you to use Wing as your default Python tool, debug your code, and execute your code remotely in Maya while inside Wing.

Note: Wingware provides a step by step, explaning many of these same points, but I am going to expand a bit beyond where their instructions leave off.  


Downloading and Installing Wing

The first step is to download Wing, visit their web site and download your appropriate version:


Copy Wing's Debug Module to Maya's Script Path

After installing Wing, take Wing's Python debugger module located here: C:\Program Files (x86)\Wing IDE 4.1\wingstub.py

and place it in a more appropriate location: (Eg. C:\Users\[your user name]\Documents\maya\scripts\)

Also, alter line 96 inside the wingstub.py file:

To explain, kEmbedded tells Wing if this specific python instance fires one and then ends itself, or if it's a persistent python environment.  In Maya's case, the environment doesn't close itself down after it is done executing a python asset.

kEmbedded = 0


kEmbedded = 1

Connecting Maya to Wing

Once back in Maya, create a shelf button containing this Python code:

import wingdbstub

Note: As long as you saved the wingdbstub.py file in to the \Documents\maya\scripts\ directory, Maya should be able to find the module.

If you chose a different directory, you will have to tell Maya's Python environment this new location. Python only looks in a limited number of places when looking for modules to load. The following code can be used to add an additional directory.

import sys

path_append = 'E:/Dropbox/Scripting/Maya'
if path_append not in sys.path: sys.path.append(path_append)

You can also create a python file named userSetup.py, that contains only this code, and place it inside you /Documents/Maya/Scripts/ directory, and this path will be added every time you start Maya.  Maya will execute and userSetup.py file that it finds in its script directories, so it's a great way to permanently add a path to Maya's Python Environment.

Setting up Wing for the connection

Once you have added your shelf code, launch Wing.  Once inside Wing, in the very bottom left corner, you should see a small bug icon.  Left click on it and ensure that 'Enable Passive Listen' is checked.


Run your shelf button

If you have everything configured correctly, you should hopefully see your Wing IDE Debugger icon turn a lovely green.


Once you have established this connection, Wing can now be used to debug your own scripts and modules, and in particular, intercept any errors Maya may encounter while running Python code.  This last point is incredibly useful when tracking down errors in your code.

This is pretty much it, in my next post, I'll go over how to remotely send commands from Wing in to Maya.  

I use this program all day, every day, and it is a great application to use with Maya.

Quick Update!

by Nicholas Stevenson

I apologize for being so quiet as of late,  I have been working quite a bit on a product visualization scene.  It involves some nicely lit high res shots, as well as animations for how the product functions.  


It's really coming along, but I can't post anything just yet.  But, that's what has taken me away from posting my mini projects!


by Nicholas Stevenson

Hey everyone, Since the projects keep starting and ending before they're finished, I'm going to start posting a bunch of 'work in progress' pieces that I may or may not finish.







Project Valkyrie:



These models were created for the Valkyrie Project, a fan based project dedicated to the 1980s sci-fi animated television show Robotech.

the art direction was to create a blend of modern high tech and simplistic anime style.

The reference images used are available here:

Project Valkyrie

Missile Asset Sub Section





by Nicholas Stevenson

The curse of being an artist is having a short attention span.  If you don't finish your project in a month or two... you drift in to something else. As fate would have it, I have started playing around with the Unreal Editor.  It has a really nice lighting engine, and features a fairly painless work flow for bringing outside assets in to the engine.  IE, building models in Modo and pulling them in to Unreal. I will be posting my creations to my site, and I will eventually start a photo gallery to display them once they are complete. 


My first model that I created for a level I'm cooking up, is an old dusty cabinet.  It's still a bit heavy on the poly count, so it will be trimmed down eventually.


My second model is a work in progress, it's a wall sconce.  The model has prelim textures, but I have everything hooked up in Unreal so I can see the final look as I paint it.



More updates soon

The Tomb

by Nicholas Stevenson

     Hey everyone, this is a quick update as to what I am working on. My original 3d tomb model was done using 3d Studio Max about 4 years ago. Since the scene itself is relatively simplistic regarding modeling and lighting, I decided to re-do this scene using a new package I have been taken by, named Modo. I am curious to see just how different this final scene will appear, now that I know so much more about rendering, lighting, camera settings, etc. Should be fun!


Here's a very early look at the modeling progress, nothing terribly spectacular yet, just a setup that mimics the original camera angel of my tomb illustration.