Removing a Datasmith file from UE4 - Deleting 5,000 to 10,000 scene actors takes a long.... time

I have a datasmith file in my project that I need removed. My process has been to select the actors in the scene and delete them, then delete the folder in the Content Browser. This is currently taking over an hour during which UE4 locks up completely as it goes through the various steps. Is this just part of working with Unreal, or is there a better way I’m not aware of?

For reference, this is a 3 story building created in Revit.

And oddly enough, only takes about 12 minutes to light bake this scene which means exporting that same number of objects to Swarm, baking, and returning to the engine.

2 Likes

Alright, me again. In case anyone has this same issue,I think I have a good workaround if you have to remove a massive Datasmith object from your project.

Open Max again and export only a single object, saving over the original DS file. In Unreal, re-import this which updates your scene instantly. Now delete the single object and the datasmith root node in the World Outliner. Now save and close UE4. Delete the DS folder manually in Windows explorer which only takes a few seconds. Re-open UE4 and you should be good to go. This might take 5 or so minutes, but is much better than the glacial pace of deleting large numbers of objects in the editor. If you get errors about UE4 failing to load those deleted objects you may need to bake again to clear up any references to the missing meshes.

The delete command in unreal is performing reference checks that can take long. That said, the introduction of Datasmith to unreal exposes workflows or conditions that never got considered before in the context of game development which we have to take a look at :slight_smile:

My workaround for this problem is to make a separate level for each datasmith import, and then use level streaming to bring each level into a master level. Then, if I want to delete the entire datasmith import, I can remove that level from level streaming, close unreal, and delete the level and folder in windows explorer (NOT in Unreal). As long as there are no references to the imported assets in any other level, unreal will be perfectly happy when you reopen the project.

It’s not a perfect solution, as it can lead to a lot of streaming levels, and only works if I want to delete the entire import. I tend to only do it for large datasmith imports in early design phases.

Absolutely, it’s almost the antithesis of how game engines are designed (careful, efficient use of assets VS massive dump of thousands of objects from Revit). Definitely appreciate the difficulty of the work you guys are doing.

@cwm8d Could you take a look at the thread below and let me know if you’re having this same issue? I was splitting them up per level for the same reasons you mentioned, but it seems to break the re-import workflow for me. Do you have this same issue?

https://forums.unrealengine.com/unreal-engine/unreal-studio/1541619-datasmith-updates-not-working-if-datasmith-file-was-imported-to-any-level-besides-the-main

I have found the re-import feature unreliable for Rhino files, so to be honest I haven’t been using it. It might be because of this exact problem, but I never spent the time to carefully diagnose it (and haven’t yet tested the newest release with 4.21, so maybe it’s better). Deleting and importing a fresh copy has been ‘good enough’ so far I guess.

But once you start appling materials in UE4, setting custom lightmap or collision settings, all of this gets blown away. So we do need the re-import workflow to be airtight and stupidly simple eventually.

We agree. We might have to go a different route with Rhino to get there. There are some limitations on the tech we use for Rhino.