masscry / ngx

This is pet project, main idea is to develop several solutions for common task appearing in indie game development. Tools are built with crossplatform in mind.
MIT License
0 stars 0 forks source link

3D models #5

Open masscry opened 7 years ago

masscry commented 7 years ago

Load 3D models

masscry commented 7 years ago

Firstly, we need obj converter. Converter reads obj file and builds buffer object, which later is saved in binary

masscry commented 7 years ago

Add sample model in d8e2a1d303834008cc31cf9bcb7ee31e751e9e1a

masscry commented 7 years ago

*.nmd - Ngx MoDel format.

Header: 0x00...0x01: Magic inner number 2 (Model file) 0x02...0x03: Number of vertecies 0x04...0xNNNN: vertex data ( x, y, z, u, v, nx, ny, nz )

share/obj2nmd.py - script to convert obj models to nmd format.

masscry commented 7 years ago

bin/ngx now can load nmd models and show them, if provided with filename.

masscry commented 7 years ago

When exporting from blender, triangulate face checkbox must be set.