# UE 4.27.2 Datasmith Runtime Import Bug

**URL:** <https://forums.unrealengine.com/t/ue-4-27-2-datasmith-runtime-import-bug/582660>\
**Category:** Pipeline & Plugins\
**Tags:** Datasmith, unreal-engine, UE4-27\
**Created:** [June 15, 2022, 3:12pm UTC](https://forums.unrealengine.com/t/ue-4-27-2-datasmith-runtime-import-bug/582660 "2022-06-15T15:12:42Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![CrescentMax](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CrescentMax](https://forums.unrealengine.com/u/CrescentMax)\
**Post date:** [June 15, 2022, 3:12pm UTC](https://forums.unrealengine.com/t/ue-4-27-2-datasmith-runtime-import-bug/582660/1 "2022-06-15T15:12:42Z")

</div>

Hello! Recently I’m working on a project which needs to import .glb files in runtime. My approach is from [UsingDatasmithAtRuntime](https://docs.unrealengine.com/4.27/en-US/WorkingWithContent/Importing/Datasmith/Overview/UsingDatasmithAtRuntime/#:~:text=Datasmith%20Runtime%20is%20a%20collection,and%20manipulate%20them%20using%20Blueprints.).

But there was some issues of material and texture attachment.  
This is the test scene I used, created by blender (Includes basic materials and textures, without cycles-specific nodes):

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/6/3/d637850766659004b935c33cad1d2209e4883bfd.jpeg)

And you can see the bug of texture attachment from this video below. I just tried to debug again and then the texture appeared. Sometimes the material attachment will be wrong, too  
[https://youtu.be/ucgLi4uWpZg](https://youtu.be/ucgLi4uWpZg)

Here is the message log (Material):

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/8/b/58bf6364611f758cf479e1a66aa388201f1c39ba.jpeg)

I’ve seen a similar issue from this topic: [Ue4.27 datasmith Runtime import](https://forums.unrealengine.com/t/ue4-27-datasmith-runtime-import/248351) But I didn’t use MateriallnstanceDynamic. The materials and textures are in the glb files. Could you help me with this?

---

<div class="post-metadata">

**Author:** ![UE\_FlavienP](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ue_flavienp/32/1194546_2.png) [@UE\_FlavienP](https://forums.unrealengine.com/u/UE_FlavienP)\
**Post date:** [June 15, 2022, 5:32pm UTC](https://forums.unrealengine.com/t/ue-4-27-2-datasmith-runtime-import-bug/582660/2 "2022-06-15T17:32:32Z")

</div>

Are you manually assigning some materials or just letting datasmith import do it?

Can you share the test glb model?

---

<div class="post-metadata">

**Author:** ![CrescentMax](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CrescentMax](https://forums.unrealengine.com/u/CrescentMax)\
**Post date:** [June 16, 2022, 8:54am UTC](https://forums.unrealengine.com/t/ue-4-27-2-datasmith-runtime-import-bug/582660/3 "2022-06-16T08:54:25Z")

</div>

This is the model: [glb Test File](https://drive.google.com/file/d/1qKgqUn86VJjCfhm7zoMDwH61CtnXP_nx/view?usp=sharing)

This is the BP. I just let datasmith handle that.

 ![BP_SceneModifier](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/c/5/ec55eee7bd81643c9c436ec6ec4d02b6c4dde7d7.png)

---

<div class="post-metadata">

**Author:** ![UE\_FlavienP](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ue_flavienp/32/1194546_2.png) [@UE\_FlavienP](https://forums.unrealengine.com/u/UE_FlavienP)\
**Post date:** [June 16, 2022, 9:49am UTC](https://forums.unrealengine.com/t/ue-4-27-2-datasmith-runtime-import-bug/582660/4 "2022-06-16T09:49:43Z")

</div>

I could not reproduce.  
are you on 4.27.2?

Two remarks:

- You seem to be loading on begin play, could you load on a key event. Let see what happens when the engine do a few frame before loading.
- your performances (gpu time) are abysmal for such a scene. You should be running at 120fps. I am confused what it is so. Could you try to find out? press “ctrl” + “shift” + “,” and try to see what is slowing down your gpu like that.

The issue on texture import might be a side effect of either loading too fast or something slowing down the engine.

---

<div class="post-metadata">

**Author:** ![CrescentMax](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CrescentMax](https://forums.unrealengine.com/u/CrescentMax)\
**Post date:** [June 16, 2022, 4:00pm UTC](https://forums.unrealengine.com/t/ue-4-27-2-datasmith-runtime-import-bug/582660/5 "2022-06-16T16:00:39Z")

</div>

Yes, this project is build in UE4.27.2.

About the GPU time, I’ve turned on ray-tracing and the SamplesPrePixel is at least 32, MaxBoucing is 3 or 4. The graphic card is GTX1080.

I will try to load on a key event later, thank you for the help!

---

<div class="post-metadata">

**Author:** ![CrescentMax](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CrescentMax](https://forums.unrealengine.com/u/CrescentMax)\
**Post date:** [June 20, 2022, 10:38am UTC](https://forums.unrealengine.com/t/ue-4-27-2-datasmith-runtime-import-bug/582660/6 "2022-06-20T10:38:07Z")

</div>

I’ve tried key event. The problem may still happen. Note that there is a very low probability(About 5%) that the problem happens. Most times the pipeline is fine.

The image below represents the bug I met. It’s weird that the output log even doesn’t send any warning.

 ![Texture Problem](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/d/e/5de8243937af4833e4bdefb1d8f2ff333998b70a.jpeg)

If you wonder whether the problem is in BP, you can get all my files and the output log of the above texture problem in this folder:  
[Datasmith Runtime](https://drive.google.com/drive/folders/12CeM3CI9_tcX9BKY3oG_-OC66q5GzbSn?usp=sharing)  
It’s not very comlicated.

Brief Pipeline:

1. BP\_Fileloader loads the json file _test.json_ using custom blueprint function library _BPFL\_DataTableLoader_. It will get glb paths and several properties, then put the information into a datatable.
2. Datasmith loads the models using those paths. Datasmith should deal with the whole importing process (Mesh, Material, Texture)
3. BP\_SceneModifier do some simple transform changes on actors. This may not affect the importing.

The datatable importing part should be fine. I think the problem is datasmith from that message log of material problem I sent.

If you want to check my BP. You may want to check the file paths in test.json and BP\_Fileloader. I’m using absolute paths. If the BP can’t work, please tell me.

---

<div class="post-metadata">

**Author:** ![s.h.a.z](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@s.h.a.z](https://forums.unrealengine.com/u/s.h.a.z)\
**Post date:** [January 4, 2023, 3:21pm UTC](https://forums.unrealengine.com/t/ue-4-27-2-datasmith-runtime-import-bug/582660/7 "2023-01-04T15:21:04Z")

</div>

You found any solution for that?

I was tring the same for the .udatasmith import from sketchup. In editor viewport it works fine but in the packaged project, I am getting the same green wierd material for all the meshes. glb import works fine for me.
