18 releases (4 stable)
|1.0.3||Apr 7, 2022|
|1.0.2||Mar 22, 2022|
|1.0.1||Nov 18, 2021|
|0.2.3||Jul 12, 2021|
|0.1.1||Dec 15, 2020|
#6 in Rendering
146 downloads per month
Used in frenderer
Rust bindings for Assimp (https://github.com/assimp/assimp)
Russimp is a library for talking to the assimp library which enables you to read 3d models in different formats to a common structure.
By default, russimp looks for the
assimp library on your computer. To install it:
- OSX: You will need to update Brew and install assimp with it.
- Linux: You will need to install assimp 5.1.0. I guess that ubuntu still has 5.0.1 on their repos. If that is the case then you can take a look at install_assimp.bash on how to install it manually.
- Windows: Still not supported since vcpkg still only offers assimp 5.0.1.
If you need bindings for version 5.0.1 just pickup a release before 1.0.0.
Alternately, you may prefer to use prebuilt assimp binaries or compile it yourself; in either case russimp will statically link assimp into your binary. Russimp exposes the following Cargo features to manage the assimp dependency (this documentation is reproduced from russimp-sys):
Assimp static library binaries from github and skip building from source.
Assimp build is slow and have build environment requirements. We provide prebuilt binaries for common platforms and features.
When a new version is released, github action automatically runs pre-build tasks, and all prebuilt binaries are saved in github releases.
russimp-sys build script will try to download the prebuilt binaries from github first, and skip the full source build.
static-link feature without
prebuilt feature will build
assimp from source.
Builds from source need the following dependencies:
- Ninja for Linux and MacOS, Visual Studio 2019 for Windows
russimp-sys will statically link zlibstatic, you can disable this feature if it conflicts with other dependencies.
russimp-sys links to
libstdc++ in linux and
libc++ in macos, turning this on
russimp-sys won't link to the c++ standard library.
If you want to help maintaining this package on windows or macos, please let me know. For windows support you can check the last PR related to it, https://github.com/jkvargas/russimp/pull/16.
You are very welcome to help with development, adding a feature, fixing a problem or just refactoring. Try to do it with tests =)
Make sure to run cargo fmt before creating a pull request.
Just call Scene::from_file with the filename and the flags you want. From the scene you will have access to the underlying structs.
let scene = Scene::from_file("myfile.blend", vec![PostProcess::CalcTangentSpace, PostProcess::Triangulate, PostProcess::JoinIdenticalVertices, PostProcess::SortByPType]).unwrap();
- colors vector inside the mesh turned into Vec<Option<Vec>>
prebuiltand other new Cargo features from russimp-sys
- PostProcessing typo, GenenerateUVCoords was changed to GenerateUVCoords.
- Builds based on 5.1.0 release