3d forums home Resources for 3d artists

MAYA: Linking parameters over time

Posted: May 23, 2006
Shawn
If i want to script pSphere1 so it at frame 21 has the translation values of pCube1 at frame 2... how could that look?
i want to automate the animation of several objects and all should be timeshifted from the first one
and with the offset as a variable
so i have to point at translation values at a certain frame
Posted: May 23, 2006
Ted Town
pseudocode: pSphere1.translation = pCube1.starttranslation*(thisframe-2)/19 + pSphere1.starttranslation*(21-thisframe)/19
just a basic tweening equation between two values, shifting the weighting factor over tie
time*
Posted: May 23, 2006
Shawn
oh
so "thisframe" is acctually a "variable" that wrks?
hmm
must test
Posted: May 23, 2006
Ted Town
of course not, its pseudocode
Posted: May 24, 2006
Shawn
pseudocode =)
heheh
didn't read it all
Posted: May 25, 2006
Ted Town
I suppose you could use a dummy object with a custom attribute to store an animation curve go get better control over how it moves between them over time aswell
go=to*
Posted: May 25, 2006
Shawn
there is acctually a timeFunction node in maya that trax uses
maybe something that one can use
Posted: May 25, 2006
Ted Town
Im sure there has to be a global variable like "frame" or something
but the code wont work if you plan to animate the objects manually as well. Then you'd have to query the position of the objects at every frame or make some other expression that will update the variables automatically when the position change
there's TONS of cool stuff you could do with this, hehe
procedural animation is awsome