Custom Cryptomatte Render Pass

Dear Community,
I am trying to create a custom plugin with extended settings in the Movie Render Queue. More specifically I want to create a custom Cryptomatte pass setting in the MRQ which draws a color encryption based on actor’s tag or Material in the EXR file format.
My approach:

  • First of I made an Editor widget that let’s me add actors from scene in a list and asign a tag to selected actors in this list, also asigning a color to the tag and update it real-time.
    This way I have one general BP ''Actor_Manager" that stores two arrays. ‘TagsList’ - FName; & ‘TaggedColor’ - FLinearColor;
    The BP is generated on a C++ base BPActorClass. In my BaseClass I have two structs FTagData & FTagColorData. And in the UClass I have the public UProperties of TArrays to access and manipulate the Data from my struct.
  • Second I have made a few Properties to the custom plugin and made it a public setting in my MRQ menu. Those you can find in the ‘CryptomattePROSetting.h’ and source file.
    With another script called ‘CryptomattePROHandler’ I am iterating through ‘TaggedColor’ array which I update with the BP “Actor_Manager”. There I am already getting stuck and I have a for loop that converts each linear color to an sRGB color, creates an FName for the color, creates a file path for the output file, creates an image with only one pixel of the desired color, and saves the image as an OpenEXR file.

My problem:

  • Properties are visible in the MRQ but it doesn’t export any files. I can’t get any exr file to be saved on disc apart from the buildin render passes the MRQ exports with it’s default system.
  • Can some of you help me figure out how to manage exporting additional exr files with encryption of actors in scene with a color from ‘TaggedColor’ Array?
    How to get a color from the array at index equal to the index of ‘TagsList’ Array. Set the color for each actor’s tag (it’s an FName variable) matching (contains) the ‘FName’ property in ‘TagsList’ Array and add this color to the encryption of the actor in the exr file.

Here is a repo where you can access the file structure of this pluin I am trying to make.
https://github.com/Vasmaster/CryptomattePRO

I would really appreciate any help! My strength is not in C++. I am a Technical Artist, my work is mostly in Blueprints, Materials, Niagara and Compositing. But I am trying something new for the company I work for. To those at most help of resolving this issue of mine I would be extremely grateful and I would gladly share the full Custom Editor I made which let’s the user/artist to quickly assign tags to your actors in scene to speed up organising mid-production projects, and more to come as I am planning to add a Material assign on tag menu which can make manipulation of scene a breeze.

Looking forward to your comments below.

Cheers,

I am still looking for suggestions. Would be really nice to hear any other experiences with custom render passes as well. If anyone from the community has some experience to share about custom render passes please do let me know in a comment below. Super interested in the subject. Also I am new to C++ so some definitions would be beneficial :slight_smile:
Thank you so much everyone!