3dsmax expressions/scripting

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
  05 May 2013
3dsmax expressions/scripting

Hi all, I'm fairly new to expressions in 3ds max and scripting... What I would like to know is, how/what do I need to set up to get the following: I'm really wanting to find out what are the best ways to write expressions.(I'm coming from an after effects background)... I'm seeing that some things aren't easily achievable. For instance, If I wanted to set up a clamp expression in AE, all I would type is clamp(value, param1,param2). Ex. 2 linear(value,0,100,78,90). The expression in ex. 2 allows one to map 78 - 90 over 0-100. Really useful when hooking things up to sliders. I'm aware of how to access the script/wire parameters boxes. I simply don't know how to transfer this knowledge over to 3ds max, or what functions I'm looking for. Equally is there a possibility of a function or expression in 3DS that would allow me to MIX between values, for instance... If I wanted to rotate objects but have their rotation blended/Mixed according to another objects Orientation. In context If I'd set up three spheres and I wanted each one to rotate half as much as the one next to it or any percentage. followed by clamping the amount that each sphere could rotate. What am I looking for in this case. Scripting or can/should this be handled by an expression?

Really, I am looking forward to getting some insight on the matter....

Thanks all!
 
  05 May 2013
I think a lot of it is about learning which tool is best for which job. After Effects is a little more limited in that respect - which isn't an insult at all, personally I love AE. But for what you describe, there are several ways to do each one, including without any scripting at all. The one with the spheres rotating, for example, is more of a rigging question than a scripting one - though you could define/set the rig and limits using scripting (in the same way you can do more or less anything in scripting, though it's not always the fastest or most effective way). I think the main difference is that in AE, expressions are a) the only solution to a lot of problems and b) offer greater functionality. Max Scripts do, by and large, only allow you to automate what you could already do in the UI anyway. Now, of course, this automation can mean all the difference between a workflow being effective or not being effective, and chaining these automations with a convenient UI can mean the development of some very powerful tools. But the key to finding a solution in Max is usually to work out the best way to do it in Max, and then work out the best way of actually implementing it. Sometimes it'll be scripting, sometimes it won't.

Edit: To clarify, what I mean is that rather than saying "we need to make these spheres rotate less than one another with limits - how do we script that?" One should ask "We need to make these spheres rotate less than one another with limits - what's the best way to achieve that result? Rigging? Wire parameters? A whacky system of dummys, levers and pullys? Ok. Now, what's the best way of implementing that?"
__________________


Last edited by DanGrover : 05 May 2013 at 02:58 PM.
 
  05 May 2013
ah thanks.... I'll give it go!
 
  05 May 2013
to do a clamp inside an expression you want to make use of the min and max functionality. Inside the expression controller you can click the function list button and it will show you what functions are available inside the expression controller system.
__________________
Matt Rennie
Sr. Character Rigger
Rockstar North
 
  05 May 2013
Thread automatically closed

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.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 08:40 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.