Alembic Import Crash

Hello,

I am trying to import my own generated alembic file. As far as I can tell, it is a valid alembic geometry cache file. I have tried both static and geometry cache options but both of them result in crashes.

I have run abcecho and it outputs proper information for an Alembic file with no errors:

Object name=/default
  CompoundProperty name=.geom;schema=AbcGeom_PolyMesh_v1
    ScalarProperty name=.selfBnds;interpretation=box;datatype=float64_t[6];arraysize=6;numsamps=226
    ArrayProperty name=P;interpretation=point;datatype=float32_t[3];arraysize=790;numsamps=226
    ArrayProperty name=.faceIndices;interpretation=;datatype=int32_t;arraysize=4296;numsamps=226
    ArrayProperty name=.faceCounts;interpretation=;datatype=int32_t;arraysize=1432;numsamps=226
    ArrayProperty name=uv;interpretation=vector;datatype=float32_t[2];arraysize=790;numsamps=226
    ArrayProperty name=N;interpretation=normal;datatype=float32_t[3];arraysize=790;numsamps=226
    ScalarProperty name=.childBnds;interpretation=box;datatype=float64_t[6];arraysize=6;numsamps=226

Here is the stack trace when imported into UE4.13 which results in a hard crash:

UE4Editor_Core!FDebug::AssertFailed() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\core\private\misc\outputdevice.cpp:421]
UE4Editor_AlembicLibrary!FAbcImporter::GetMatrixSamplesForGUID()
UE4Editor_AlembicLibrary!FAbcImporter::CacheHierarchyTransforms()
UE4Editor_AlembicLibrary!FAbcImporter::ImportTrackData()
UE4Editor_AlembicImporter!UAlembicImportFactory::FactoryCreateBinary()
UE4Editor_UnrealEd!UFactory::FactoryCreateFile() [d:\build\++ue4+release-4.13+compile\sync\engine\source\editor\unrealed\private\factories\factory.cpp:72]
UE4Editor_UnrealEd!UFactory::ImportObject() [d:\build\++ue4+release-4.13+compile\sync\engine\source\editor\unrealed\private\factories\factory.cpp:143]
UE4Editor_AssetTools!FAssetTools::ImportAssets() [d:\build\++ue4+release-4.13+compile\sync\engine\source\developer\assettools\private\assettools.cpp:971]
UE4Editor_AssetTools!FAssetTools::ImportAssets() [d:\build\++ue4+release-4.13+compile\sync\engine\source\developer\assettools\private\assettools.cpp:571]
UE4Editor_ContentBrowser!SContentBrowser::ImportAsset() [d:\build\++ue4+release-4.13+compile\sync\engine\source\editor\contentbrowser\private\scontentbrowser.cpp:781]
UE4Editor_ContentBrowser!SContentBrowser::HandleImportClicked() [d:\build\++ue4+release-4.13+compile\sync\engine\source\editor\contentbrowser\private\scontentbrowser.cpp:772]
UE4Editor_ContentBrowser!TMemberFunctionCaller<SContentBrowser,FReply (__cdecl SContentBrowser::*)(void) __ptr64>::operator()<>() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\core\public\delegates\delegateinstanceinterface.h:161]
UE4Editor_ContentBrowser!TTupleImpl<TIntegerSequence<unsigned int> >::ApplyAfter<TMemberFunctionCaller<SContentBrowser,FReply (__cdecl SContentBrowser::*)(void) __ptr64> >() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\core\public\delegates\tuple.h:115]
UE4Editor_ContentBrowser!TBaseSPMethodDelegateInstance<0,SContentBrowser,0,FReply __cdecl(void)>::Execute() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\core\public\delegates\delegateinstancesimpl.h:317]
UE4Editor_Slate!TBaseDelegate<FReply>::Execute() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\core\public\delegates\delegatesignatureimpl.inl:521]
UE4Editor_Slate!SButton::OnMouseButtonUp() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\slate\private\widgets\input\sbutton.cpp:278]
UE4Editor_Slate!<lambda_8d0e9a1da76abd0a756a3a9d775f5ed1>::operator()() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:4901]
UE4Editor_Slate!FEventRouter::Route<FReply,FEventRouter::FToLeafmostPolicy,FPointerEvent,<lambda_8d0e9a1da76abd0a756a3a9d775f5ed1> >() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:215]
UE4Editor_Slate!FSlateApplication::RoutePointerUpEvent() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:4890]
UE4Editor_Slate!FSlateApplication::ProcessMouseButtonUpEvent() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:5348]
UE4Editor_Slate!FSlateApplication::OnMouseUp() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:5328]
UE4Editor_Core!FWindowsApplication::ProcessDeferredMessage() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\core\private\windows\windowsapplication.cpp:1584]
UE4Editor_Core!FWindowsApplication::DeferMessage() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\core\private\windows\windowsapplication.cpp:1930]
UE4Editor_Core!FWindowsApplication::ProcessMessage() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\core\private\windows\windowsapplication.cpp:747]
UE4Editor_Core!FWindowsApplication::AppWndProc() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\core\private\windows\windowsapplication.cpp:669]
user32
user32
UE4Editor_Core!FWindowsPlatformMisc::PumpMessages() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\core\private\windows\windowsplatformmisc.cpp:905]
UE4Editor!FEngineLoop::Tick() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\launch\private\launchengineloop.cpp:2788]
UE4Editor!GuardedMain() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\launch\private\launch.cpp:156]
UE4Editor!GuardedMainWrapper() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:126]
UE4Editor!WinMain() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:202]
UE4Editor!__scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:264]
kernel32
ntdll

Hi kestrelm.

Would you be willing to share this import file with us, or another test file that also experiences the crash? If we can reproduce the issue with a test asset, then we are likely to be able to resolve it quicker.

Thanks

Hello,

Here is the file:

In terms of data written into it, my code writes: uvs, normals, points, indices and faces ( which are all triangles ) per sample.

Let me know if i need to change the way I am writing my data, I am using the standard Alembic library to write out the alembic file.

Thanks

Hi Kestrelm,

I’ve created a ticket for this crash that you can track here: Unreal Engine Issues and Bug Tracker (UE-35551)

I did find that I could make sure your file work by importing it into 3Ds Max and exporting it as Alembic again with all the frames (6750), where as your test asset when imported into UE4 it would only recognize the first 226 samples. I see this is in your first part of your post as well. Not sure if there is a specific reason you had this even though you had more frames.

Regardless, when I export from Max again and specify any range of frames whether it’s 0-6750 or 0-250 things work as I would expect and import fine into 4.13 and our latest internal build. That may be something worth checking on your end to make sure there wasn’t an error there.

The other thing is the test asset only clocks in at 2.10mb but when export all frames I get around 62mb in size. Again, not sure what your full intentions here were, but something seems like it didn’t save correctly with the asset.

-Tim

Hello,

I managed to resolve the issue on my end, but you might want to read my writeup:

Update: I also managed to make it run in your experimental geometry cache mode. So it animates just fine!

With more debugging and looking at your UE4 Alembic loader code:
https://github.com/EpicGames/UnrealTournament/blob/89cfe56b19e0030d30cf202fd28f12cb86cc772d/Engine/Plugins/Experimental/AlembicImporter/Source/AlembicLibrary/Private/AbcImporter.cpp

I think the issue is the FAbcImporter class expects transforms to be present for any imported piece of data. This is probably the result of the assertion crash.

My exported polymesh samples did not contain xform matrix values. So I modified it to do this instead:

Per sample:

  1. Create an identity OXform as root

  2. Create the OPolyMesh parented under the OXform

Once I did that it ran and loaded in static mesh mode correctly. You might want to modify the FAbcImported code to deal with alembic files that do not contain a root transform ( if they are pure point caches a root transform probably isn’t required data). Or at least complain and return it as an invalid file with the proper warnings.

Cheers

Thanks! I’ll add the notes to the ticket.

Hello,

Thanks for the very prompt follow up! I can’t access your ticket link above. Can you add me to it?

Thanks!

It should work for you now. Earlier when I flagged it for public the backend system was restarting which delayed it for a while.

Also, the notes from your last post that I added are in a private comment on the ticket so don’t be alarmed if you don’t see them in the main description body.

Hey guys can you maybe direct me on how I would go about getting the alembic cache to come into ue4 correctly? I’m getting the crash as well on the Geocache import… Is there something I can do on my end or do I have to wait for an update? The cache importer works fine for a simple ncloth plane and sphere collider (maya) but with any kind of character with a skeleton it crashes.

Please post as a separate question. Thanks