Interchange Framework - How to build support for new fundamental classes of assets?

Hi!

I suspect I know the answer to this already… but I’m going to ask it anyway, in case anyone else is ever interested in the same topic or it sparks interest within Epic to add additional flexibility to the Interchange system.

Here is my issue: If I wanted to write a new Interchange translator/pipeline/factory for an asset type that isn’t one of the following defined “classes”, do I have any recourse at the moment beyond editing the core engine code?

UENUM(BlueprintType) enum class EInterchangeTranslatorAssetType : uint8 { None = 0x0, Textures = 0x1 << 0, Materials = 0x1 << 1, Meshes = 0x1 << 2, Animations = 0x1 << 3, Sounds = 0x1 << 4, Grooms = 0x1 << 5, };

As I understand it, and please correct me if I’m wrong, I can extend Interchange in a custom plugin to say, write a new translator for a novel 3D Mesh filetype that unreal doesn’t natively support. I’d write the translator, generate an Interchange node for the Mesh payload and then any existing factory could consume that node to generate some asset on the other side.

However… if I wanted to create a plugin to handle something completely new, something that doesn’t fall into the categories of Textures, Materials, Meshes, Animations, Sounds, or Grooms, and import that new thing into the Editor via a set of Interchange Translators, Pipelines, and Factories that I write in C++, then I’d be in trouble, correct?

I realize that these categories likely cover 95% of all assets one might want to import… but I’m very curious why, given the otherwise very flexible design of the Interchange Framework, that this element was not designed to be extendible.

Unless of course I’m missing something completely here! In which case I’m very happy to be told I’m wrong and corrected!

Hello,

thank you for the feedback, I created a ticket to investigate.

In the mean time, this will not prevent you from creating your own translator+pipeline+factory for your format. You could use the Asset Type None for example. There will be some side effect, AFAIK this is used by the Framework to select witch pipeline stack to use based on the Asset Type that the Translator, matching the imported file format, supports.

In the sample project of this tutorial, the foo format support was added and the translator was using the asset type “none”. By default UE will pick the “Assets” pipeline stack, so a “per translator pipeline” override for FOO translator was added inside the “Assets” pipeline stack so that the Interchange Framework found the pipelines to run when importing the .foo file. Doing so the good pipelines should be selected automatically in the import dialog when dragging a .foo extension file.

Thanks for responding so quickly!

This is illuminating… I was wondering about the None type and what it would mean to use that. I was 50/50 between it doing basically what you describe here and completely blocking things from working at all. So it’s good to know that it’s kind of a “typeless wildcard” class of asset.

That said, if I wanted to, for my custom data type and corresponding custom translators/pipeline, set up default overrides in my plugin so users wouldn’t need to manually configure said overrides themselves, is that possible? Ideally I’d like to present a low friction experience for them using the custom asset type. It would be annoying to have to tell them “here are the post configuration steps you have to do after enabling this plugin, otherwise it won’t work as expected!”

If adding the overrides was something a plugin could do automatically for the user, I think this would be an okay solution until more flexibility was created with the current enum.

You can look into the code of the StartupModule Function in the Interchange OpenUSD plugin:

/Engine/Plugins/Interchange/Extensions/OpenUSD/Source/Import/Private/InterchangeOpenUSDImportModule.cpp.

You will see that the plugin retrieves the project settings object, then the AssetImportSettings, then the defaultPipelineStack and then add the a custom translator pipeline for the USD format as well as the stack of pipelines to be executed on import. You could do something similar for your custom translator+pipelines.

We are reworking the project settings for interchange so that process will change in the future (UE6).