assimp README

The project's README from github.com/assimp/assimp. As one markdown file: README.md.

Open Asset Import Library (assimp)

Open Asset Import Library is a library that loads various 3D file formats into a shared, in-memory format. It supports more than 40 file formats for import and a growing selection of file formats for export.

Current project status

C/C++ CI Codacy Badge Quality Gate Status Average time to resolve an issue Percentage of issues still open Gurubase Financial Contributors on Open Collective

Star History

Star History Chart APIs are provided for C and C++. Various bindings exist to other languages (C#, Java, Python, Delphi, D). Assimp also runs on Android and iOS. Additionally, assimp features various mesh post-processing tools: normals and tangent space generation, triangulation, vertex cache locality optimization, removal of degenerate primitives and duplicate vertices, sorting by primitive type, merging of redundant materials and many more.

Project activity

Alt

Developer quickstart

git clone https://github.com/assimp/assimp
cd assimp
cmake -G Ninja -DASSIMP_BUILD_TESTS=off -DASSIMP_INSTALL=off -S . -B build
cd build
ninja

Documentation

Read our latest documentation.

Pre-built binaries

Download binaries from our Itch Projectspace.

Test data

Clone our model database for testing purposes.

Communities

Supported file formats

See the complete list of supported formats.

Building

Start by reading our build instructions. We are available in vcpkg, and our build system is CMake; if you used CMake before there is a good chance you know what to do.

Ports

Other tools

Qt5-ModelViewer is a powerful viewer based on Qt5 and Assimp's import and export abilities.
Assimp-Viewer is an experimental implementation for an Asset-Viewer based on ImGUI and Assimp (experimental).

Repository structure

Open Asset Import Library is implemented in C++. The directory structure looks like this:

code				Source code
├── AssetLib/		The asset-importer and exporter lib
├── CApi/			C-API files
├── Common/			Common code used from all modules
├── Geometry/		Geometry utilities
├── Material/		Common materials
├── Pbrt/			Physical based materials
├── PostProcessing/	Post-processing steps
├── res				Resouce files
contrib				Third-party libraries
doc					Documentation (Doxygen source and pre-compiled docs)
fuzz       			Contains the test code for the Google Fuzzer project
include				Public header C and C++ header files
scripts 			Scripts are used to generate the loading code for some formats
port				Ports to other languages and scripts to maintain those.
test				Unit- and regression tests, test suite of models
├── headercheck		Implements headerchecks
├── models-nonbsd	Non-BSP licensed headers
├── models			BSP-licensed models
├── unit			Unit tests
tools				Tools (old assimp viewer, command line `assimp`)
samples				Small number of samples to illustrate possible use cases for Assimp

Contributing

We would greatly appreciate for you to contribute to assimp. The easiest way to get involved is to submit a pull request with your changes against the main repository's master branch.

Contributors

Code Contributors

This project exists thanks to all the people who contribute. [Contribute].

Financial Contributors

Become a financial contributor and help us sustain our community. [Contribute]

Individuals

Organizations

You can support the project with your organization. Your logo will show up here with a link to your website. [Contribute]

License

Our license is based on the modified, 3-clause BSD-License.

An informal summary is: do whatever you want, but include Assimp's license text with your product - and don't sue us if our code doesn't work. Note that, unlike LGPLed code, you may link statically to Assimp. For the legal details, see the LICENSE file.

assimp (assimp/assimp)

Searching Database…

13.3K ·GitHub
这是什么?Open Asset Import Library(assimp)——一个 C++ 库,能把 40 多种 3D 文件格式加载到同一套内存数据结构里,还带有后处理工具,在导入过程中帮你清理网格数据。
它是要链接到我代码里的库,还是一个现成的模型查看器?它是一个库,不是应用程序:它提供 C 和 C++ 接口,供你自己的程序调用。你可能听说过的那些查看器(Qt5-ModelViewer、Assimp-Viewer)都是基于它另外开发的独立项目。
我怎么获取它并接入到我的项目里?可以用它的 CMake 构建系统自己编译,也可以通过 vcpkg 引入;项目在 Itch 页面上还提供预编译好的二进制文件供下载。
它能把 3D 文件写回去,还是只能读取?它能读取 40 多种格式,但只能写出其中较少且不断扩充的一部分,所以不保证能把文件保存回你当初加载时所用的格式。
我不是在自研引擎,用它还有价值吗?它主要服务于游戏和 3D 应用开发者,这类人否则就得自己手工解析 FBX、glTF 或 Collada;针对使用现成引擎的人,也有 Unity 和 Unreal 插件以及独立查看器可以覆盖。
它能在手机上运行吗,还是只支持桌面端?README 里说,除了用 CMake 构建的各桌面平台之外,assimp 也能在 Android 和 iOS 上运行。
我能把它打包进闭源的商业游戏里吗?可以。这份修改版三条款 BSD 许可证允许你随意使用,只要在产品中附带 Assimp 的许可证文本即可,而且明确允许静态链接。
我不是 C++ 开发者,还能用它吗?可以。除了原生的 C 和 C++ 接口之外,还有 C#、Java、Python、Delphi 和 D 的绑定,另外还有一些移植版和插件:Rust、完整的 JVM 移植版、Node.js(alpha 阶段),以及 Unity 3D 和 Unreal Engine 插件。
它只是解析文件,还是也会把模型修整好?它自带一系列后处理步骤:法线和切线空间生成、三角化、顶点缓存局部性优化、去除退化图元和重复顶点,以及合并冗余材质。
它到底支持哪些 3D 格式?导入支持 40 多种——包括 FBX、Collada、glTF 2、STL、3MF 和 IFC 等——导出格式则较少,且在不断增加。
有没有测试数据可以让我拿来试试?有,项目单独维护了一个模型数据库仓库,里面是各种测试文件,你可以克隆下来,用真实素材来测试这个导入器。
Creator
assimp
Size
271.7 MB
Stars
13.3K
Age
16y
Commits · 90 Days