Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/recp/assetkit
π¨ Modern 2D/3D - Importer β’ Exporter β’ Util - Library, also known as (AssetIO)
https://github.com/recp/assetkit
3d 3d-asset 3d-engine 3d-exporter 3d-graphics 3d-importer 3d-loader 3d-models animation collada coords-sys dae gltf material mesh mesh-import mesh-normals polygons texture triangulate-polygons
Last synced: 20 days ago
JSON representation
π¨ Modern 2D/3D - Importer β’ Exporter β’ Util - Library, also known as (AssetIO)
- Host: GitHub
- URL: https://github.com/recp/assetkit
- Owner: recp
- License: apache-2.0
- Created: 2017-02-04T11:40:00.000Z (almost 8 years ago)
- Default Branch: main
- Last Pushed: 2024-09-04T21:48:44.000Z (2 months ago)
- Last Synced: 2024-10-15T10:49:16.572Z (about 1 month ago)
- Topics: 3d, 3d-asset, 3d-engine, 3d-exporter, 3d-graphics, 3d-importer, 3d-loader, 3d-models, animation, collada, coords-sys, dae, gltf, material, mesh, mesh-import, mesh-normals, polygons, texture, triangulate-polygons
- Language: C
- Homepage:
- Size: 3.11 MB
- Stars: 187
- Watchers: 14
- Forks: 18
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
Brand-new modern 3D asset importer, exporter library. This library will include common 3D utils funcs. It is written with C99 but C++ wrappers or other language bindings can be written in the future.This library will try to full support COLLADA specs and glTF specs, plus well-known other 3D formats e.g .obj, .stl, .ply...
π There is also an optional renderer library called [Graphics Kernel (Realtime Rendering)](https://github.com/recp/libgk) and [rays (Path/Ray Tracer)](https://github.com/recp/rays) which can render **AssetKit** contents. You can see how to load **AssetKit** to [Graphics Kernel](https://github.com/recp/libgk) in [AssetKit-GL](https://github.com/recp/assetkit-gl) repo. Both renderers and documentation with samples will be updated regularly...
#### π Documentation (In Progress)
Almost all functions (inline versions) and parameters will be documented inside the corresponding headers.
Complete documentation: http://assetkit.readthedocs.io## πͺ Supported Formats
* [ ] Asset Exchange (todo) http://github.com/AssetExchange/spec
* [x] COLLADA 1.4 and COLLADA 1.4.1
* [x] COLLADA 1.5
* [x] glTF 2.0 (Embedded or Separated (.gltf), Binary (.glb), Extensions...)
* [x] Wavefront Obj (.obj + .mtl)
* [x] STL (ASCII, Binary)
* [x] PLY (ASCII, Binary)
* [ ] 3MF (in progress)
* [ ] FBX (License?, probably need to download FBX SDK externally)
* [ ] USD and friends (License?)
* [ ] Alembic (License?)
* [ ] Draco
* [ ] X3D
* [x] in progress for next...
* [ ] Exporter## π Features
- Single interface for glTF 2.0 (with extensions), COLLADA 1.4/1.4.1/1.5, Wavefront Obj and others...
- Very very small and very fast library
- Javascript-like API to get URL or ID `obj = ak_getObjectById(doc, objectId)`...
- Options to Generate Mesh Normals *(Default: enabled)*
- Option to Triangulate Polygons *(Default: enabled)*
- Option to change Coordinate System *(Default: enabled)*
- Option to calculate Bounding Boxes *(Default: enabled)*
- Unique and Flexible Coordinate System
- Support multiple coordinate system
- Can convert any coordinate system to another with adding transform or with changing transform, vertex data...
- Unique and Flexible Memory Management System
- Hierarchical unique memory management
- When a node is freed then all sub memories will be freed
- COLLADA's **sid** and **ID** values are mapped to memory nodes itself to reduce memory size and make it easy to manage things.
- Allow attach ID, sid or user data to a memory node
- Object-based Asset support; resolve asset element for any element
- Bugfix some DAE files
- Will be optimized to be fastest, smallest and most flexible, extendible Asset loader.
- Uses **mmap** to load files, you can disable this if needed
- [ ] Documentation
- [x] Cmake support
- [ ] Tests## π¨ Build
### CMake (All platforms)
```bash
$ mkdir build
$ cd build
$ cmake .. # [Optional] -DAK_SHARED=ON
$ make
$ sudo make install # [Optional]
```##### Cmake options with Defaults:
```CMake
option(AK_SHARED "Shared build" ON)
option(AK_STATIC "Static build" OFF)
option(AK_USE_TEST "Enable Tests" OFF) #Β for make check - make test
```#### Use with your CMake project
* Example:
```cmake
cmake_minimum_required(VERSION 3.8.2)project()
add_executable(${PROJECT_NAME} src/main.c)
target_link_libraries(${LIBRARY_NAME} PRIVATE assetkit)add_subdirectory(external/assetkit/)
# or you can use find_package() to configure assetkit
```### Unix (Autotools)
Step 1: First you should build dependencies, do this only once:
```bash
$ sh ./build-deps.sh
```Step 2: Build, Test and Install AssetKit
```bash
$ sh autogen.sh
$ ./configure
$ make
$ make check
$ [sudo] make install
```Step 3: Change install name if required, after make finished make automaticall runs `sh ./post-build.sh` script. It changes install names. You may want to edit build scripts and `post-build.sh` script if you want to build AssetKit with existing libraries. Default behavior is that AssetKit will look up sub libraries inside `.libs` folder, if you only need to change `.libs` name then change it in `post-build.sh` script file.
### Windows (MSBuild)
Windows related build files, project files are located in `win` folder, make sure you are inside `assetkit/win` folder. Code Analysis are enabled to it may take awhile to build`git` and `python` commands should be installed/accessible.
```Powershell
$ cd win
$ .\build.bat
$Β msbuild assetkit.vcxproj /p:Configuration=Release
```
if `msbuild` won't work correctly then try to build with `devenv`:
```Powershell
$ devenv assetkit.sln /Build Release
```## Contributors
This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].
## Backers
Thank you to all our backers! π [[Become a backer](https://opencollective.com/assetkit#backer)]
## Sponsors
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/assetkit#sponsor)]
### Trademarks
glTF and COLLADA and their logos are trademarks of Khronos Group.