# UE4.27 Runtime USD Import

**URL:** <https://forums.unrealengine.com/t/ue4-27-runtime-usd-import/487753>\
**Category:** Community & Industry Discussion\
**Tags:** unreal-engine, runtime, question\
**Created:** [August 20, 2021, 8:30pm UTC](https://forums.unrealengine.com/t/ue4-27-runtime-usd-import/487753 "2021-08-20T20:30:58Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![eray\_ozr](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@eray\_ozr](https://forums.unrealengine.com/u/eray_ozr)\
**Post date:** [August 20, 2021, 8:30pm UTC](https://forums.unrealengine.com/t/ue4-27-runtime-usd-import/487753/1 "2021-08-20T20:30:58Z")

</div>

Hello  
I tried to use USD Stage Actor to import an USD file at runtime.  
I used “Set Root Layer” node and it worked on PIE and Stand Alone but it did not work with packaged project.  
But when I used that actor with “Spawn Actor from Class” it spawns and again, it does not work.

Is there any suggestion for it ?

---

<div class="post-metadata">

**Author:** ![SimplestWay](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SimplestWay](https://forums.unrealengine.com/u/SimplestWay)\
**Post date:** [November 9, 2021, 7:01am UTC](https://forums.unrealengine.com/t/ue4-27-runtime-usd-import/487753/2 "2021-11-09T07:01:52Z")

</div>

When you try to load usd in runtime with log enabled, there will be a error log :

\*LogUsd: Error: The USD SDK is disabled because the executable is not forcing the ansi C allocator (you need to set ‘FORCE\_ANSI\_ALLOCATOR=1’ as a global definition on your project _.Target.cs file). Read the comments at the end of UnrealUSDWrapper.Build.cs for more details._

Accordding to the error log, I add

> BuildEnvironment =  
> TargetBuildEnvironment.Unique;  
> GlobalDefinitions.Add(“FORCE\_ANSI\_ALLOCATOR=1”);

Then, you should download your unreal engine from [github.com](http://github.com) and compile it by your own if you installed 4.27 from epic launcher, otherwise, you will meet another package error.

I gave up in this step because I decieded to switch to DatasmithRuntime to import scene in runtime for vray materials support.

Hope that helps.

---

<div class="post-metadata">

**Author:** ![eray\_ozr](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@eray\_ozr](https://forums.unrealengine.com/u/eray_ozr)\
**Post date:** [November 9, 2021, 7:06pm UTC](https://forums.unrealengine.com/t/ue4-27-runtime-usd-import/487753/3 "2021-11-09T19:06:23Z")

</div>

I helps a lot ! Thank you very much. I tried and got same errors. I wont try to compile engine because there are additional mechanics which I need to write. But I will try in the future.

I tried to use Datasmith Runtime but for CAD aspect, part names and hierarchy come broken. So I use GLTF Runtime.

---

<div class="post-metadata">

**Author:** ![eray\_ozr](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@eray\_ozr](https://forums.unrealengine.com/u/eray_ozr)\
**Post date:** [November 13, 2021, 3:39pm UTC](https://forums.unrealengine.com/t/ue4-27-runtime-usd-import/487753/4 "2021-11-13T15:39:30Z")

</div>

I used your hints and right now I can successfully import USD files. Thank you !

---

<div class="post-metadata">

**Author:** ![SimplestWay](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SimplestWay](https://forums.unrealengine.com/u/SimplestWay)\
**Post date:** [March 21, 2022, 12:07pm UTC](https://forums.unrealengine.com/t/ue4-27-runtime-usd-import/487753/5 "2022-03-21T12:07:49Z")

</div>

Glad to hear that, have a good day friend.

---

<div class="post-metadata">

**Author:** ![Kunal\_Bhorodiya](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kunal\_Bhorodiya](https://forums.unrealengine.com/u/Kunal_Bhorodiya)\
**Post date:** [January 12, 2023, 9:02am UTC](https://forums.unrealengine.com/t/ue4-27-runtime-usd-import/487753/6 "2023-01-12T09:02:27Z")

</div>

Hey, Is it possible to import USD file in Packaged project If Yes can you tell me the steps to do that ???

Purpose :- I want to load all the assets in my game in runtime like i have a **.CSV** file that have all the data about **location and rotation about the actor** and the actor is in **.USD** format so I just want to read that **.csv** file and pick **USD** file From that location…

Thanks In Advance

---

<div class="post-metadata">

**Author:** ![eray\_ozr](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@eray\_ozr](https://forums.unrealengine.com/u/eray_ozr)\
**Post date:** [January 25, 2023, 6:04pm UTC](https://forums.unrealengine.com/t/ue4-27-runtime-usd-import/487753/7 "2023-01-25T18:04:29Z")

</div>

Yes, it’s possible but you need to use source code version of Unreal Engine. Not client one.  
After that just follow this steps.

> [@UE4.27 Runtime USD Import](https://forums.unrealengine.com/t/ue4-27-runtime-usd-import/487753/2):
>
> When you try to load usd in runtime with log enabled, there will be a error log : \*LogUsd: Error: The USD SDK is disabled because the executable is not forcing the ansi C allocator (you need to set ‘FORCE\_ANSI\_ALLOCATOR=1’ as a global definition on your project .Target.cs file). Read the comments at the end of UnrealUSDWrapper.Build.cs for more details. Accordding to the error log, I add BuildEnvironment = TargetBuildEnvironment.Unique; GlobalDefinitions.Add(“FORCE\_ANSI\_ALLOCATOR=1”); Th…

Because client version of Unreal doesn’t support target.cs edits.

---

<div class="post-metadata">

**Author:** ![david.gillespie](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@david.gillespie](https://forums.unrealengine.com/u/david.gillespie)\
**Post date:** [March 13, 2023, 6:07pm UTC](https://forums.unrealengine.com/t/ue4-27-runtime-usd-import/487753/8 "2023-03-13T18:07:22Z")

</div>

Has this been resolved in 5.0/5.1 using a launcher build to package? Would really like to be able to package using a launcher build but running into similar issues.

---

<div class="post-metadata">

**Author:** ![eray\_ozr](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@eray\_ozr](https://forums.unrealengine.com/u/eray_ozr)\
**Post date:** [March 13, 2023, 11:28pm UTC](https://forums.unrealengine.com/t/ue4-27-runtime-usd-import/487753/9 "2023-03-13T23:28:32Z")

</div>

I haven’t tried it yet and won’t try it near future. But you can try it. Just try to import something to a template and package it. If there will be an error after target.cs edit, we can say you need source code.

---

<div class="post-metadata">

**Author:** ![Kunal\_Bhorodiya](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kunal\_Bhorodiya](https://forums.unrealengine.com/u/Kunal_Bhorodiya)\
**Post date:** [June 29, 2023, 10:53am UTC](https://forums.unrealengine.com/t/ue4-27-runtime-usd-import/487753/10 "2023-06-29T10:53:28Z")

</div>

Hello, Were you successfully able to import usd, usda, usdc file at runtime, if yes kindly help me out for the same…

Thanks in advance…

---

<div class="post-metadata">

**Author:** ![eray\_ozr](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@eray\_ozr](https://forums.unrealengine.com/u/eray_ozr)\
**Post date:** [June 30, 2023, 12:05am UTC](https://forums.unrealengine.com/t/ue4-27-runtime-usd-import/487753/11 "2023-06-30T00:05:05Z")

</div>

Yes. just follow this workflow. You need source code version of Unreal.

> [@UE4.27 Runtime USD Import](https://forums.unrealengine.com/t/ue4-27-runtime-usd-import/487753/2):
>
> When you try to load usd in runtime with log enabled, there will be a error log : \*LogUsd: Error: The USD SDK is disabled because the executable is not forcing the ansi C allocator (you need to set ‘FORCE\_ANSI\_ALLOCATOR=1’ as a global definition on your project .Target.cs file). Read the comments at the end of UnrealUSDWrapper.Build.cs for more details. Accordding to the error log, I add BuildEnvironment = TargetBuildEnvironment.Unique; GlobalDefinitions.Add(“FORCE\_ANSI\_ALLOCATOR=1”); Th…

---

<div class="post-metadata">

**Author:** ![Kunal\_Bhorodiya](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kunal\_Bhorodiya](https://forums.unrealengine.com/u/Kunal_Bhorodiya)\
**Post date:** [June 30, 2023, 7:25am UTC](https://forums.unrealengine.com/t/ue4-27-runtime-usd-import/487753/12 "2023-06-30T07:25:11Z")

</div>

Thanks for helping

Yes I was able to import USD at run time in standalone mode…  
But I wanted to import multiple USD file for multiple locations. But it only loads last USD file like if I have 3 root location than it only imports the last one…

Delay tried…

Kindly help

---

<div class="post-metadata">

**Author:** ![eray\_ozr](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@eray\_ozr](https://forums.unrealengine.com/u/eray_ozr)\
**Post date:** [June 30, 2023, 8:26am UTC](https://forums.unrealengine.com/t/ue4-27-runtime-usd-import/487753/13 "2023-06-30T08:26:55Z")

</div>

Because you (probably) try to import multiple USD with single container.

Use two actor classes.  
1- BP\_USD (example name) which holds USD root.  
2- Another BP which has your loop to trigger import sequence.

For this:  
First, put your loop actot to the scene and spawn your USD container actors from its loop actor’s inside. You have to have equal numbered container actors for each USD file.

Second, set container actors’ world space locations with your list. Do it before importing. Because after you import, moving an actor which contains static meshes will be hard. (I consider you have at least hundreds of components)

Finaly, set each container’s USD root with your path.

// Just be sure about your USDs’ main center. When you put all of them in a group in 3Ds Max or Blender, that group has to be at 0,0,0. This is your main / assembly center. If not, second step just offsets your meshes.

// Don’t use “for each loop” or “delay”. Because they don’t know when your import finish or not. You have to create a custom loop and use .json as list. Json object count will be your loop bound.

And,  
create a delegate on your actor which contains loop.  
create an int32 variable as “Index\_USD”

After you import something, your USD container should trigger that delegate to start new import and increment Index\_USD by one. So, each of them will be imported with correct order.

---

<div class="post-metadata">

**Author:** ![Kunal\_Bhorodiya](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kunal\_Bhorodiya](https://forums.unrealengine.com/u/Kunal_Bhorodiya)\
**Post date:** [June 30, 2023, 8:46am UTC](https://forums.unrealengine.com/t/ue4-27-runtime-usd-import/487753/14 "2023-06-30T08:46:02Z")

</div>

Yes I create to Actor class.

Kindly have a look at these…

 ![Screenshot 2023-06-30 141434](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/6/f/86fb8e5ec44c17780638fc8773d0bb751397e6ed.png)  
 ![Screenshot 2023-06-30 141503](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/2/6/5266fe2b15f6b43b4610753c1179c44b6b15e6b4.png)

I’ll Consider your suggestion you said and try it again.

---

<div class="post-metadata">

**Author:** ![eray\_ozr](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@eray\_ozr](https://forums.unrealengine.com/u/eray_ozr)\
**Post date:** [June 30, 2023, 8:48am UTC](https://forums.unrealengine.com/t/ue4-27-runtime-usd-import/487753/15 "2023-06-30T08:48:20Z")

</div>

You got the idea. Just don’t use for each loop wirh delay and do as what I say about loops.

---

<div class="post-metadata">

**Author:** ![Kunal\_Bhorodiya](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kunal\_Bhorodiya](https://forums.unrealengine.com/u/Kunal_Bhorodiya)\
**Post date:** [June 30, 2023, 8:49am UTC](https://forums.unrealengine.com/t/ue4-27-runtime-usd-import/487753/16 "2023-06-30T08:49:51Z")

</div>

Cool I am working on it… Thanks Man 🙂

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [July 30, 2023, 8:50am UTC](https://forums.unrealengine.com/t/ue4-27-runtime-usd-import/487753/17 "2023-07-30T08:50:27Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
