LinuxCommandLibrary

assimp

Convert various 3D model formats

TLDR

List all supported import formats

$ assimp listext
copy

List all supported export formats
$ assimp listexport
copy

Convert a file to one of the supported output formats, using the default parameters
$ assimp export [input_file.stl] [output_file.obj]
copy

Convert a file using custom parameters (the dox_cmd.h file in assimp's source code lists available parameters)
$ assimp export [input_file.stl] [output_file.obj] [parameters]
copy

Display a summary of a 3D file's contents
$ assimp info [path/to/file]
copy

Display help
$ assimp help
copy

Display help for a specific subcommand
$ assimp [subcommand] --help
copy

SYNOPSIS

assimp [options] <command> [<command-options>] [<infile>] [<outfile>]

PARAMETERS

-h, --help, -?
    Display global or command-specific help

-v, --version, -V
    Print assimp version information

--verbose
    Enable verbose logging output

export
    Export scene to specified output format/file

info
    Print basic model info: meshes, materials, animations

inspect
    Detailed inspection report with validation

simplify
    Reduce polygon count using progressive meshes

extract
    Extract embedded textures or scene data

optimize
    Optimize scene graph for better performance

view
    Launch simple OpenGL scene viewer (if built)

-f, --format-id <id>
    Force specific input/output format ID

-r, --register
    Register assimp file handlers (Windows)

-u, --unregister
    Unregister file handlers (Windows)

DESCRIPTION

The assimp command, part of the Open Asset Import Library, is a versatile library and toolset for loading, processing, and exporting 3D model data in numerous formats. It supports over 40 file formats including OBJ, FBX, glTF, COLLADA, STL, 3DS, and more, making it essential for 3D graphics workflows.

Primary uses include converting between formats (e.g., OBJ to glTF), inspecting scene hierarchies, materials, meshes, animations, and metadata; simplifying meshes for optimization; extracting embedded textures; and basic viewing. It's widely used in game development, CAD pipelines, web 3D, and asset preparation for engines like Unity or Unreal.

Assimp handles complex scenes with multiple objects, skeletons, and lights. Output formats are inferred from file extensions, but explicit specification is possible. Compilation flags determine viewer support or extra importers/exporters. Ideal for batch scripts and CI/CD integration, though large models may require significant memory.

CAVEATS

Format support varies; some importers/exporters are experimental or lossy (e.g., animations in FBX). Large scenes may consume high memory/CPU. Viewer requires Qt/OpenGL build. Always verify output with info. No stdin/stdout streaming.

SUPPORTED FORMATS

Import: OBJ, FBX, glTF/glb, DAE, STL, PLY, X, IFC, etc.
Export: Most imports + JSON, AMD, HMP. List via assimp info --formats.

EXAMPLES

assimp export cube.obj cube.fbx
assimp info scene.gltf
assimp simplify model.obj model-lowpoly.obj --target-faces 5000

HISTORY

Originated in 2006 by assimp developers; evolved into mature library (v5.4+ as of 2024) hosted on GitHub (assimp/assimp). Key milestones: multi-format support by 2010, glTF2 in 2018, Apple USDZ in 2020. Integral to tools like Blender, Godot.

SEE ALSO

convert(1), blender(1)

Copied to clipboard