PDA

View Full Version : import model to OpenGL project



HiMyNameIs
01-23-2013, 05:52 PM
I'm a green hand.And I want to know how to import 3D models from *.max file to my OpenGL project?Kindly help me.

hlewin
01-24-2013, 03:40 PM
I see black. .max is a proprietary file-format which makes it pretty difficult to use in other applications.
You'll have to export something from max that is more readable for others, preferrably something where you already
have a library that takes care of importing and managing the models: OpenGL does not define any mesh or model-structures.
Alternatively you can write your own modelling-stuff for GL and write an export-plugin for Max.

HiMyNameIs
01-24-2013, 07:27 PM
I see black. .max is a proprietary file-format which makes it pretty difficult to use in other applications.
You'll have to export something from max that is more readable for others, preferrably something where you already
have a library that takes care of importing and managing the models: OpenGL does not define any mesh or model-structures.
Alternatively you can write your own modelling-stuff for GL and write an export-plugin for Max.

Thank you.So I should try to know what's the storage structure of .max file.And use library to extract vertexs position and design my structure for OpenGL to use.Is that right?

hlewin
01-24-2013, 11:22 PM
If you manage to do so. I googled a while ago for a .max-importer for Milkshape without success. I take this as a sign of that not being too easy. The file-Format may Change with the max-versions if you're unlucky. If you have Access to 3d-studio or the Artist exporting the models in the ASCII-Format would make figuring things out much more easy. If you are to try to Import the binaries, maybe a look on some ASCII-exports and/or an importer for those might make things easier.
I do not quite know what your question is aiming on: You would Need to figure out how .max-files are organized, yes. Such things can, as said, be quite tedious. If you manage to do so, you would some auxillary libraries to manage Image loading for textures and maybe some math-library to handle the Import of animation-keyframes etc. (I do not really know how those are stored in .max).
That's the importer-side of things.
You will, of course, Need to define data-structures to use throughout your Project to deal with meshes, textures, keyframes and so on. OpenGL does not define anything directly usable.

HiMyNameIs
01-25-2013, 03:44 AM
If you manage to do so. I googled a while ago for a .max-importer for Milkshape without success. I take this as a sign of that not being too easy. The file-Format may Change with the max-versions if you're unlucky. If you have Access to 3d-studio or the Artist exporting the models in the ASCII-Format would make figuring things out much more easy. If you are to try to Import the binaries, maybe a look on some ASCII-exports and/or an importer for those might make things easier.
I do not quite know what your question is aiming on: You would Need to figure out how .max-files are organized, yes. Such things can, as said, be quite tedious. If you manage to do so, you would some auxillary libraries to manage Image loading for textures and maybe some math-library to handle the Import of animation-keyframes etc. (I do not really know how those are stored in .max).
That's the importer-side of things.
You will, of course, Need to define data-structures to use throughout your Project to deal with meshes, textures, keyframes and so on. OpenGL does not define anything directly usable.

Thanks for hlewin's answer.And i have known the things I should learn after reading the answer.That helps alot.

Dark Photon
01-25-2013, 04:26 AM
I see black. .max is a proprietary file-format which makes it pretty difficult to use in other applications. You'll have to export something from max that is more readable for others, preferrably something where you already have a library that takes care of importing and managing the models

One such library you might consider is Assimp (http://assimp.sourceforge.net/). Here's the list of supported input formats (http://assimp.sourceforge.net/main_features_formats.html).

HiMyNameIs
01-26-2013, 03:13 PM
One such library you might consider is Assimp (http://assimp.sourceforge.net/). Here's the list of supported input formats (http://assimp.sourceforge.net/main_features_formats.html).

Thanks,that helps a lot!:D