Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

3ds max object to opengl

Tags:

opengl

3dsmax

I am trying to assemble a scene in opengl, using already made objects. The problem is that the object are in .max format and have no external textures. How could I import my objects in opengl, without retexturing them. I am thinking about exporting them to 3ds and using a 3ds file loader. Could you recommend one, and of course it has to work only with the 3ds file itself, no external texture files.


3ds max already allows me to export the file to obj. I have an object that has no external texture file, but it is already fully colored as a 3ds file. Is there any way to import in opengl and have the same colors, for the trunk, leaves?

like image 880
kjv Avatar asked Jan 07 '09 19:01

kjv


3 Answers

You might want to check out lib3ds which will parse the 3ds binary format for you and give you access to all of the objects properties. I think Autodesk also has their own toolkit for doing this.

like image 102
Kevin Loney Avatar answered Nov 15 '22 09:11

Kevin Loney


You should look at this link. It is a 3DS viewer with source code that renders using OpenGL. The code is simple.

like image 44
Paulo Lopes Avatar answered Nov 15 '22 11:11

Paulo Lopes


Another option could be Assimp, an open source asset import library for C or C++, which seems like a pretty good way to get 3DS assets into an opengl program. It'd be especially useful if you want it for skeletal animations, and supports embedded textures. Though at this point, this answer may be less for you than it is for other people coming across this question.

like image 30
Doug Kavendek Avatar answered Nov 15 '22 11:11

Doug Kavendek