Skip to content

Obj 3D model file to C style header file converter

License

Notifications You must be signed in to change notification settings

ichlubna/obj2header

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Obj to C header converter

Converts the obj 3D model into a C header file including the model vertex data in the following format (not present attributes are omited):

struct ModelVertex {
float position[3];
float normal[3];
float uv[2];
};

struct ModelVertex const modelVertices[N] = {...
const unsigned int modelIndices[M] = {...

Vertex deduplication is performed so M >= N

Build

wget https://github.com/syoyo/tinyobjloader/raw/master/tiny_obj_loader.h
make

Usage

./obj2header input.obj output.h

About

Obj 3D model file to C style header file converter

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published