🎨 Modern 2D/3D - Importer • Exporter • Util - Library, also called (AssetIO)


Build Status Build Status Codacy Badge Coverage Status glTF Badge

Patreon: Become a patron

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 libgk for render AssetKit contents. You can see how to load AssetKit to libgk in assetkit-gl repo.

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
  • COLLADA 1.4 and COLLADA 1.4.1
  • COLLADA 1.5
  • glTF 2.0 (Embedded or Separated (.gltf), Binary (.glb), Extensions...)
  • Wavefront Obj (.obj + .mtl)
  • STL (ASCII, Binary)
  • PLY (ASCII, Binary)
  • USD and friends (License?)
  • Alembic (License?)
  • Draco
  • X3D
  • in progress for next...


  • 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
  • Cmake support
  • Tests


CMake (All platforms)

$ mkdir build
$ cd build
$ cmake .. # [Optional] -DAK_SHARED=ON
$ make
$ sudo make install # [Optional]
Cmake options with Defaults:
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_minimum_required(VERSION 3.8.2)

project(<Your Project Name>)

add_executable(${PROJECT_NAME} src/main.c)
target_link_libraries(${LIBRARY_NAME} PRIVATE assetkit)


# or you can use find_package() to configure assetkit

Unix (Autotools)

Step 1: First you should build dependencies, do this only once:

$ sh ./build-deps.sh

Step 2: Build, Test and Install AssetKit

$ 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.

$ cd win
$ .\build.bat
$ msbuild assetkit.vcxproj /p:Configuration=Release

if msbuild won't work correctly then try to build with devenv:

$ devenv assetkit.sln /Build Release


glTF and COLLADA and their logos are trademarks of Khronos Group.

  • Can't build library on linux

    Can't build library on linux

    I am running Garuda Linux

    I git clone the repository run cmake/automake as in the tutorial and i get compile errors after I run make.

    Consolidate compiler generated dependencies of target ds
    [  0%] Building C object deps/ds/CMakeFiles/ds.dir/src/util.c.o
    /home/snake/Desktop/AssetKit/deps/ds/src/util.c: In function ‘ds_print_i64’:
    /home/snake/Desktop/AssetKit/deps/ds/src/util.c:122:16: error: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘int64_t’ {aka ‘long int’} [-Werror=format=]
    122 |   printf("\t%llu\n", *(int64_t *)key);
    |             ~~~^     ~~~~~~~~~~~~~~~
    |                |     |
    |                |     int64_t {aka long int}
    |                long long unsigned int
    |             %lu
    /home/snake/Desktop/AssetKit/deps/ds/src/util.c: In function ‘ds_print_ui64’:
    /home/snake/Desktop/AssetKit/deps/ds/src/util.c:128:16: error: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘uint64_t’ {aka ‘long unsigned int’} [-Werror=format=]
    128 |   printf("\t%llu\n", *(uint64_t *)key);
    |             ~~~^     ~~~~~~~~~~~~~~~~
    |                |     |
    |                |     uint64_t {aka long unsigned int}
    |                long long unsigned int
    |             %lu
    cc1: all warnings being treated as errors
    make[2]: *** [deps/ds/CMakeFiles/ds.dir/build.make:104: deps/ds/CMakeFiles/ds.dir/src/util.c.o] Error 1
    make[1]: *** [CMakeFiles/Makefile2:672: deps/ds/CMakeFiles/ds.dir/all] Error 2
    make: *** [Makefile:156: all] Error 2

    If I try to hand fix these errors, a bunch of errors pop up, not just warning, but errors like AK_INLINE, AkFloat3 etc.

    build resolved 
    opened by eLeCtrOssSnake 46
  • Questions about specs

    Questions about specs

    1. Can every element (or every node) have different UP axis? Or one UP axis for entire document?
    2. Camera UP axis: https://forums.khronos.org/showthread.php/13262-COLLADA-1-5-Camera-Orientation
    3. Spotlight: https://github.com/KhronosGroup/glTF/issues/824
    help wanted question 
    opened by recp 13
  • How to compile this? getting error.

    How to compile this? getting error.

    I keep getting this error and have git and python both installed and to PATH....

    Annotation 2020-05-18 003148

    note I am not a developer or coding person, I just want to test this addon ....


    opened by Blenux 4
  • mesh_edit_mesh.c and mesh_edit_mesh_fixup.c are named wrongly

    mesh_edit_mesh.c and mesh_edit_mesh_fixup.c are named wrongly


    Should be mesh_edit_buff.c and mesh_edit_mesh_buff.c after this refactor commit.

    opened by ning-y 1
  • proposal: store joint and weights in mesh

    proposal: store joint and weights in mesh

    In the current design, we store joints and joint weights in skin object. But these data could be stored in mesh instead of skin like glTF design. In this way we could access joints and weights more easily. Render engines could load joints/weights more easily...

    opened by recp 1
  • loading images

    loading images

    Currently AssetKit uses stb_image to load images but maybe creating a separate library for images would be better and give more control for loading images.

    opened by recp 1
  • Make Converting Coord Sys Optional

    Make Converting Coord Sys Optional

    As default behavior, AssetKit tries convert document coordinate system to default coordinate system which is configurable option AK_OPT_COORD. But the problem is that viewer may not want involve to any coord-sys specific operation.

    Making this step optional will improve loading performance

    Default is Y_UP but with an option like ak_opt_set(AK_OPT_USE_DOC_COORD, true); loaded document's coord sys can be considered as default coord-sys e.g. if imported document is Z_UP default will be Z_UP and loader will skip converting coord-sys (geometries, transforms, cameras, lights...)

    AK_OPT_USE_DOC_COORD should not override AK_OPT_COORD option

    opened by recp 1
  • Figure out

    Figure out "Page build failure" warning/error

    The page build failed with the following error:

    The submodule registered for ./lib/libxml2 could not be cloned. Make sure it's using https:// and that it's a public repo. For more information, see https://help.github.com/articles/page-build-failed-invalid-submodule.

    For information on troubleshooting Jekyll see:


    If you have any questions you can contact us by replying to this email.

    NOTE: libxml2 submodule reference link starts with git:// not https://, also GitBook maybe used instead of Jekyll, not sure!

    opened by recp 1
  • Generate Normals

    Generate Normals

    If mesh doesn't contain normals then they must be generated if this option is not disabled.

    This is optional for users. Default behavior is generate normals if needed.

    opened by recp 1
  • fix parsing wavefront-obj (critical)

    fix parsing wavefront-obj (critical)

    Each vertex/normal/textcood now has unique id in wavefont-obj spec, it was separated for each object/group which was wrong in AssetKit. This is fixed now.

    opened by recp 0
  • submodule url for libxml2 is outdated

    submodule url for libxml2 is outdated

    See: https://mail.gnome.org/archives/desktop-devel-list/2018-August/msg00010.html ("git.gnome.org being discontinued: Thursday 23th of August")

    opened by ning-y 0
  • Android Support

    Android Support

    AssetKit must support Android JNI / NDK. Currently I couldn't build AssetKit for Android because of I couldn't build libxml2 for Android.

    Dropping some dependencies is an option to make it more build friendly, especially for Android.

    android build 
    opened by recp 0
  • v0.3.1(Aug 18, 2020)

    AssetKit now provides an option to read files with mmap (Windows also supported). This options is enabled as default. To disable mmap

    ak_opt_set(AK_OPT_USE_MMAP, false);

    New Features:

    • New Option: AK_OPT_USE_MMAP boolean, default is true.
    • Expose mmap api to usable externally
    • mmap-ed memories can be attached to a memory node, unmap will be called before memory node is free-ed
      • ak_mmap_rdonly(int fd, size_t size) - map file as READONLY
      • ak_unmap(void *file, size_t size)- unmap file
      • ak_mmap_attach(void *obj, void *mapped, size_t sized) - attach mmap to memory to unmap automatically
      • ak_unmmap_attached(void *obj) - unmap all attached mmap files

    Bugfixes and Improvements:

    • fix ak_strtok_count_fast for READONLY memory
    • util: remove modes from ak_readfile and make it "rb" globally
    • dae: fix writing READONLY memory
    • memory: fix URL memory extension
    • some other improvements
    Source code(tar.gz)
    Source code(zip)
  • v0.3.0(Aug 14, 2020)

    New Features:

    • AssetKit now supports PLY (both ASCII and Binary) files
    • endian helper to read binary data; use common endian header for all formats (endian.h)
    • documentation

    Bugfixes and Improvements:

    • wobj: fix loading wavefront object if there is no NORMAL (position + texture case)
    • wobj: improve switching between objects (use triangle object if the target is not poly)
    • wobj: join group and object separations
    • add new compare func for ivec3
    • wobj: group/separate primitives by usemtl: mesh primitives created for each usemtl, base buffers and accessors are shared between them
    • reuse postscript functions and files
    • use short names for input semantics; remove _SEMANTIC from enum constants
    • improve byte swap operations and make cross platform
    • rename _assetkit_hide macros to AK_HIDE
    • add common strpool to avoid duplications
    • stl: fix loading normals in Binary STL
    • dae: fix load skin controllers
    • dae: move controller postscripts to separate file
    • drop stb image, let user load images themselves
    • provide callbacks for loading images
    • move dependencies from lib/ folder to deps/
    • remove unused files, suppress warnings, update README
    • remove sample-model sub repo for tests
    Source code(tar.gz)
    Source code(zip)
  • v0.2.0(Jul 14, 2020)

  • v0.1.0(May 17, 2020)

Recep Aslantas
alone with numbers
Recep Aslantas
LibGizmo is a small, standalone library that adds a 3D matrix (4x4 floats) manipulation control called 'Gizmo'

LibGizmo is a small, standalone library that adds a 3D matrix (4x4 floats) manipulation control called 'Gizmo'

Cedric Guillemet 124 Jun 9, 2022
Modern C++14 library for the development of real-time graphical applications

CI Community Support bs::framework is a C++ library that aims to provide a unified foundation for the development of real-time graphical applications,

null 1.7k Jun 29, 2022
A modern cross-platform low-level graphics library and rendering framework

Diligent Engine A Modern Cross-Platform Low-Level 3D Graphics Library Diligent Engine is a lightweight cross-platform graphics API abstraction library

Diligent Graphics 2.4k Jun 29, 2022
Low Level Graphics Library (LLGL) is a thin abstraction layer for the modern graphics APIs OpenGL, Direct3D, Vulkan, and Metal

Low Level Graphics Library (LLGL) Documentation NOTE: This repository receives bug fixes only, but no major updates. Pull requests may still be accept

Lukas Hermanns 1.4k Jun 19, 2022
A library for high-performance, modern 2D graphics with SDL written in C.

SDL_gpu, a library for making hardware-accelerated 2D graphics easy. by Jonathan Dearborn SDL_gpu is licensed under the terms of the MIT License. See

Jonathan Dearborn 1k Jun 20, 2022
Open3D: A Modern Library for 3D Data Processing

Open3D is an open-source library that supports rapid development of software that deals with 3D data. The Open3D frontend exposes a set of carefully selected data structures and algorithms in both C++ and Python. The backend is highly optimized and is set up for parallelization. We welcome contributions from the open-source community.

Intel ISL (Intel Intelligent Systems Lab) 6.9k Jun 27, 2022
SoL (for Speed of Light, or sun in Spanish) is a Physically-based rendering library written in modern C++

SoL (for Speed of Light, or sun in Spanish) is a small rendering library written in C++20. Its goal is to strike a good balance between performance and usability, and allow easy experimentation for rendering researchers.

Arsène Pérard-Gayot 10 May 19, 2022
A modern C++ physically based renderer

The Dakku Renderer Warning: This project is currently under developing and does not guarantee any consistency. About Dakku is a physically based rende

xehoth 6 Apr 15, 2022
A modern, feature-rich single header C++ interface system for GLFW

A modern, feature-rich single header C++ interface system for GLFW

Vortex 3 Dec 27, 2021
Cross-platform, graphics API agnostic, "Bring Your Own Engine/Framework" style rendering library.

bgfx - Cross-platform rendering library GitHub Discussions Discord Chat What is it? Cross-platform, graphics API agnostic, "Bring Your Own Engine/Fram

Бранимир Караџић 11.8k Jul 2, 2022
A multi-platform library for OpenGL, OpenGL ES, Vulkan, window and input

GLFW Introduction GLFW is an Open Source, multi-platform library for OpenGL, OpenGL ES and Vulkan application development. It provides a simple, platf

GLFW 9.2k Jun 24, 2022
Antialiased 2D vector drawing library on top of OpenGL for UI and visualizations.

This project is not actively maintained. NanoVG NanoVG is small antialiased vector graphics rendering library for OpenGL. It has lean API modeled afte

Mikko Mononen 4.4k Jun 30, 2022
An Open-Source subdivision surface library.

OpenSubdiv OpenSubdiv is a set of open source libraries that implement high performance subdivision surface (subdiv) evaluation on massively parallel

Pixar Animation Studios 2.6k Jun 25, 2022
C++ (with python bindings) library for easily reading/writing/manipulating common animation particle formats such as PDB, BGEO, PTC. See the discussion group @ http://groups.google.com/group/partio-discuss

Partio - A library for particle IO and manipulation This is the initial source code release of partio a tool we used for particle reading/writing. It

Walt Disney Animation Studios 401 Jun 22, 2022
ANSI C library for NURBS, B-Splines, and Bézier curves with interfaces for C++, C#, D, Go, Java, Lua, Octave, PHP, Python, R, and Ruby.

TinySpline TinySpline is a small, yet powerful library for interpolating, transforming, and querying arbitrary NURBS, B-Splines, and Bézier curves. Th

Marcel Steinbeck 797 Jun 27, 2022
Epoxy is a library for handling OpenGL function pointer management for you

Epoxy is a library for handling OpenGL function pointer management for you. It hides the complexity of dlopen(), dlsym(), glXGetProcAddress(), eglGetP

Eric Anholt 545 Jun 27, 2022
Freecell Solver - a C library for automatically solving Freecell and some other variants of card Solitaire

The Freecell Solver Repository Root README Freecell Solver is an open source (distributed under the MIT/Expat licence) library, written in C, for atte

Shlomi Fish 49 Jun 24, 2022
A C math library targeted at games

Kazmath Kazmath is a simple 3D maths library written in C. It was initially coded for use in my book, Beginning OpenGL Game Programming - Second editi

Luke Benstead 502 May 25, 2022