Jan. 26, 2008 @ 04:33
So about that 3DS Max SMD importer…
Vertex Cloud

It’s not much, but you’ve got to start somewhere.

Well I’ve been saying for ages that I’m going to write a SMD importer plug-in for 3DS Max 9 & 2008 and this week I finally took some serious steps to get it from the paper planning stage into actual code.

The SMD format is pretty awful for storing 3D mesh data as it explodes the whole thing into seperate triangles instead of nice index linked lists as in say OBJ format (or the mythical MRM format StudioMDL supports…). To be honest, I’ve no idea why Valve still uses this format but I guess it’s just a legacy that no-ones seen the need, or has the time, to change.

Anyway, one of the big problems with handling SMD files istaking all those seperate triangles and intelligently joining them back together into one continuous mesh. I’ve spent quite some time trying to figure out how to do it and more importantly, how to do it quickly. I think I’ve got it figured now, more or less, and the proof-of-concept code seems to do it’s job.

You can see the fruit of experiements over the past couple of evenings. It’s not much more than a snazzy looking point cloud but it’s something at least. It’s quick too – at least when not running in debug mode. The picture on the left is from a SMD file containing 18000 lines of text. It read in 3600 individual vertices and filtered them down to just 2600 by removing duplicates – and it did it all in under 0.02 seconds.

The next stage is to write similar sorting and filtering code to handle the normal, UV and face data and then the logic to stitch it all together into a single mesh.

As usualy, no ETA as I’m working on this when I have the odd bit of spare time from other things, but hey – progress!

Responses to “So about that 3DS Max SMD importer…”


Hey again
Great to see that you’ve started working on it! 🙂 You’ve got all my support 😀

I hope you’ll be able to come up with something great 😉

Posted by Penguin
Sat, January 26th, 2008 @ 16:00

Great to see some progress being made on this.

Looking forward to it.

Posted by Flakes
Sat, January 26th, 2008 @ 19:12

That is really awesome to hear. Thanks a lot for these great tools.

Posted by Skeezy
Tue, January 29th, 2008 @ 02:57

Really looking forward to this plugin! I hope you find the time.

Posted by Veliremus
Tue, January 29th, 2008 @ 18:40

Hey mate good work on all the plugins you have made, ive noticed your having problems getting the SDM Importer to work correctly, after a very long search on the net i managed to find this program that works already. Maybe you could use this way to import. Its just what looks like a simple script file for max.

here is the link to the download,
http://pages.videotron.com/browser/Downloads/3d_max/scripts/SMDImporter1-0.zip

hope this helps you out.

~ Henley

Posted by Henley
Thu, January 31st, 2008 @ 07:45

Awesome!
Thanks for your hard work buddy.

Posted by Loke
Thu, January 31st, 2008 @ 19:20

Thanks for the link Henley. That importer script has been around for years and the main problem is that it imports each triangle seperately so nothing is welded and thus can’t be smoothed. If you try and weld all the points you end up losing the skin data (unless you apply an Edit Poly modifier on top of the stack).

Posted by Jed
Thu, January 31st, 2008 @ 19:27

This will be great 😀 yay

Posted by Quadraxas
Mon, February 11th, 2008 @ 22:35

YAY finally, I have been waiting for this… thank you wunderboy your my hero…

Posted by Ianlinkcd
Mon, February 18th, 2008 @ 00:50

errr… thank u jed love it looks great so far yur doing godlike work

Posted by Ianlinkcd
Mon, February 18th, 2008 @ 01:16

Finish it quick 😀 !

Need to modify TF2 models 🙂

Posted by Kobilica
Sun, March 2nd, 2008 @ 11:05

Looking awesome. Take your time, make it awesome :V

Also I don’t know how hard this is, but is it possible to update GUIStudioMDL to work with the beta SDK? I need the beta for map making but I have to reinstall the old sdk whenever I compile a model and as you can imagine it gets tedious.

Don’t worry if it is not easy but hopefully it’s a simple fix because it just doesn’t like the lines in the .qc that relate to the collision model.

Later.

Posted by Phil
Tue, March 11th, 2008 @ 19:02