• Stars
    star
    186
  • Rank 207,316 (Top 5 %)
  • Language
    C
  • License
    Apache License 2.0
  • Created almost 8 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

๐ŸŽจ Modern 2D/3D - Importer โ€ข Exporter โ€ข Util - Library, also known as (AssetIO)


C/C++ CI CMake MSBuild Codacy Badge Coverage Status glTF Badge

Patreon: Become a patron Sponsors on Open Collective Backers on Open Collective


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) and rays (Path/Ray Tracer) which can render AssetKit contents. You can see how to load AssetKit to Graphics Kernel in 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
  • 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)
  • 3MF (in progress)
  • FBX (License?, probably need to download FBX SDK externally)
  • USD and friends (License?)
  • Alembic (License?)
  • Draco
  • X3D
  • 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
  • Cmake support
  • Tests

๐Ÿ”จ Build

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)

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:

$ 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

Contributors

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

Backers

Thank you to all our backers! ๐Ÿ™ [Become a backer]

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]

Trademarks

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

More Repositories

1

cglm

๐Ÿ“ฝ Highly Optimized 2D / 3D Graphics Math (glm) for C
C
2,271
star
2

cmt

๐ŸŽฎ C Bindings/Wrappers for Apple's METAL framework
C
168
star
3

gkern

๐ŸŽฅ Graphics Kernel: flexible, highly configurable, extensible render engine (realtime + offline)
C
98
star
4

ds

๐Ÿ”— Common Data Structures and Algorithms
C
50
star
5

tm

timers and timeline
C
40
star
6

gpu

๐Ÿ”ญ cross platform general purpose GPU library - optimized for rendering
C
31
star
7

json

๐Ÿ”‹ In-place lightweight JSON parser
C
25
star
8

im

๐Ÿ“ท image loader library for fast load images especially for rendering and image analysis (In Progress)
C
10
star
9

phy

physics engine written in C
C
10
star
10

simple-collada-viewer

A simple viewer to show how to use AssetKit, libgk, assetkit-gl and cglm libraries (with screenshot)
C
6
star
11

libsig

Signal/Event handling lib for C/C++
C++
5
star
12

mathkit

C vector, matrix library (including 3d, opengl math)
C
5
star
13

rays

Physically-based path tracer for production rendering (may include fast ray tracer as altnative render path)
C
5
star
14

assetkit-gl

Bridge library for loading AssetKit to libgk
C
4
star
15

filt

Image Filter
C
3
star
16

asset-xchange

new file format to store 2d/3d assets for game and films
3
star
17

http

http parser and utility
C
2
star
18

ui

๐Ÿ–ฑ user interface library top of GPU (OpenGL/Metal/Vulkan...)
Objective-C
2
star
19

libui

Cross platform user interface (including graphics) library for C++
C++
1
star
20

netutils

Network Utils for C/C++
C
1
star
21

sample-models

3D sample models for loaders (AssetKit) for testing purpose
1
star
22

Qt-Dispatch

C++
1
star