Looking for runtime Datasmith import/reimport or alternatives

I’ve been working on a VR mechanical visualization tool and i’m looking for something that allows me to import meshes from an external file to the scene outside the editor and add it to a catalog.

It looks like with the current feature set of Unreal Studio I can get 90% there, but the moment i launch or package the project, the Datasmith importer won’t work because
-You can’t execute python scripts at runtime.
-Blueprint Datasmith importing requires parenting a editor-only class, so this doesn’t work either.

I’ve found this Runtime Mesh Loader plugin (GitHub - GameInstitute/RuntimeMeshLoader: RuntimeMeshLoader for UE4) but it looks like development has stopped and it works inconsistently.

Does anybody know of something I could use?

2 Likes

For the moment what we recommend is:
1- to trigger a preparation from your runtime application. From your application run a UEditor in command line that is going to do the import+preparation+cook of the CAD data. You can run a python script in command line or run your own commandlet.
2- load the cook asset in your application. Mount the directory containing your cook asset and load it in your runtime application.

This requires that your runtime application has access to a computer with a UEditor to trigger the preparation.

Hello Frinalal!
Im looking for a very similar solution for ( I believe )very similar goals. Have you had any luck in that ? Im thinking of a more manual way to do this. Do you think modifying Unreal at source would help us ? The community seems clueless about this also. Feels like it was locked that way for some reason. What do you think ?

Hello all

This is very similar to what I need to do. I m in ArchViz sector and we decided to move to unreal engine. What I want to do now is to create a “game” where by pressing a button we can load/import a datasmith file from external drive/folder (for example a room from sketchup or 3ds max) in runtime and start applying materials, meshes or textures that have been already implemented in the package. However I haven’t found how a datasmith importer can be enabled (if it is possible) during runtime. Any idea or blueprints ?

Hello @UE_FlavienP , thank you for your recommendation.
Is it possible to provide us a small template to achieve that ?

What I ended up doing is to use Assimp and Rama’s plugin to load a GLTF file from a specified folder and loading Assimp’s mesh data into a procedural mesh component. The process usually takes less than 10 seconds but it relies on the file’s UVs, tangents, smoothing groups, etc. Rendering can easily get very expensive as you get no LODs but it works for me at the moment. I’m also looking into Koderz Runtime Mesh Component as an alternative to UE4’s procedural mesh component.

I don’t know if modifying UE4’s source would work mostly because i don’t have any C++ knowledge and I also think that the Datasmith importer was locked without reason, as every game engine has to internally process all 3D file formats to be able to “understand” them and optimize them.

Sorry for the late response, I normally use my work account instead of the personal one I used to write this post.

Alright this is good for me,
“I’ve been working on a VR mechanical visualization tool and i’m looking for something that allows me to import meshes from an external file to the scene outside the editor and add it to a catalog.”]

I thought DATASMITH compiled all your imports into a computer language, so that there was no Interpreting what I am importing or reimporting during Runtime.

what I am I thinking of? because that’s what I want ~ I want a compressor, so that I don’t need an interpreter, and I can just run it on an emulator. do these things even exist or are we actually all limited very rutidmentary Process Hogs in this field?

please do send me the information, if there is a Compiler that I am looking for.

it saves some 150-30% of your computing power during runtime.
(im following this convo now.)
think it might be DirectX… it s a real-pain of my **** to search through convoluted non-sense looking for the answer to my question. enough to make you think the industry is lasping: it can’t be… sure we can run 30 million bytes per second, but its twice as much fkn work as necessary to not have a Compressor. is it DirectX or maybe DATASMITH?

Hello all !
It’ll be a hard work while there is no “CoreTech” module which is used by other CAD modules in source code.
Source code :



// CAD library is only available if CoreTech is available too
bool bHasCoretech = System.Type.GetType("CoreTech") != null;

// Support for Windows only
bool bIsPlateformSupported = Target.Platform == UnrealTargetPlatform.Win64;

if (bIsPlateformSupported && bHasCoretech)
{
PublicDefinitions.Add("CAD_INTERFACE");
PublicDependencyModuleNames.Add("CoreTech");
}


As bHasCoretech equal false, CAD_INTERFACE will never been defined, so many codes will be commented.


btw: anyone have the source code of “CoreTech” module ?

1 Like

Okay, thx. But this is the end of 2020 now, is there any better way to do it? Please let us know and write a good documentation for it pls. There are many use cases which need this feature. thanks in advance.

Hi! With Unreal 4.26 we started an experimental tech where you can import datasmith file in a runtime game. We would like to start interacting with users who are looking for this type of functionality to help us developing this further. If you are interested, sign up here: https://forms.gle/Rjoh1iysPgBqQkex5 I will soon contact you about this, provide some technical information etc.

2 Likes

@pf_breton Hi, Many thanks for the prompt reply. Is this currently part of the UE4.26 release build? Or perhaps the Master branch of the source? I need it immediately. I’m currently working with Assimp, but if I can have this UE4 built in feature, that would be excellent. Also, if it could support other file formats, that would be excellent. Also, add blueprint support please. And above all, a good documentation please :slight_smile:

@pf_breton Hi, I’ve filled out the form already and waiting for the technical details on how to access the experimental feature regarding runtime loading of ue4 assets via datasmith. Also, could you point out of there are any other ways I can download any 3D file in my phone and load at runtime? I’m currently developing an AR based e-commerce platform, and badly stuck at this for months. Thanks in advance.

Thanks we will contact users who filled the form in a couple weeks, or when we are ready. Before entering into specific discussions and giving access, we need to document what we have, what the limitations are and provide a sample project otherwise we will end up answering random questions in random order and that can be time consuming :slight_smile:

Datasmith cant build from source.Can I merge runtime datasmith codes to use? Thanks a lot!!!

Hi @pf_breton, I have tried registering into this but it seems like there are no more entries accepted. Could you please share any documentation or materials that could help me import datasmith files in runtime? I tried using “Load datasmith scene from explorer” node but was unable to make it work. Hope you could help me. Thanks

Is there anything new on this topic, especially for UE5.
Is there a good selution?

You can import udatasmith and gltf at runtime. Through Datasmith.
There is parallel work that allows to load USD scene too.
There is also a refactoring of the import system so you will be able to import other formats such as CAD at runtime in upcoming versions.

1 Like

Are there any specific Dates available when this will happen?

Not before 5.2. So 2023.

1 Like

There is an experimental way in 5.1 to import CAD at runtime (not all formats).

1 Like