Search code examples
c#wpfwindowshelix-3d-toolkit

Unable to load .obj files with Helix Toolkit


I'm running into an issue where I can't load 3D .obj files into my test app. I get the following exception:

System.NotSupportedException: 'No imaging component suitable to complete this operation was found.'

COMException: The component cannot be found. (Exception from HRESULT: 0x88982F50)

The code being used is:

Model3DGroup combinedModel = new ObjReader().Read(@"C:\Users\User\Documents\obj\testObject.obj");

Something odd is that the following works fine for .stl files:

Model3DGroup combinedModel = new StLReader().Read(@"C:\Users\User\Documents\obj\testObject.stl");

I can't find any known issues like this, is there some kind of prerequisite that my system might be missing? Some kind of set up I need to to in the app itself that needs to be done?


Solution

  • For me, this issue appears to occur because of the associated .mtl file that goes with the .obj file.

    Moving the material file to a different directory allowed the object file to load properly. The next step will be to figure out why the material file isn't working.