Importing Pieces into OpenGL

Started by
1 comment, last by DDoS 11 years, 1 month ago

Hi,

I am trying to import chess pieces from 3dsmax to opengl. However, I am quite new to opengl and it has been a big challenge so far. Any help will be appreciated?

Pls and thank youunsure.png wacko.png

Advertisement

About the easiest file format to load, for which nearly every tool has an exporter is .obj.

Now the question is what .obj files look like and how to get the data in a format you can directly feed to opengl functions.

OpenGL prefers object data to be interleaved (meaning, you got one array containing the vertex information like this: position0, normal0, uv0, position1, normal1, uv1, ... or whatever other order and information you want), put into a vertex buffer object and addressed using indices in another vbo. I haven´t read it, but a good start on loading obj seems this tutorial: http://www.opengl-tutorial.org/beginners-tutorials/tutorial-7-model-loading/ the resulting data is not interleaved and indexed, as far as I could see, but it should give you a start to improve on.

you could use assimp :) supports alot of 3d formats
http://assimp.sourceforge.net/main_features_formats.html

as a beginner i'd recommend using non interleaved buffers, because you can get into troubles with offsets


those are my achievements from the last 2 weeks with learning opengl :)

">

This topic is closed to new replies.

Advertisement