https://github.com/assimp/assimp2json
JSON exporter for Open Asset Import Library to make 3D models accessible from JS/WebGl
https://github.com/assimp/assimp2json
Last synced: about 1 year ago
JSON representation
JSON exporter for Open Asset Import Library to make 3D models accessible from JS/WebGl
- Host: GitHub
- URL: https://github.com/assimp/assimp2json
- Owner: assimp
- License: other
- Archived: true
- Fork: true (acgessler/assimp2json)
- Created: 2013-06-22T16:19:11.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2013-10-11T14:57:42.000Z (over 12 years ago)
- Last Synced: 2024-11-07T02:36:48.251Z (over 1 year ago)
- Language: C++
- Homepage: http://assimp.sf.net
- Size: 1.22 MB
- Stars: 16
- Watchers: 9
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
Awesome Lists containing this project
README
assimp2json
========
#### JSON exporter for Open Asset Import Library ####
Convert files in 40+ 3D file formats, including __Collada, 3DS, OBJ, LWO, FBX, Blender, X, STL, PLY, MS3D, B3D, MD3, MDL, DXF__ and __IFC__ to plain `json`.
[__Download Windows binaries here__.](https://github.com/acgessler/assimp2json/releases) (_v2.0, October 2013_)

### Introduction ###
`assimp2json` is a command line tool designed to expose the import capabilities of `assimp`, the [Open Asset Import Library](http://assimp.sourceforge.net) to WebGl developers. The tool takes a single 3d model as input file, imports it using `assimp` and converts the result to `json`.
`assimp2json` is platform-independent, its only dependency is `assimp` itself.
### Output Format ###
The output format is a one-by-one translation of [Assimp's C datastructure](http://assimp.sourceforge.net/lib_html/structai_scene.html) , with a few changes to make the resulting `json` look more natural. All fields are lower-case and the prefixes (such as m, pc, ..) are omitted. Array lengths are not written as this information is implicitly given. Empty arrays are not written at all, i.e. a node without children doesn't have an empty `children:[]` field.
The `/samples` folder contains some sample `json` files.
### Build ###
The build system for assimp2json is CMake. To build, use either the CMake GUI or the CMake command line utility. __Note__: make sure you pulled the `assimp` submodule, i.e. with `git submodule init && git submodule update`
### Usage ###
```
$ assimp2json [flags] input_file [output_file]
```
(omit the `output_file` argument to get the `json` string on stdout)
Invoke `assimp2json` with no arguments for detailed information.