## Psyop's Cryptomatte In Fusion

gaia
Posts: 3
Joined: Wed Nov 15, 2017 2:09 am

### Re: Psyop's Cryptomatte In Fusion

Thanks you very much ! I just upgrade vray 3.60.01 to 3.60.03 and that work fine.

Tags:

Mclawest
Fusioneer
Posts: 60
Joined: Tue Jul 28, 2015 6:31 am

### Re: Psyop's Cryptomatte In Fusion

just tried with cryptomatte rendered from mantra.. works well!
You do not have the required permissions to view the files attached to this post.

AndrewHazelden
Fusionator
Posts: 1001
Joined: Fri Apr 03, 2015 3:20 pm
Location: West Dover, Nova Scotia, Canada
Been thanked: 91 times
Contact:

### Cryptomatte Fuse Controls

Here is a written summary of the controls in the Cryptomatte Fuse GUI.
fusionToolsView.png
Controls Tab:
• Matte Locator: This X/Y transform control allows you to position where a matte selection element will be keyed in the Viewer window.
• Add Button: This adds "keyed" objects to the matte selection, meant to be used with the Matte Locator X/Y control.
• Remove Button: This removes "keyed" objects from the matte selection, meant to be used with the Matte Locator X/Y control.
• Toggle Button: Toggles the state of the "keyed" object in the matte selection, meant to be used with the Matte Locator X/Y control.
• Keyable Surface: Controls whether or not previews of the matte boundaries are drawn. A ComboControl menu lets you adjust how they are drawn.
"Edges" allows viewing input RGBA with borders around keyable regions
"Colors" is random colors per matte
"None" allows viewing of input RGBA without borders, but with a visible highlight on selected areas
• Matte Only: Also write the matte to RGBA channels.
• Matte List: A list of names to extract mattes from. This list may be modified in text form or by using the Matte Locator control.
• Clear Button: Clears the matte list.
• Crypto Layer Selection: If there are multiple Cryptomattes, this is how you select the layer. This is filled in automatically, but may be changed manually.
• Name Checker Locator: This X/Y transform control allows you to probe the image in the Viewer window to discover the "keyed" object name.
• Show Button: Shows the Name Checker X/Y transform control.
• Hide Button: Hides the Name Checker X/Y transform control.
• Keyed Name: Displays in text form the "keyed" object name that is positioned under the Name Checker Locator.
You do not have the required permissions to view the files attached to this post.

AndrewHazelden
Fusionator
Posts: 1001
Joined: Fri Apr 03, 2015 3:20 pm
Location: West Dover, Nova Scotia, Canada
Been thanked: 91 times
Contact:

### Cryptomatte + V-Ray for Maya 3.60.03

Artists who use V-Ray and Cryptomatte should check out the latest V-Ray for Maya 3.60.03 release. This V-Ray update adds the following features:

Cryptomatte
• Support for refractive/reflective materials
• Cryptomatte now works in DR without local host
• Added Cryptomatte support in .vrimg and single channel EXR files
new-vray-release.png
You do not have the required permissions to view the files attached to this post.

ricoholmes
Posts: 4
Joined: Wed Dec 06, 2017 7:19 am

### Re: Psyop's Cryptomatte In Fusion

Hello there

Naturally, super-excited at the prospect of cryptomatte in Fusion.
Unfortunately I have to report having no luck whatsoever with the installation.

I've tried the userpath route for the Fuse and Shortcuts
the lua being a LUA_PATH system variable to program files/blackmagic/fusion/lua
No dice (including alternative attempts/paths)

Similar with pretty much any combination of paths I'm afraid. After many hours of trial and error I simply can't get this installed.
(cmd) echo %LUA_PATH% check fine, correct etc.

I know you can't hold my hand while installing it I just want to hilight the difficulty involved for some of us (and after 25+yrs of working in CG I'm no stranger to odd installations ).

Good god this is exciting stuff though
You do not have the required permissions to view the files attached to this post.

AndrewHazelden
Fusionator
Posts: 1001
Joined: Fri Apr 03, 2015 3:20 pm
Location: West Dover, Nova Scotia, Canada
Been thanked: 91 times
Contact:

### Re: Psyop's Cryptomatte In Fusion

ricoholmes wrote:
Wed Dec 06, 2017 11:54 pm
I've tried the userpath route for the Fuse and Shortcuts
the lua being a LUA_PATH system variable to program files/blackmagic/fusion/lua
No dice (including alternative attempts/paths)

Similar with pretty much any combination of paths I'm afraid. After many hours of trial and error I simply can't get this installed.
(cmd) echo %LUA_PATH% check fine, correct etc.
Hi Rico.

The error dialog screenshot you attached indicates the Cryptomatte.fuse file was installed and read by Fusion at start up. You are having an issue with the "cryptomatte_utilities.lua" file not being detected by Fusion which comes down to the installation paths used and a few other possible settings being an issue.

Could you attach a screenshot of the contents of your "C:\Program Files\Blackmagic Design\Fusion 9\lua" folder with the view set to "details" mode in the Windows explorer? What files are in this folder?

The LUA_PATH environment variable is used when you are at a company that wants to override and customize the default installation path. If you are going to install the Cryptomatte Lua module content to the standard "C:\Program Files\Blackmagic Design\Fusion 9\lua" folder then that step is not required.

ricoholmes
Posts: 4
Joined: Wed Dec 06, 2017 7:19 am

### Re: Psyop's Cryptomatte In Fusion

Hi Andrew,
I genuinely wasn't expecting help or hand-holding, so thank you for the response.
Could you attach a screenshot of the contents of your "C:\Program Files\Blackmagic Design\Fusion 9\lua" folder with the view set to "details" mode in the Windows explorer? What files are in this folder?
WeSuckLessForum_LuaFolderGrab.jpg
As you say, I assumed it had loaded the fuse part but failed to locate the lua module.

on that note: I also tried a previous build from the history in case it was a recently introduced error.

It's actually embarrassing to hold my hand up and admit I can't get it installed because it looks like it should be straightforward. It's really got me stumped though.

Again, thank you for taking the time to answer
/RH
You do not have the required permissions to view the files attached to this post.

AndrewHazelden
Fusionator
Posts: 1001
Joined: Fri Apr 03, 2015 3:20 pm
Location: West Dover, Nova Scotia, Canada
Been thanked: 91 times
Contact:

### Re: Psyop's Cryptomatte In Fusion

ricoholmes wrote:
Thu Dec 07, 2017 6:56 am
Again, thank you for taking the time to answer
Would you be willing to type "set" into the Windows command prompt and then copy the results into your clipboard. This will list all of the active environment variables on your system and could help track down the source of the problem.

You can then paste that information into a reply on this thread, or you could send me a PM private message on WSL with those details and I can take a look at it. When you compose the post you should write that text output inside of a BBCode formatted "code" block so the formatting is preserved.

Regards,
Andrew

ricoholmes
Posts: 4
Joined: Wed Dec 06, 2017 7:19 am

### Re: Psyop's Cryptomatte In Fusion

Hi again Andrew.
Show the results of "[cmd]set" ? Absolutely !

Code: Select all

Microsoft Windows [Version 10.0.15063]

C:\Users\rico>set
ALLUSERSPROFILE=C:\ProgramData
APPDATA=C:\Users\rico\AppData\Roaming
asl.log=Destination=file
CommonProgramFiles=C:\Program Files\Common Files
CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
CommonProgramW6432=C:\Program Files\Common Files
COMPUTERNAME=MACHMAIN
ComSpec=C:\WINDOWS\system32\cmd.exe
CUDA_CACHE_MAXSIZE=268435456
HOMEDRIVE=C:
HOMEPATH=\Users\rico
INTEL_DEV_REDIST=C:\Program Files (x86)\Common Files\Intel\Shared Libraries\
LOCALAPPDATA=C:\Users\rico\AppData\Local
LOGONSERVER=\\MACHMAIN
LUA_PATH=C:\Program Files\Blackmagic Design\Fusion 9\lua\
MAYA_APP_DIR=d:\Dropbox\Repository\Program Data\Maya\Maya_App_Dir\
MIC_LD_LIBRARY_PATH=C:\Program Files (x86)\Common Files\Intel\Shared Libraries\compiler\lib\mic
NUMBER_OF_PROCESSORS=8
OneDrive=C:\Users\rico\OneDrive
OS=Windows_NT
Path=C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64\compiler;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\PSTools;c:\Windows\System32\;c:\Program Files\Thinkbox\Deadline8\bin\;C:\Program Files\Common Files\Autodesk Shared\;C:\Program Files (x86)\Autodesk\Backburner\;C;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Users\rico\AppData\Local\Microsoft\WindowsApps;C;
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PHX_FOR_MAYA2018_MAIN_x64=C:\Program Files\Autodesk\Maya2018\phoenixfd
PROCESSOR_ARCHITECTURE=AMD64
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 26 Stepping 5, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=1a05
ProgramData=C:\ProgramData
ProgramFiles=C:\Program Files
ProgramFiles(x86)=C:\Program Files (x86)
ProgramW6432=C:\Program Files
PROMPT=$P$G
PSModulePath=C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\
PUBLIC=C:\Users\Public
SESSIONNAME=Console
SystemDrive=C:
SystemRoot=C:\WINDOWS
TEMP=C:\Users\rico\AppData\Local\Temp
TMP=C:\Users\rico\AppData\Local\Temp
USERDOMAIN=MACHMAIN
USERDOMAIN_ROAMINGPROFILE=MACHMAIN
USERPROFILE=C:\Users\rico
VRAY_FOR_MAYA2018_MAIN_x64=C:\Program Files\Autodesk\Maya2018\vray
VRAY_FOR_MAYA2018_PLUGINS_x64=C:\Program Files\Autodesk\Maya2018\vray/vrayplugins
VRAY_OPENCL_PLATFORMS_x64=nvidia cuda geforce gtx 1080 gpu index0;
VRAY_OSL_PATH_MAYA2018_x64=C:\Program Files\Chaos Group\V-Ray\Maya 2018 for x64/opensl
VRAY_TOOLS_MAYA2018_x64=C:\Program Files\Chaos Group\V-Ray\Maya 2018 for x64/bin
windir=C:\WINDOWS

C:\Users\rico>

nb: not that it makes a difference, but LUA_PATH was tried both with and without trailing "\"

Sorry for the delayed reply; we're on very different timezones here .. Canada-Scandinavia ( though identical weather, I'm sure )

/RH

AndrewHazelden
Fusionator
Posts: 1001
Joined: Fri Apr 03, 2015 3:20 pm
Location: West Dover, Nova Scotia, Canada
Been thanked: 91 times
Contact:

### Working With the LUA_PATH Environment Variable

ricoholmes wrote:
Thu Dec 07, 2017 11:14 pm
nb: not that it makes a difference, but LUA_PATH was tried both with and without trailing "\"
Hi Rico.

LUA_PATH is a bit of an odd environment variable and it comes directly from the Lua programming language.

If you are going to use the "stock" Fusion installation path for installing a Lua Module on your computer then you can keep life a bit simpler and skip the process of creating a custom LUA_PATH environment variable.

You would only need to define a LUA_PATH environment variable if you wanted to push the Lua Modules folder to another location on disk like for example to install the Cryptomatte files on a network share like "Z:\ricoholmes\Fusion\Cryptomatte\Modules\Lua\?.lua".

Using the LUA_PATH environment variable correctly requires a bit of background knowledge as you have to add a trailing "\?.lua" to the end of the folder path like this:

Code: Select all

C:\Program Files\Blackmagic Design\Fusion 9\lua\?.lua

or if you wanted to set the Lua Module files up on an alternative drive you could use a LUA_PATH value of:

Code: Select all

Z:\ricoholmes\Fusion\Cryptomatte\Modules\Lua\?.lua;C:\Program Files\Blackmagic Design\Fusion 9\lua\?.lua


ricoholmes
Posts: 4
Joined: Wed Dec 06, 2017 7:19 am

### Re: Psyop's Cryptomatte In Fusion

Andrew,
I can't thank you enough! - the trailing ?.lua was exactly what was missing. Happy to report everything working superbly now.

Now that's support!

on the downside, I'm probably going to need a new hard drive due to Cryptomatting everything
RH

Wenneker
Posts: 5
Joined: Wed Jun 15, 2016 1:15 am

### Cryptomatte in Fusion 9.02

I had Cryptomatte installed and working in 9.01 but after upgrading to 9.02 it is no longer working. The problem seems to be that "cryptomatte_utilities.lua" can't be found. I have it in C:\Program Files\Blackmagic Design\Fusion 9\Lua like the doc says but the console gives a different list of paths.

The solution seems to be to place a 2nd copy of the file C:\Users\[USERNAME]\AppData\Roaming\Blackmagic Design\Fusion\Modules\Lua

remoz
Posts: 12
Joined: Sat Oct 07, 2017 10:28 pm

### Re: Psyop's Cryptomatte In Fusion

Hi guys!

https://github.com/Psyop/Cryptomatte

The CryptoMatte Fuse is not loading in Fusion. Or let's say.. I get the Fuse, but I can't find a way to connect the Fuse anymore with an .exr.

I would need a step by step guide, where to copy the installation files.
Thank you so much for all your help and keep rocking!

The solution seems to be to place a 2nd copy of the file C:\Users\[USERNAME]\AppData\Roaming\Blackmagic\Design\Fusion\Modules\Lua

Thank you Wenneker.. seems to fix it!

SecondMan
Posts: 2565
Joined: Thu Jul 31, 2014 5:31 pm
Been thanked: 86 times
Contact:

### Re: Psyop's Cryptomatte In Fusion

Following up a little on this post from @JPDoc

I can't reproduce it, I installed Cryptomatte from Reactor and it works fine - I have to ask, what version of Windows are you using?

SirEdric
Fusionista
Posts: 902
Joined: Tue Aug 05, 2014 10:04 am
Been thanked: 62 times
Contact:

### Re: Psyop's Cryptomatte In Fusion

Just curious...is there a stable implementation of Crytomatte for Blender available?

Cheers.

Eric.