Friday 2 September 2011

MaxScript

I've just realised I've been wasting my life for the past 15 years...

Though a regular user of 3D Studio MAX (I even taught it for 4 years), Maxscript has always been a closed book to me. Maybe it's because it wasn't there when I started using 3D Studio in DOS. Everytime I've looked at a MaxScript I've been put off by the lack of punctuation and thousands of reserved words, etc. and never thought I'd get my head round it. The other day I was more or less forced to.

I wanted to output image maps from Max, based on vertex positions (more on that in next post).
The way I started was to export the mesh, import it into Away3D then I could read the values out and save them as I wished. The only problem was I needed to save the vertex positions for 350 models and that's a lot of manual work! (== I would hate it). I found a MaxScript that could output the models for me automatically, but then I was going to have to build an AIR app to process them.
Then I thought it must be possible to use MaxScript to output the images directly. About 50 hours later it was :) Plus I'd learned a ton of other stuff I just never knew was possible. Writing custom exporters for Max is now a part of my tool set. If only I'd bothered to learn it years ago I could of saved myself weeks of work, using whatever tools I could find/afford on the net.

If you haven't taken the plunge yet, I'd encourage you to look at it. The language has it's quirks (to say the very least, for example some arrays are 0 based, some start with 1, wtf !?) but if you were ever an ActionScript 1.0 developer you're used to that ;)

The best place for scripts is http://www.scriptspot.com/
If you're not into reading about MaxScript, you're in luck. John Wainwright, the creator of MaxScript made a tutorial video, and it's available free online at http://vimeo.com/album/1514565/video/19276145
Most the concepts will be familiar if you've scripted anything else before, but I'd encourage you to see it all anyway, there's a lot of detail and tips.

Good luck!

No comments:

Post a Comment