Skip to main content
 

scriptcut01

Since joining the team here at Morehead, I have been blown away by the potential of “The Dome” as a medium for presenting content. With the rise in popularity of creating spherical content for VR and Immersive Video, I think there will be more and more variety in the type of content that is being created for domes.

On the technical side, we have been evolving our pipeline for 3D production to allow us to move away from Mental Ray for Maya  and adopt V-Ray as our primary renderer. (Stay tuned for some more info on that…it’s an amazing tool!) We have also added a few plugins and scripts to our tool-box, most notably Peter Shipkov’s SOuP (www.soup-dev.com) and Open VDB Toolkit (http://www.openvdb.org). With all of these changes and additions, we needed to come up with a way to easily manage plugin installs across our user machines and the render farm. The ideal solution for us was one that allowed us to install plugins and scripts to a single network location that all machines pointed to. The standard approach for single users is to just install what you need on your local machine. But this can quickly become a mess when more than one artist is working on a project. Of course having a render farm makes things even more complicated. Unfortunately, many places just go without many useful tools or updates because the install/update process can be such a time-sink. But from my previous experience I know it doesn’t need to be a big deal to add and update tools.

I know this post may not seem like a thrilling artistic explosion. But the value of a bit of laying a bit of pipeline can allow you to work much more efficiently. Give it a try, even if you have no experience with this kind of tinkering. You’ll be amazed how easy it is.

Environmental Changes:

I am far from a systems master, but had enough familiarity with the environment variables that Maya uses to look into a solution. The main focus of my research was the Maya.env file that exists here:

 C:\Users\<user>\Documents\maya\2015-x64

Maya looks at this file when it loads and this can be used to define additional paths for scripts and plugins. By default, this file is empty, hiding how useful it can be.
But a quick look at the Maya help documentation outlines the way that this file can be used to create a more flexible setup for your work.
Autodesk Documentation for Maya.env

Here is a little breakdown of some basic variables in Windows formatting:

SHARED_MAYA_DIR = \\<<network location>>\Maya_Content - This is a user defined base directory for additional maya content.
You will see in the next entries how this is used

MAYA_SCRIPT_PATH = %SHARED_MAYA_DIR%\scripts;  - Here we see the %SHARED_MAYA_DIR% variable defined in the first line is used
as the root for the scripts directory it contains. Doing this allows all the paths to be updated by changing a single variable

MAYA_PLUG_IN_PATH = %SHARED_MAYA_DIR%\plugins; - This is another standard variable that Maya uses to browse for plugins.
Using the same base directory, we can store them in a common location to easily update for all users.

TMPDIR = D:\tempspace  - You can even define where Maya saves crash files so that they are easier to access

There are many different standard environment variables that Maya can use to load different content.

Here is the root list link: All Maya Environment Variables
The variables that we’ve been focusing on are the ones in the File Path Variables section.
But there are tons of useful paths that are worth a look.

So here is our directory structure we built on a network location that our workstations and farm machines have access to:

pathexample

And here is the content of the Maya.env file that we assembled to set all the paths to give Maya full access to this content: (The //**** lines are just comments for organization.)

// ROOT PATH ******************************************
COMMON_MAYA_DIR=\\mp-prod[][][]\PluginsScripts\Maya

// OPENVBD ********************************************
VDB_ROOT=%COMMON_MAYA_DIR%\OpenVDB

// SOUP ***********************************************
SOUP_ROOT=%COMMON_MAYA_DIR%\SOUP

// Core Maya ********************************************
MAYA_PLUG_IN_PATH=%COMMON_MAYA_DIR%\plug-ins;%VDB_ROOT%\plug-ins;%SOUP_ROOT%
MAYA_SHELF_PATH=%VDB_ROOT%\shelves;%SOUP_ROOT%
MAYA_SCRIPT_PATH=%COMMON_MAYA_DIR%\scripts;%VDB_ROOT%\scripts
XBMLANGPATH=%COMMON_MAYA_DIR%\icons;%VDB_ROOT%\icons;%SOUP_ROOT%\icons
MAYA_CUSTOM_TEMPLATE_PATH=%SOUP_ROOT%\viewTemplates
PYTHONPATH=%MAYA_SCRIPT_PATH%;%COMMON_MAYA_DIR%\python;
PATH=%VBD_ROOT%\Arnold\bin

With this in place, we are able to update scripts and plugins as needed while staying out of the standard Maya directories. We can even update our Maya installs and not need to re-install any scripts or plugins if they are compatible with the Maya version. The only file that needs to be moved around is the Maya.env file.

Spreading the Word:

This brings us to the final piece of the puzzle. Managing a master Maya.env file and be able to update this file on multiple computers. I wanted to be able to update a single master Maya.env  file and have it instantly updated on all user computers and the render farm. This would minimize the workload for the systems team and allow us to add and edit our tools as we needed. I came from working in a Linux production environment where we used something called a symbolic link or “symlink”. This A symlink creates a file at one location on a computer or network that reads data from another location. To the computer, it treats it like the actual file. But on the management side, it allows multiple dynamic copies of a single file to exist.  This is not the same as a standard windows shortcut. Shortcuts are actually a file of their own, a .lnk file. So those wouldn’t work for the type of functionality we need. Maya is looking for a file called Maya.env. It doesn’t know or care the the Maya.env file it is finding is, in fact, symlinked to another file on the network. Our more computer savvy readers may already be shaking their heads at the methods we are using, hopefully this is good for a laugh at least. This method works great for us.

Check out the Wikipedia page on Symlinks for a bit more info about linking and other options

Here is the outline of the command we used to create the symlink to our master Maya.env file:

mklink "target\path\Maya.env" \source\path\MASTER_Maya.env

This is run from the command prompt, or just put something like this in a text file and save it as a .bat file. Double click on the .bat file to run it. That’s it. I know. Kind of anti-climatic. But once the link has been created, you can edit the master file and all of the linked files will update. We created links on all of the farm machines and now hopefully we won’t need to do any manual installs on multiple machines except in the most extreme cases.

In my next post, I will talk about making cool images…but this was a big step for us here at Morehead and we wanted to share it with you.

Leave a Reply