Go to file
2015-10-20 09:50:37 -04:00
bin Support absolute paths 2015-10-19 18:13:29 -04:00
doc Updated readme 2015-10-18 23:51:01 -04:00
lib Support absolute paths 2015-10-19 18:13:29 -04:00
.gitignore Updated readme 2015-10-18 23:51:01 -04:00
LICENSE.md Updated readme 2015-10-18 23:51:01 -04:00
package.json Updated package.json 2015-10-19 12:11:13 -04:00
README.md Tweak README.md 2015-10-20 09:50:37 -04:00

OBJ2GLTF

Convert OBJ assets to glTF 1.0.

Getting Started

Install Node.js if you don't already have it, clone this repo, and then:

cd OBJ2GLTF
npm install

Run node bin/obj2gltf.js and pass it the path to an OBJ file.

Usage

###Command line flags:

Flag Description Required
-i Path to the input OBJ file. Yes
-o Directory or filename for the exported glTF file. No
-c Combine glTF resources, including images, into the exported glTF file. No, default false
-t Shading technique. Possible values are lambert, phong, blinn, and constant. The shading technique is typically determined by the MTL file, but this allows more explicit control. No
-h Display help No

###Examples:

node bin/obj2gltf.js model.obj

node bin/obj2gltf.js model.obj model.gltf

node bin/obj2gltf.js -i model.obj -o model.gltf

node bin/obj2gltf.js -i model.obj -o model.gltf -c -t phong

Limitations

This tool is still in development. We plan on adding additional features like gzip compression, binary glTF export, and a testing suite.

Contributions

Pull requests are appreciated. Please use the same Contributor License Agreement (CLA) used for Cesium.


Developed by the Cesium team.