AWS Thinkbox Discussion Forums

Path remap issue when using Cryptomatte in Houdini

Hi,

we are rendering Cryptomatte AOVs in Houdini/Mantra. When IFDs are created on a Linux machine, Deadline changes all backslashes to slashes which breaks a part of the IFD file as you can see in the image attached. Resulting in the AOV not being created.

We are still working with 9.0.6.1 but I have not seen any release note about this problem so I assume the problem might still be there.

Cheers !

Well, that’s fun. My guess is that the problem is with the naive (but really effective!) approach we take to swapping slashes. We take the whole line and change it without much regard to the context of what’s actually inside of it.

Could you provide an example that we could play with? I’m not sure what our options are here at the moment and it looks like this is could be tricky to solve. Personal guess is that we’ll just have to special-case ‘"’.

I did some digging into our path mapping code in the Houdini plugin in 9.0, and we’re setting a special “HOUDINI_PATHMAP” environment there… The Mantra plugin seems to be where we’re doing a lot of find/replace with slashes inside the file. You can probably just send us a simple IFD to test with.

Hi and thanks for your quick answer. Here is the IFDs file.

Just change the txt extension to ifd, the forum was not allowing me to upload an IFD file.

Thanks for looking into it !
deadline_mantra_cryptomatte.txt (594 KB)

Hi,

checking if there is any news on that one. Even a temporary code change in the Mantra plugin will do until next minor version release.

Cheers
Chris

Well, two options here:

  1. Disable path mapping in “Tools” -> “Configure Plugins” -> Mantra. This would mean you can’t go cross platfrom, but at least you could use Cryptomatte.

  2. Try tweaking this in “[repo]/plugins/Mantra/Mantra.py” (after making a backup):

            # Specifying 'True' for the last argument so that the file can be read in byte by byte, since IFDs can contain binary data.
            # This is known to have problems with UTF16 and UTF32 files though. However, if we specify 'False', every line of the file
            # is read in as a string, and then written back out, which messes up the binary data.
            RepositoryUtils.CheckPathMappingInFileAndReplaceSeparator( ifdFile, tempIfdFileName, "\\", "/", True )

We’d want to change the slash bits there to essentially be non-operative:

            # Specifying 'True' for the last argument so that the file can be read in byte by byte, since IFDs can contain binary data.
            # This is known to have problems with UTF16 and UTF32 files though. However, if we specify 'False', every line of the file
            # is read in as a string, and then written back out, which messes up the binary data.
            RepositoryUtils.CheckPathMappingInFileAndReplaceSeparator( ifdFile, tempIfdFileName, "\\", "\\", True )

That should just replace the back slahes with more black slashes. Windows is usually happy with either slash. One edge case though is if there are UNC paths. If the first three slashes for Windows are wrong it will fail to access that path. The good news is you can just be diligent in your re-map rules and make sure you don’t use the wrong ones. :slight_smile:

Privacy | Site terms | Cookie preferences