View Full Version : loading Max files

08 August 2003, 12:57 PM
Can anyone out there show me a simple program ("hello world" comes to mind) that can load in a 3ds Max file?
All I am after is the basics.
Once that is done, to the load the same model, but with bones?
Any clues?

Thanks in advance

08 August 2003, 02:06 PM
You can't. The 3D Studio MAX file format is closed. Even as a registered developer, we don't have access to the file format. If you want to load content from MAX, it will have to be exported as 3DS/LWO/etc. and loaded from that.

As an example of loading 3DS data into a program, take a look here

Hope this helps.



08 August 2003, 03:58 PM
Actually it's not that it's a closed format...although that does have something to do with it. The main reason you can't open a 3dsmax file is that it's just a metafile. It just instructs the various plugins in 3dsmax how to rebuild the scene. So 3dsmax and the plugins contained in the file act as the interpreter for the max file and without 3dsmax or the plugins the information in the max file doesn't mean much.

08 August 2003, 05:12 PM
Thanks, a much more articulate explanation. Same result, but much clearer.



08 August 2003, 01:55 AM
Great, thanks for that.
Just what I was after.

I havent gone through the code line by line yet, but does this loader also cater for bones?

Thanks again

08 August 2003, 07:24 AM
As far as I've seen, 3ds doesn't cater for bones support.

08 August 2003, 02:12 PM
You can export data directly from Max by writing a plugin for Max. There are loads of exampls of doing this on the web, and in the drive:\maxfolder\maxsdk\samples\impexp folder.

Good luck ;)

[edit] I should also mention, if you want to get at Physique and/or Biped information then you'll need to use the Character Studio SDK, which is in drive:\maxfolder\cstudio\sdk (well, it was in Max4, Max5 appears to have gone mad, which means I have to resort to building against the Max4 SDK and using the plugins in Max5. Go figure :rolleyes: )

08 August 2003, 03:04 PM
Thanks for that. I'll make haste and check it out.

08 August 2003, 04:22 AM
I am also getting into NVidias Cg language. I understand how the keyframing calls work (very simple), but cannot work out how the vertex skinning works.
It talks about transformation matrix sets. I am a little lost on how matrix sets are used for bones.

Do you have a 3D model in standard pose and attached to it a whole array of matrix sets which allow certain transformation/rotation etc, attached to specific vertex's, which have been defined in a 3D package (3DMax, Lightwave etc).

What is the control loop for accessing the transformation matrix sets?

FOR ith bone to last bone
apply matrix set for ith bone

Can anyone help please?

Thanks again

08 August 2003, 09:00 AM
Not sure how it works in cg, but the basic idea is for each vertex (in the standard pose), look at what bone it's attached to then walk down the skeleton from the root to that bone, applying each bone's transformation matrix as you go.

Edit: Just picked up the nVidia cg tutorial book that's sitting next to me.

Rather than have key frames for each pose of a character, vertex skinning maintains a single default pose and a large set of matrices that appropriately [transform] various subregions of the default pose's polygonal mesh...

Each matrix is assigned a weighting factor... which indicates how much that matrix affects each vertex... few matrices have positive and significant weighting factors for a given vertex. We call this small set of matrices the bone set for a given vertex.

When rendering this type of model, you first transform every vertex by each matrix in the vertex's bone set, then weight the results of each matrix transformation according to the matrix's corresponding weighting factor, and finally sum the results. This new position is the vertex skinned position

As far as I can see, it makes no mention of transformation order so maybe I was wrong and that's not important, but I'm pretty sure it is... anywho, there's a vertex program in the book, but I don't think I should type that out as well, so I suggest you buy the book.

It's also more than likely you can find a vertex skinning program to pick apart on nVidia's website, or one of the game development websites such as or

08 August 2003, 01:00 PM
I too have the Cg tut book, and I agree the explanation on how to work with the matrix sets is vague.
Looking at the code does not really help.
I am not sure how these matrix sets are stored in a 3D file. I will go and check out flipcode and gamedev.
Thanks for the info

08 August 2003, 05:00 PM
You'd store them as a long list of arrays, and then each vertex should keep a list of indices into the matrix array (this list of indices is therefore the bone set). Don't know how it's stored in a 3DS tho..

08 August 2003, 11:34 PM
Ahh, OK thanks again playmesumch00ns.

CGTalk Moderation
01 January 2006, 10:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.