pouët.net

Anyone know about Maxscript/MEL etc?

category: general [glöplog]
 
I just got to wondering about the scripting languages inside 3D packages - I'm wondering how it is they function. Can I for example, draw a cube, as in with the mouse, and then move it about in 3D space, via code? Can I plot stuff in 3D space, say, "sphere - at 10,10,10", or whatever other primitive I choose?

...and finally, what are the options to get a "final product" out of it - executable, or something inside a browser, or even something clickable on the desktop - like, I think you used to be able to click .swf files on Windoze, donno whether that's still true or not... Is there any option at all regarding this?

...I'm *particularly* interested in the capabilities of Blender and Python.....

Anyone know anything about all this?

Thanks.
I can only speak for Maya and Mel. Mel is, more or less, a simple access wrapper around the Maya-API without hassling around with C/C++, DLLs, Plugin-Interfaces, etc.

AFAIK the complete Maya user interface is done using MEL, so you can do everything what can be done with the mouse or keyboard.

I guess the other packages (3DS, Blender, Maxon, ...) are pretty similar.

Concerning the final product. If you dont want to go the "hard way", which means exporting all data to your own file-format (binary, ASCII, XML, whatever) and write your own engine, You should just grab an existing engine like e.g. Unity and use that. They come with everything you need.
added on the 2016-12-23 09:18:40 by axis^oxy axis^oxy
If you look at something like a Flash-style SWF file, Unity is really a good starting point.
They have tools to export data from 3D-packages, a pretty mighty editor with build-in scripting language and can export their "scenes" to multiple runnable formats on multiple platforms like exe, installer, web-plugin, app, ...

And its for free for hobby projects.
added on the 2016-12-23 09:27:55 by axis^oxy axis^oxy
BB Image
added on the 2016-12-23 11:22:12 by havoc havoc
Quote:
Anyone know anything about all this?


Yep
added on the 2016-12-23 11:26:25 by okkie okkie
What havoc and okkie said
added on the 2016-12-23 12:21:51 by xTr1m xTr1m
I have experience with 3DS Maxscript, and you definitely can do if not all, at least most of what you can do with the GUI, that is, you can create objects, edit then, load, save, etc.

You can create entire scenes just from Maxscript. It is pretty powerful.

But no executables, that is not the intention. The intention is to create procedural behaviors which otherwise would be hard to create manually. Lets say, you want to create a scene with 200.000 spheres which would animate their positions to form a human face, or something like that (hard to do manually) -- you could then create a script to do that instead of creating and animating those spheres by hand.
added on the 2016-12-23 12:39:31 by imerso imerso
3dsmax and maya also support python these days so you don't have to learn that maxscript pseudo-language, but yeah, most time is figuring out all the specifics of syntax for all modifiers because that is all documented, but well, not exactly straight-forward or consistent.

you cannot poop out an .exe no, but you can play a script via the interpreter, so technically you could do all sorts of effects in the viewport if you wanna. you can even set interface stuff up, so having a fullscreen perspective viewport is doable. also, HBC already did such a python-based blender animation ages ago.
added on the 2016-12-23 13:11:23 by maali maali
No.
added on the 2016-12-23 13:30:00 by Preacher Preacher
axis: thanks for the info. I don't know what "Maya API" is, but.....you CAN do what I described, in Maya then? Good. Maybe someday I'll poke around with it. :)

As far as what you said about Unity: the rest of it sounds awesome, but - any way to get stuff inside a browser WITHOUT a plugin? Does it require FAT hardware? :)
imerso: I'm guessing that that's what was used to do something like The Mummy, where millions of grains of sand fly together to make the face of a demon....? Incredible stuff.....
Also - I'm sure this type of thing would be useful in Arch Vis, eg. if you're making a 10 storey building, you draw one box, and duplicate it into 10 *in code*, instead of shift-clicking, and then selecting "10" in the pop up box....? I'm sure Arch Vis'ers must be proficient in Maxscript then?

Are there any tuts you'd like to recommend in case I wanna try this sort of thing sometime? Anything worthwhile on Youtube?
In the case of The Mummy movie, they most probably used scripting. That is a perfect case. In the case of a building, the GUI is fairly advanced, so it has features to copy geometry many times while displacing, and much more, no need to script if you know well the GUI.

Well, I don't use 3DS Max for quite a few years now, I don't remember the good sites about it, but certainly Google will have a thousand useful results for something like "maxscript tutorial" or "3dsmax modeling". =)
added on the 2016-12-23 23:37:12 by imerso imerso
don't know about the others, but the scripting api of cinema4d lets you access most stuff, but not everything. for that you need the c++ plugin interface.
added on the 2016-12-23 23:54:18 by jco jco
Unity can run your scenes in a browser. When I used it the last time, it was running via a browser plugin. But i think they changed that to WebGL. Hardware requirements are mostly based on your content (Polygon counts, shaders, ...).
added on the 2016-12-24 10:30:28 by axis^oxy axis^oxy
imerso: remember that sand monster in that Spiderman movie? :) It's hard to believe that that was almost a DECADE ago now......

...and the water horses in LOTR? Would you say that Maxscript is capable of achieveing even THAT kind of an effect, ie. WATER???!!!
axis: that's great. It's still a bit of a downer that you need 2 *separate* programs, ie. the modelling one as *well as* Unity, but anyway, I guess for the moment that can't be helped....

Out of curiosity, does Unity (or anything else like it) let you make CLICKABLE areas on screen, like say, there's a cube in front of you, you click it and it disappears and a sphere flies in where it was.....something like that?
Quote:
does Unity (or anything else like it) let you make CLICKABLE areas on screen

Since its mostly used for games, this is easy possible. Needs just a little bit of scripting.
added on the 2016-12-24 14:29:50 by axis^oxy axis^oxy
the water horses in LOTR are Krakatoa or a similar particles plugin.
added on the 2016-12-24 15:34:11 by maali maali
Yes, probably a particles plugin for the easiness or better integration with some other used tools, although with Maxscript alone it could be done as well.
added on the 2016-12-24 23:13:52 by imerso imerso
@Bitnaughty: Have you tried looking into WebGL and ThreeJS? They will fulfill your requirement of rendering things inside the browser. However, if you're still interested in having a more "software package" approach and workflow, Unity is the way to go. Good luck!
added on the 2016-12-25 17:31:54 by farazfp farazfp
Hey farazfp: Yes, I definitely know about WebGL, and I've spent a LOT of time learning Javascript, but I'm not going to actually use it, because I refuse to touch 3D cards! :) ThreeJS I've heard of, but don't know anything about - it's some kind of library, right? Doesn't it, in fact, have a demoscene hand in it?

...but it's this concept of mixing art and science that I find intoxicating!! The possibilities are really Mind Boggling! (water horses being one of them :) ) WebGL etc. are great n all, but creating something that's "Art" and then tampering with it with code is, at some level, even cooler! The end result is probably not what someone would consider a *demo* (I really doubt that something like Maxscript gives you the option of optimising your code, after all - it's just not meant to be used for that (I say this from intution, I've never used it)) - but it's still awesomely cool! These are all separate things - there's Art, there's Science, and there's Art+Science. I know that I, personally, want to be involved in all of these things.... :)
..and thanks for your wishes, man! :)

login