PDA

View Full Version : Which language is better to learn for scripting in XSI and Maya?


mill
12-11-2004, 05:24 AM
Hi.

I am an artist and completely new to programming.
But I want to learn some scripting and expressions.

Problem is I need to use both XSI and Maya.
Which language is better to learn for these two applications?

schyzomaniac
12-11-2004, 11:00 AM
If you want to do scripting in Maya and XSI then you probably have to learn two scripting languages, since Maya is only supporting MEL and XSI of course not. On the other hand you have more freedom in XSI when it comes to choose a scripting language. I would say go for either VBscript or Jscript in XSI, whereas Jscript seems to become more and more popular. Most of the examples in the scripting documentation are VBscript based, but it's really not that hard to translate the code to Jscript. In XSI you can choose between Vbscript, Jscript, Phyton and Pearl.

cheers,
daniel | schyzomaniac

//edit:
here are two links with jscript tutorials for xsi:
http://www.philbarrenger.com/tutorials/begginersscript.htm
http://www.philbarrenger.com/tutorials/begginersscript_2.htm

StefanA
12-11-2004, 01:18 PM
For Maya it's pretty much only MEL you can work with, unless you wanna develop plugins. Then C++ is the choice

For XSI I would recommend Python or JScript.

http://www.python.org/ is a good way to start. Read all tutorials, and you will then also learn the basics of programming in general.

http://www.rickw3d.com/ has some good links for programming and math.

regards
stefan andersson

mill
12-11-2004, 05:07 PM
Thank you for your reply.

I think I am going to take Jscript or Python.
But I still can not decide which one.

I heard a lot of good things about python.
Which one do you think would be popular in the near future?

StefanA
12-11-2004, 07:32 PM
Thank you for your reply.

I think I am going to take Jscript or Python.
But I still can not decide which one.

I heard a lot of good things about python.
Which one do you think would be popular in the near future?
Python seems to be the one everyone is talking about these days. And I know a few companys using it as their main developer language.

regards
stefan andersson

wmendez
12-11-2004, 09:07 PM
Is Mel based on C? (Just curious) As Stefan mentioned lots of XSI TD's favor Python if you're getting into Behavior then adding Jscript to your skill set will help out since Piccolo is base on Jscript.

francescaluce
12-11-2004, 09:52 PM
Is Mel based on C? nope. it's derived from the unix shell commands like scripting language.

mill.. you'll need both of them to be a scripter. but start with jscript.



ciao
francesca

ThE_JacO
12-11-2004, 10:30 PM
MEL is a bit of an odd animal.
many people confuse the good reputation of maya's SDK (that up to a certain point is well deserved) with MEL (that is simply a language+API to interface to the SDK through an interpreted language).

MEL has some elements of its syntax very similar to C, but so does Jscript (; terminators, brackering etc.), but I see it closer to TCL then to C or any non graphics related scripting languages.

TCL has been for ages the flavour of choice in many large pipelines, and it's always been used a lot on irix, hence Alias choice to make MEL similar to it, basically to ease the learning curve for the existing TD base.

nowadays though it does smell bad and outdated in many regards, Python is a more elegant, clean and modern (altho its roots date back a fair while) language then both TCL and JScript. for starters I'd probably go for JScript or VBS, mostly because you'll have to learn both a language and XSI's SDK (not to mention programming basics), and VBS or JS will make it easier to find examples and help.
not to mention easier distribution of your scripts and more people to test them.

all in all once you have nailed down scripting in any language it will be very easy to learn one more and adapt to that, while learning python straight away you won't switch to anything else anytime soon, and you will probably fail to see its differences and advantages in style over other languages.

short version: I'd go for JScript but I wouldn't diss anybody advicing about going for python, altho the first will make your learning process easier and more complete.

mill
12-12-2004, 03:53 AM
Ok.
Probably it is better to learn JScript first.

There is one thing that still confuse me.
I found only 8 books for JScript in Amazon.
On the other hand, there are many books sound similar to
JScript.
For example

J2EE
JavaOne
Java 2
Java(TM)
Java Beans
Visual J# .NET
and so on.

Which book should I chose?

gnz
12-12-2004, 07:35 AM
J2EE
JavaOne
Java 2
Java(TM)
Java Beans
Visual J# .NET
and so on.

Which book should I chose?
Careful, all those titles are "Java". JScript is Microsoft's implementation of "JavaScript", and JavaScript is in no way related to Java (kind of confusing).
Try looking for a book on JavaScript, there are heaps of them. I like the books from O'Reily and this one looks good (http://www.amazon.com/exec/obidos/ASIN/0596000480/qid=1102836752/sr=2-1/ref=pd_ka_b_2_1/104-1900051-9519958).

Hope that helps

StefanA
12-12-2004, 10:13 AM
MEL is insanly close to perl, I've heard numerous comments on that from different td's thta also knows how to write in perl. It's apparently (I have no exprience with it) so close that they sometime forget which syntax they have been working with :)

Python is also good because it's natively built into Linux. Which means that you can also use it for writing your own tools outside XSI to help improve your pipeline.If you are starting with python I can recommend a book called:

to learn Python Programming, ISBN 1-59200-073-8

It's a good book and in the end you are making a small 2D game with a gui :) As for JScript I don't have any books I can recommend since I haven't read any.

best regards
stefan andersson

schyzomaniac
12-12-2004, 10:14 AM
Before you spend money on books, can i suggest to first download the Jscript online documentation from msdn.microsoft.com ? Take a look at the language/syntax and see if scripting suites you.
I prefer looking for free documentation and tutorials as a starter before i spend money on more training material.
If you know what loops, functions, statements, etc. in generall are, then the jscript documentation will be enough to help you translate all the vbscript tutorials from the xsi documentation into jscript. Read the manual before buying a book. ;)

cheers,
daniel | schyzomaniac

mill
12-13-2004, 02:11 PM
Hi.
Right.
I better try free tutorials first.
After that, I will definitely buy books recommended.
Thank you very much for all the advice.

By the way, I decided to learn Python first.

Atyss
12-15-2004, 05:24 AM
Here are my humble view on that very question:
http://www.bernardlebel.com/articles/learnscriptingxsi.htm


Cheers
Bernard

mill
12-15-2004, 01:00 PM
The article was really interesting.
Thank you for leading me.

CGTalk Moderation
01-20-2006, 04:00 AM
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.