Load 3D document with options

View as MarkdownMarkdown

Set up your AI agent

Give your coding agent live access to the GroupDocs documentation and API reference through the GroupDocs Docs MCP server — no install, no API key. Learn more

claude mcp add --transport http groupdocs-docs https://docs.groupdocs.com/mcp

Also process documents locally

The GroupDocs.Conversion MCP server lets your agent work with files on your machine; they are never uploaded. It needs the .NET 10 SDK or Docker.

claude mcp add groupdocs-conversion -- dnx GroupDocs.Conversion.Mcp --yes
Folders, licensing and more →

GroupDocs.Conversion provides ThreeDLoadOptions to control how source 3D model documents are processed. 3D documents include formats like FBX, OBJ, GLTF, 3DS, U3D, and other 3D modeling file formats.

The following options are available:

OptionDescription
FormatThe document type is auto-detected during loading, but you can explicitly specify the source format. Available options include: Fbx, ThreeDS, ThreeMF, Amf, Ase, Dae, Drc, Gltf, Obj, Ply, Rvm, U3d, Usd, Usdz, Vrml, X
ExternalResourceHandlerA handler called for each dependency the model asks to load; it can allow the dependency, skip it or supply its content. Default: null. Available since version 26.10.
SkipExternalResourcesWhether to skip dependencies outside the model’s own folder, such as material libraries, textures and external buffers. Default: true. Remote dependencies never load. Available since version 26.10.
WhitelistedResourcesfile: URI prefixes of local folders whose dependencies load while SkipExternalResources is true, such as file:///D:/models/materials/. Available since version 26.10.

A dependency that is not allowed is treated as missing. A model that cannot load without it, such as a glTF file whose external buffer is denied, fails to load. See 3D models.

Load FBX document

The following code snippet shows how to load an FBX (Filmbox) document with explicit format specification:

using GroupDocs.Conversion;
using GroupDocs.Conversion.FileTypes;
using GroupDocs.Conversion.Options.Convert;
using GroupDocs.Conversion.Options.Load;

Func<LoadContext, LoadOptions> getLoadOptions = loadContext => new ThreeDLoadOptions
{
    Format = ThreeDFileType.Fbx
};

using (Converter converter = new Converter("character-model.fbx", getLoadOptions))
{
    PdfConvertOptions options = new PdfConvertOptions();
    converter.Convert("character-model.pdf", options);
}

Load OBJ document

The following code snippet shows how to load an OBJ (Wavefront) document:

using GroupDocs.Conversion;
using GroupDocs.Conversion.FileTypes;
using GroupDocs.Conversion.Options.Convert;
using GroupDocs.Conversion.Options.Load;

Func<LoadContext, LoadOptions> getLoadOptions = loadContext => new ThreeDLoadOptions
{
    Format = ThreeDFileType.Obj
};

using (Converter converter = new Converter("building-model.obj", getLoadOptions))
{
    PdfConvertOptions options = new PdfConvertOptions();
    converter.Convert("building-model.pdf", options);
}

Convert FBX to OBJ

The following code snippet shows how to load an FBX document and convert it to OBJ format:

using GroupDocs.Conversion;
using GroupDocs.Conversion.FileTypes;
using GroupDocs.Conversion.Options.Convert;
using GroupDocs.Conversion.Options.Load;

Func<LoadContext, LoadOptions> getLoadOptions = loadContext => new ThreeDLoadOptions
{
    Format = ThreeDFileType.Fbx
};

using (Converter converter = new Converter("animated-scene.fbx", getLoadOptions))
{
    ThreeDConvertOptions options = new ThreeDConvertOptions
    {
        Format = ThreeDFileType.Obj
    };
    converter.Convert("animated-scene.obj", options);
}

Convert OBJ to GLTF

The following code snippet shows how to convert from OBJ to GLTF format:

using GroupDocs.Conversion;
using GroupDocs.Conversion.FileTypes;
using GroupDocs.Conversion.Options.Convert;
using GroupDocs.Conversion.Options.Load;

Func<LoadContext, LoadOptions> getLoadOptions = loadContext => new ThreeDLoadOptions
{
    Format = ThreeDFileType.Obj
};

using (Converter converter = new Converter("product-design.obj", getLoadOptions))
{
    ThreeDConvertOptions options = new ThreeDConvertOptions
    {
        Format = ThreeDFileType.Gltf
    };
    converter.Convert("product-design.gltf", options);
}

Convert FBX to U3D

The following code snippet shows how to convert from FBX to U3D (Universal 3D) format:

using GroupDocs.Conversion;
using GroupDocs.Conversion.FileTypes;
using GroupDocs.Conversion.Options.Convert;
using GroupDocs.Conversion.Options.Load;

Func<LoadContext, LoadOptions> getLoadOptions = loadContext => new ThreeDLoadOptions
{
    Format = ThreeDFileType.Fbx
};

using (Converter converter = new Converter("game-asset.fbx", getLoadOptions))
{
    ThreeDConvertOptions options = new ThreeDConvertOptions
    {
        Format = ThreeDFileType.U3d
    };
    converter.Convert("game-asset.u3d", options);
}