From Maya / Mel /Python to Max / MaxScript /?

I just started my new gig as a technical generalist at a studio that will be using Max exclusively.
All of my previous tech arting was Maya/python interactions, so I have some questions about making this transition.

What are the best resources for ramping up in max script?
What is the relationship between MaxScript and .Net and C#?
Is C# worth pursuing for Max tech arting?
The book Maya Python for Games and Film was a tremendous resource for my Maya work, is there an equivalent level book around max script?
I’ll also be helping with character rigging , but the majority of the rigging advice I have seen is Maya…are there some goldmines for Max rigging advice?

So far I’ve looked into:
-the wiki page here
-CG academy tutorials

any helpful pointers would be appreciated!

[QUOTE=Mambo4;19397]I just started my new gig as a technical generalist at a studio that will be using Max exclusively.
All of my previous tech arting was Maya/python interactions, so I have some questions about making this transition.

What are the best resources for ramping up in max script?
What is the relationship between MaxScript and .Net and C#?
Is C# worth pursuing for Max tech arting?
The book Maya Python for Games and Film was a tremendous resource for my Maya work, is there an equivalent level book around max script?
I’ll also be helping with character rigging , but the majority of the rigging advice I have seen is Maya…are there some goldmines for Max rigging advice?

So far I’ve looked into:
-the wiki page here
-CG academy tutorials

any helpful pointers would be appreciated![/QUOTE]

Check out everything on his site http://www.paulneale.com/ (rigging, scripting etc)
Scriptspot for maxscripts and the maxscript help is good and here is a free set of videos to get your feet wet.
https://vimeo.com/19276145

.Net like python in Maya lets Max access and be bigger than just what maxscript alone can do limited to Max (this is the extreme short hand version)

Good luck, one of our Mentors at Rigging Dojo made the transition for work recently and posted a little bit about it on his blog - http://griffinanimation.com/

It takes a little time to get your head around workflow,max terms but it isn’t terrible.

Brad

Thanks for your reply. I’ll check out those links.

Are .Net and C# the same thing, or just closely entangled?

Like you I am a recent convert from Maya to Max. A happy one you ask?.. not really. It seems Max has been a bit neglected in terms of scripting feature support, compared to Maya, over the past few years. Though maxscript does have a lower barrier for entry to do some cool stuff like context tools and scripted plugins.

So, to answer you’re question, C# is one language you can use on the .Net framework. I think you can use VB or something else to create a dll and load it into max (using loadAssembly)… I’m not 100% sure on that. Though most people use C#, which is a very nice language.

The .Net integration is not as tightly/nicely tied in to max as python is hooked to maya. Though, yes, it does open max up to the larger set of .Net libraries.

There is also the .Net wrapper classes, that wraps the c++ api. This should allow you to utilize the api in a nicer language other than c++. However there is next to no documentation/tuts on this and its seems a bit… untested. The Maya python api wrappers seem a lot better.

So, as I’ve learned so far you’re options in max are

  1. flat maxscriting
  2. C# dll, using Maxscript to load it the library and use it
  3. C# .net wrapper… I’ve not used this yet though
  4. You could try Blur’s python wrapper for maxscript, though there is no 2013 version compiled yet and it’s 3rd party.

… unless anyone can correct me on any of this.

For getting up to speed in maxscript I recommend the ‘maxscript essentials’ book and there’s some great videos here “http://www.scriptspot.com/3ds-max/tutorials/maxscript-101-free-online-training”. There’s plenty more resources out there, as mentioned previously, Paul Neale and Bobo have great resources on pretty much all things scripting in max.

Good luck.

One more question: I keep instinctively trying to use Maya navigation tools. I have seen some scripts in webland for implementing Maya style alt+mouse button navigation in max. But a number of the follow up posts suggest just sticking with Max defaults. The Max steering wheel is not too bad , but I just feel more fluid with Maya navigation. Which do you think is the best approach?

2013 has a maya navigation setting :smiley:

my advice to anyone when switching software is to just let go of the past and embrace the new. Clinging to old workflows or forcing software to work like something else will just hold you back in the long run.

Hell, I don’t even copy my preferences from one version of maya to another… who knows what new functionality has been mapped to a hotkey? each time i upgrade maya, i find out whats new and reintegrate my prefs/hotkeys/etc.

I just rediscovered the MMB nav scheme in Max…been a while LOL…

Max Script Essentials is $200.00 ( used )at amazon ?!
Is it out of print or something?

Once I got the basic grammar of Maxscript down, I found using the Maxscript helpdocs was a good way to fill in what I didn’t know Maxscript could do.

Thanks everyone for your helpfl responses so far.
I agree with the wisdom of embracing Max and ‘moving on’ from Maya habits.
I hope you don’t mind if I keep posting my questions as I continue this trip:

What’s the Max equivalent of the Maya channel box, the best place to observe all key-able attributes?

In python I made heavy use of the os module for generating json data for the engine.
Can Max script parse os paths and write data files or is that a job for .net or C# ?

Maxscript can write out files using the createFile command. The OS and file name parsing methods aren’t quite as robust as Python, but they’re there. GetFiles is the command to list all the files in an input directory. It’s not possessed of any ability to do so recursively, I’ve had to write my own function to do that.

what about launching external command line tools form max script?

DOSCommand or HiddenDOSCommand. Hidden gives you options like “donotwait”, so you can run something in the background asynchronously, or if you just don’t want to see the commandline window pop up.

Thanks again

I am looking into the problem of referencing today In Maya pipelines we would reference a rigged character file into each animation, pretty standard stuff…googling Max 's xRef and Containers reveals that referencing rigs has caused some issues in the past.
how is referencing a rig into multiple animation files this best handled in Max?

For anything outside of Max, just get used to doing it with .Net interface – it’s got plenty of good tools for the usual run of common tasks (file walking, IO, yadda yadda). For anything more elaborate than writing out a text file you’ll have to use it anyway, so might as well get used to it.

@mambo: you can fire them off from max, but there’s not a lot of robust ways to talk to them or parse their output (ie, there’s no max-native equivalent to a python subprocess). Easiest to do it from .Net using System.Diagnostics.Process :slight_smile:

So far I’ve hammered out the following pipeline approach:
Max script for anything Internal to Max, and exporting stuff via Max (to FBX)
C# .net for
-file system stuff
-writing data (json) files,
-driving command line conversion utils.
-batch export tools

All of this will have to play nicely with SVN and Git hub.
any flaws with this approach?

I saw that there is a python .net sourceforge project, but I’m tempted to go with C# because it seems more ‘tried and true’ and to add to my skills…

I think Python.Net inside .Net inside MaxScript borders on the baroque :slight_smile: Your layout seems fine to me. If you already know python you might consider the Blur Python Plugin but if there’s no other Python in da house then C# / .Net is a fine choice for a max shop.

One thing you might want to ponder is how much .Net you want to write inline in your MXS and how much you want to write in dedicated C# .DLLs. Inline is easy and quick - but also prone to messy coding and hard to debug. Writing a DLL let’s you define a nice interface (particularly if you don’t want to write tons of boilerplate type-conversion code) but it does involve an extra step that takes time and thought.

Old PPT on related matters here