How to use the new interchange pipeline to import meshes at runtime, packaged builds?

Could you also check please if Datasmith DirectLink works for you in a shipping build?

Tried ue5.2 compiled from source and new 5.2 preview 2; both importing options, development and shipping - still fatal error(

In editor it works fine (both importing options) if import ā€œonbeginplayā€, but if import on keyboard event - crashes(

Datasmith runtime plugin on 5.2 built from source - failed to compile (error: using editor features at runtime)

ue 5.3 (ue5-main, built today) - same fatal error

This is all it takes to crush unreal at runtime:
Untitled-1

after disabling some plugins (not sure which ones) and adding ā€œdelay until next tickā€ on key press + unknown magic, it works) on 5.3,

but no distance field calculation at runtime((
left - editor, right - runtime

We identified two issues:

  • some struct that are not ā€œdecoratedā€ properly in the code and not shipped so that packaged application will crash when trying to run interchange
  • some plugins dependencies that needs to be updated so that building in shipping mode can proceed.

ATM it should work if you try with the attached project glTFRuntimeImport52.zip (39.7 KB):

  • Build in development and not in shipping
  • Datasmith Interchange needs to be activated (that should not be the case and will be fixed)

Do you have any info about in which release will it be usable in shipping builds? Is it possible that it will be fixed for 5.2 release?

Hi, Iā€™m trying to import through BP a fbx and get only its animations. Iā€™ve tried exactly what you show above but didnā€™t work. I simply get an ā€œError: [Failure] Import Doneā€.
My code is strictly the exact same as shown in the linked parent post.

I donā€™t get how Interchange Pipeline works. Shouldnā€™t we see differents options when importing manually and setting an other Pipeline Interchange Asset in the Project Settings ?

Hello!
I am trying to use the project file you provided, which works properly in the editor.
But in the packaged version, I encountered several issues:

  1. All materials are lost, some textures are lost, and all lights are lost;
    2.Importing an obj file will force the merging of mesh bodies regardless of whether or not you choose to merge them;
    3.Use import scene and import assets, I can see in the editor that the corresponding location has generated files, but the files cannot be saved. After restarting the project, the assets are lost; After packaging, import the file and use the blueprint to obtain asset information, but after exiting the level, the asset is lost;
    At present, I have solved the lighting problem through other methods, but the material and texture issues are still unclear.
    Can you help me solve the problem? Or tell me which version will fix the corresponding issue in the future.
    Thank you very much.

Since you are importing FBX did you first make sure Interchange for FBX is on?
CVar: Interchange.FeatureFlags.Import.FBX True

What is the IPBA_AnimImpoter? Is it a copy of the DefaultAssetsPipeline?
If it is, you should be able to open that asset and put the default values you want for your custom import.

I see you put it in the Default Pipeline Stack that means OBJ, glTF, FBX will use that from now on.

Thanks for project files)
Major issues with interchange pipeline fixed in ue 5.3 (built from source today) nice)

I made GLTF viewer today, with best ever view navigation, based on interchange pipeline:

Unreal Render

More features / bugs are coming as soon as I have time (in a distant future)

In 5.2, everything works well in development build, but in shipping build, the materials are being lost. I am importing datasmith files. Has there been any progress on this issue in 5.3 and is it possible to propagate these advancements to 5.2 too in some way or fix the missing materials?

I tested and it is working in 5.3, but I did not find the particular commit that would have fix it.

1 Like

Is there any chance to add this fix for the texture and material importing to 5.2.1 or 5.2.2, or upcoming fixes for 5.2 engine version?

I also did some testing in Unreal Engine 5.2 runtime Imports and have still as soon as i want to call it the second time on another file in rapid Succesion.

I am at the moment using an event to handle the import.

17.8.2023: Each file needs a unique content path string, numerate it for example. Than it works fine.

Hello, Did you manage to import Datasmith with the use of interchange Pipeline?..

Hi,
Yes, but it has missing materials in 5.2. Expected to work perfectly in 5.3 version.

Thanks that was the Console variableā€¦
Strange that Iā€™ve not seen it in the docs , or maybe I missed it

Is it possible to set it in a config .ini file ? Maybe in DefaultEngine.ini ?

Yes you can add, in your DefaultEngine.ini,

[SystemSettings] 
Interchange.FeatureFlags.Import.FBX=True

It is still experimental so we did not mention it.

1 Like

Thanks for that fast answer ! It worked !

Hi,

We tried importing gltf and datasmith files in 5.3.2 engine version at runtime in packaged build. With gltf, the geometry is imported properly and if we set it to combine the meshes upon importing, then all of the materials show up properly. However, if we set it to not combine meshes (for example in case of a house with many parts), then some materials are imported properly, some are not. Also, if we import them async, materials are lost.
In case of datasmith, we are experiencing crashes or lost materials, even in the editor. Please note that this exact same datasmith file is imported perfectly in twinmotion. Do you guys know about these issues and are there fixes on the way for 5.4 version regarding theseā€¦?