3ds max object to opengl
Asked Answered
B

4

6

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?

Biamonte answered 7/1, 2009 at 19:2 Comment(0)
L
8

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.

Louth answered 7/1, 2009 at 19:6 Comment(0)
H
5

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

Hoplite answered 7/1, 2009 at 20:28 Comment(0)
S
5

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.

Schilit answered 4/5, 2013 at 2:39 Comment(0)
K
1

If I remember correctly, the 3ds file does not store the vertex normals so you will probably have to calculate them yourself somehow or otherwise it will use the normal of the face itself which is will be quite ugly.

Kendall answered 7/1, 2009 at 20:30 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.