3DS Max SMD Exporter plug-in 1.3Wed, September 17th, 2008 @ 16:39
Thanks to users who provided good feedback and sample Max files to debug from I’ve managed to nail a couple of annoying bugs in my 3DS Max SMD exporter plugin.
The first bug was incorrect error warnings about a mesh not having Sub/Muli-Object material when using a non-English version of 3DS Max. Thanks to Cherubim Entia for reporting that bug and testing the fix. The second bug was the exporter crashing when a rig contained a lot of mirrored parent bone/objects reported by “ifO” over at Mapcore who provided me with a good description and a Max file to debug from. The fix for this bug should also fix the crash when exporting an animation backwards.
Thanks again to those of you who have reported bugs and sorry I haven’t been able to jump on the problem as quickly as I liked. Hope the updated plug-in fixes most of the current issues.
- 3DS Max SMD exporter version 1.3
Related posts
In the summertimeTue, August 26th, 2008 @ 23:42

Blimey. Has it really been two months since I last posted something?
This summer has gone by really quickly and I’ve been extremely busy hence the lack of activity. I got to take a short holiday and went back to England for two weeks for my little sisters wedding. Apart from that I’ve been working like a maniac as we’ve got a product launch due for September at work which means a lot of overtime and late nights getting everything finished. :(
As I’m officially and “old fart” I’m afraid that after a hard day at the office I usually fall asleep as soon as I get home which means even less freetime. That said, what freetime I do have is currently spent on some writing projects and Ham and Jam. We’re going from Alpha to Beta soon and starting an aggressive testing programme so that’s going to keep my busy.
I’ve been getting a lot of e-mail asking about the SMD Exporter and Importer plug-ins so I figured I’d make a post here to answer some of the most common questions that people are asking.
For the exporter, I’ve been getting some good feedback from people on a couple of bugs but unfortunately haven’t had chance to address them all yet. The two most common are problems with material types in Max installed in languages other than English and crashes with mirrored bones. The language issue is solved and will be in the next update. The mirrored bones is a more complex problem and may take some time to fix.
I’ve said before and I’ll say again, don’t mirror bones in Max!. The most common mistake people is making is using the Tools->Mirror command in Max. This is the wrong way to do it and simply reverses the axis which is why your getting export problems. If you’re going to mirror bones, use Animation->Bone Tools turn on Bone Edit Mode and use the Mirror button. That will mirror them but keep the axis in the right orientation. For dummies you’ll have to mirror them manually but that doesn’t take too much work.
As for the SMD Importer, again I haven’t had much time to work on it but it’s certainly a lot further ahead that it’s been in a long time. Currently it’ll import meshes, UV, textures and bones although at the moment I haven’t set-up the skin modifier or looked into animation.
I’ll try and post some more updates soon, but in the meantime please be patient! :)
Related posts
3DS Max VTF Importer UpdateMon, June 23rd, 2008 @ 14:30
I’ve made an update to the 3DS Max VTF Importer plug-in to add support for Max 2009. While I was at it I took the opportunity to re-write some bits of the code and stick some optimisations in. Not much but every little helps.
If you’re installing this new version please make sure you delete the old plug-in file from your Max plug-ins folder before you install the new one. It’s especially important for 64-bit Max users.
- 3DS Max VTF Importer version 1.4
Related posts
Dem bones, dem bones…Thu, May 29th, 2008 @ 23:36

I’ve not had a lot of free time this week but I’ve managed to make a bit more progress with my Max SMD importer. Mesh import seems to work fine and it now imports the materials and UV mapping too which is nice.
I did have one colossal panic when suddenly Max would start crashing when you tried to add a modifier to the mesh or when you actually exited. Lots of error messages about corrupt heap which is never good for your heart pressure. After much debugging it was down to an out of range index which wasn’t my fault. A rather vague description in the SDK docs had me putting the wrong value somewhere. Doh!
So Sunday afternoon I decided it was time to tackle the part I’d been dreading - importing the bones and animation into Max. There’s very little decent information on making bones in the Max SDK and I don’t know many people who’ve found it easy.
My first task was just to template out some code to actually just create a bone in 3DS Max. I think having my teeth pulled is less painful. To illustrate, lets imagine a conversation between MaxScript and I…
MaxScript: Sure, here you go.
Me: Great! Can I move it over there?
MaxScript: No problem. *moves*
Me: And rotate it a little to the left?
MaxScript: Anything you want! *turns*
Me: Fantastic!
Now, lets re-enact that little scene as it went for most of Sunday afternoon between myself and the MaxSDK:
MaxSDK: What sort of bone? *shifty eyes*
Me: Well you know. Regular bone in Max that you make skeletons with.
MaxSDK: Like a helper?
Me: Err I guess, if that’s what it is.
MaxSDK: Ok. *creates*
Me: That’s not a bone! It’s just an object!
MaxSDK: That’s what you asked for a helper object bone!
Me: No, I meant a blue normal bone in Max.
MaxSDK: Oh you want a geometric object derived bone.
Me: Err yeah, whatever. Just make one please.
MaxSDK: Well you’ll have to tell me it’s class and super class.
Me: What? How the hell do I know that? Don’t you?
MaxSDK: Oh yes, but I just like to hear it. *sniggers*
Me: Oh FFS. *looks in SDK docs* I can’t find anything about that class!
MaxSDK: Well try harder!
Me: A clue? Nothing’s coming up when I search for “bone” or “bones”.
MaxSDK: Maybe I put it somewhere else…
Later that same afternoon…
Me: Ha! Found it! Make me a bone please.
MaxSDK: Oh very well….
Me: Can you move it over there?
MaxSDK: If you wish.
Me: And turn it a bit?
MaxSDK: Ok.
Me: What the hell? Why did you move it again?
MaxSDK: I didn’t!
Me: Yes you did it’s over there now!
MaxSDK: Oh yeah. Well I decided to reset the translation component of the matrix.
Me: Why you do that?
MaxSDK: …
Me: I f***ing hate you MaxSDK…
MaxSDK: What? Oh sorry I wasn’t listening, I was just over there eating some more memory.
Me: Sod this, I’m going to the pub…
MaxSDK: Can you get me some chips on the way back?
The above was then followed by two more hours of wondering why I wasn’t allowed to alter the appearance of the bone. Oh I’m sorry MaxSDK, you said when I made the bone you would make it as an Object. You didn’t tell me that you wanted to make ita SimpleObject2. See I thought a SimpleObject would be somewhat LESS than a normal Object but no, in fact it’s more. Well bugger me. You are a tease!
I think you understand my frustrations thus far.
Related posts
Tales of Ham, Jam, SMD importers, Max and more…Mon, May 19th, 2008 @ 00:35

Been a while since I made any posts about what I’m up to these days so I thought it was about time I did. Not that I made many before but anyway…
In what little free time I’ve had over the past three months I’ve been hitting the Ham and Jam code pretty hard, doing what feels like a huge amount of coding to try and nail all the bugs we found in our last play test. There’s still some small niggles but if the hlcoders mailing list is to be believed, their inherent SDK bugs and hard to fix and not likely to go away.
Anyway, of the new thing to add was the deploy system for weapons with a bi-pod which, after two false starts, actually works now. The process of doing the deployment and swapping animations wasn’t too hard - it’s just all the other crap you have to deal with like the logic to check if you should be allowed to deploy and limiting player movement, preventing weapon selection, etc.
Still, apart from the art asset side of things, game play wise Ham and Jam is really starting to come together and resemble a proper game now.
I’ve been working quite a bit with 3DS Max plug-ins over the past week too and finally found a couple of hours to do some more work on the SMD importer I’m writing for Max 9, 2008 and 2009. I made a bit of a breakthrough today in that I made the first successful test run of the mesh re-construction code and apart from a small few snags at first, it actually works!
This may not seem like a big deal, but when you consider how an SMD file stores data it’s actually pretty cool. SMD files store each polygon in your model as a separate un-joined triangle. The problem with importing data like that is you get a huge number of duplicate vertices and your polygons aren’t actually connected together. As a result, you can’t smooth them out or set the normals properly as anyone who’s tried to use the MaxScript importer will know. The code I wrote analyses the data coming in from the SMD and uses some logic to reconstruct the mesh as one continuous mesh rather than separate triangles.
Lastly, you’ll probably of noticed over the last month or so I updated all my VTF tools to support the 7.4 texture version which started shipping with the Orange Box games. It took a while to do, mainly due to VTFLib which they rely on being a bit out of date. Nem usually handles the releases and while the code was there, he’d got really busy and didn’t have a chance to get it out as quickly as usual. Still, not biggy, it’s done now so hopefully everything should handle EP2/TF2 textures just fine now.
That’s all for now. Back to work…

