assimp库的使用-一个三维模型文件的格式转换库
参考:https://github.com/assimp/assimp
1. assimp(Open Asset Import Library)简介
Open Asset Import Library is a library to load 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.
Open Asset Import Library是一个将各种三维文件格式加载到共享内存格式中的库。它支持40多种文件格式的导入和越来越多的文件格式的导出选择。
APIs are provided for C and C++. There are various bindings 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.
为C和C++提供了API。有各种与其他语言(C#、Java、Python、Delphi、D)的bindings。Assimp也运行在Android和iOS上。此外,assimp还提供了各种网格后处理工具:法线和切线空间生成、三角测量、顶点缓存位置优化、删除退化基本体和重复顶点、按基本体类型排序、合并冗余材质等等。
2. 最新文档(Latest Doc's)
Please check the latest documents at Asset-Importer-Lib-Doc.
3. 预编译二进制文件(Prebuild binaries)
Please check our Itchi Projectspace
If you want to check our Model-Database, use the following repo: https://github.com/assimp/assimp-mdb
4.社区问答(Communities)
- Ask a question at The Assimp-Discussion Board
- Ask on Assimp-Community on Reddit
- Ask on StackOverflow with the assimp-tag.
- Nothing has worked? File a question or an issue-report at The Assimp-Issue Tracker
5.支持的文件格式(Supported file formats)
You can find the complete list of supported file-formats here
6.编译(Building)
Take a look into the https://github.com/assimp/assimp/blob/master/Build.md file. 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.
7.端口(Ports)
- Android
- Python
- .NET
- Pascal
- Javascript (Alpha)
- Javascript/Node.js Interface
- Unity 3d Plugin
- Unreal Engine Plugin
- JVM Full jvm port (current status)
- HAXE-Port The Assimp-HAXE-port.
- Rust
8.其它工具(Other tools)
open3mod is a powerful 3D model viewer based on Assimp's import and export abilities.
9.仓库结构(Repository structure)
Open Asset Import Library is implemented in C++. The directory structure looks like:
/code Source code /contrib Third-party libraries /doc Documentation (doxysource and pre-compiled docs) /fuzz Contains the test-code for the Google-Fuzzer project /include Public header C and C++ header files /scripts Scripts 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 /tools Tools (old assimp viewer, command line `assimp`) /samples A small number of samples to illustrate possible use-cases for Assimp
The source code is organized in the following way:
code/Common The base implementation for importers and the infrastructure code/CApi Special implementations which are only used for the C-API code/Geometry A collection of geometry tools code/Material The material system code/PBR An exporter for physical based models code/PostProcessing The post-processing steps code/AssetLib/<FormatName> Implementation for import and export for the format
10.贡献(Contributing)
Contributions to assimp are highly appreciated. The easiest way to get involved is to submit a pull request with your changes against the main repository's master
branch.
参考2:https://zhuanlan.zhihu.com/p/514558219
参考3:https://www.bilibili.com/video/BV1nT4y1v7QK/(assimp编译安装)
参考4:https://www.bilibili.com/video/BV1kL4y1P7W5/(assimp库的使用)