Tuesday, March 31, 2015

Fabric Engine, Fabric Splice - Installing for Maya on OSX, how to set up

"Fabric Engine is a development framework that reduces the cost and risk of building high-performance custom tools."

Fabric Engine Trailer, Click here

You can just freeflow around in a fully rendered viewport scene. The FPS shouldn't nose dive as it would normally.  It sounds like a slice of the good stuff on a platter. Wow indeed.
Also they are constantly adding features and going way beyond their depth and making it their depth, so impressive, rendering, rigging, mocap, crowd building, just inasnity, I can't justify it into words:

Fabric Engine's, Vimeo Channel

That being said, it's a bit of a beast to set up, well, it's a lot of a beast if you don't know how to do it. There are no good instructions out there for installation, here is how I eventually did it after finding tidbits of info and piecing together:

1. Do not use their installer (Just skip step 1, it's here because it used to be a part of the install)
It is old and not up to date.
Do not add environment variable in lanchd.conf
This was discontinued.
Skip to step 2.

2. Download the latest Engine:
http://dist.fabric-engine.com/FabricEngine/

Extract it, don't change the huge folder name.
I put it here, this is where the old installer used to put it: /Library/FabricEngine/
Don't rename their folder, it has a long crazy name.

3. Edit the FabricSpliceMaya.mod file,  in fabric engines module directory located here (Do not relocate): 
/Library/FabricEngine/1.15.0/SpliceIntegrations/FabricSpliceMaya2014SP3 

It should look like this after you edit it:
+ FabricSpliceMaya 1.0 .
FABRIC_EXTS_PATH +:= /Library/FabricEngine/1.15.0/Exts
PYTHONPATH +:= /Library/FabricEngine/1.15.0/python/2.7
PATH +:= /Library/FabricEngine/1.15.0/SpliceIntegrations/FabricSpliceMaya2014SP3/plug-ins

After editing it, close it and double check it that it editited.

5. I also had to add to the maya.env file (wouldn't work without this), located in this path:
/Users/yourusername/Library/preferences/autodesk/maya/2014-x64/modules/maya.env

FABRIC_DIR=/Library/FabricEngine/FabricEngine-1.15.1-Darwin-x86_64
FABRIC_EXTS_PATH=/Library/FabricEngine/FabricEngine-1.15.1-Darwin-x86_64/Exts

MAYA_MODULE_PATH=/Library/FabricEngine/FabricEngine-1.15.1-Darwin-x86_64/SpliceIntegrations/FabricSpliceMaya2014SP3

6. Put these lines in usersetup.mel to make the fabricSplice plugin autorun auto run:
//Auto loads FabricSplice plugin so you don't have to
if(!`pluginInfo -query -l -n FabricSpliceMaya`) loadPlugin "FabricSpliceMaya"; 

7. then you must open maya terminal (not regular terminal) and Source environment.sh  
(Do not edit this file since it pulls it's info from maya.env and the FabricSpliceMaya.mod)
open terminal, in shell, new window, maya...
type source 
and just drag in environment.sh from where it is sitting in /library/fabricengine/1.15.0 into the terminal after source. then hit enter, errors mean it's messed up.

8. Reboot. 

9. open maya terminal
source environment.sh
and to open maya, you just type maya

It will show up in the toolbar menu as "fabricsplice: something"
If it is not running then go into your plugins manager and see if it is checked.

10. (Optional) Made a duplicate user startup script called userSetupFabric.mel, in maya’s script folder in the regular user directory. then made an applescript that runs this start up script instead to make a separate alias to run fabric and have a non fabric alias , so i have two on the doc and named them accordingly.

--open terminal
tell application "Terminal"
activate
delay 0.8
--run maya env variables
do script ". /Applications/Autodesk/maya2014/Maya.app/Contents/bin/MayaENV.sh"
--keystroke ". /Applications/Autodesk/maya2014/Maya.app/Contents/bin/MayaENV.sh"
tell application "System Events"
keystroke return
delay 1
keystroke "source /Library/FabricEngine/FabricEngine-1.15.1-Darwin-x86_64/SpliceIntegrations/FabricSpliceMaya2014SP3/environment.sh"
keystroke return
delay 1
--start maya
keystroke "maya -script userSetupFabric.mel"
keystroke return
--don't kill terminal, just leave it open while you use maya, killing terminal here with kill maya
--tell application "System Events"
--kill terminal
--keystroke "killall Terminal"
end tell
end tell


Don’t Kill the terminal or it will kill maya abruptly, instead leave the terminal running.


Notes:
Do not move their plug in (FabricSpliceMaya.bundle), environment.sh points to the plugin in their directory. I did trying to force it to work and this caused errors.

Fabric may not play nicely with some other plugins and python. I notice they improve it a little with each iteration.

Bonus Step 10.
If you don't want fabric to be permanent, you can make an alias that boots maya with a a different user pref file and starts the plugin, so that you can start a version of maya without fabric started.
If there is interest in this let me know.

No comments:

Post a Comment