time offset and 'link with'

Discussions about animating in SOFTIMAGE©
Post Reply
User avatar
druitre
Posts: 471
Joined: 25 Jun 2009, 23:35

time offset and 'link with'

Post by druitre » 26 Mar 2010, 19:35

Hi all,

if I want to time-offset the motion on an object that I've set up using 'link with', I would have to edit the expression 'link with' has created and insert a function>time>Frame offset, right?

Can somebody please explain to me where and how to do that, I've tried and tried but no success. From the manual I have deduced what function to use, but I keep getting syntax errors. (Which has a lot to do with me being very noobish with expressions).

Thanks,
Jasper

User avatar
Hirazi Blue
Administrator
Posts: 5107
Joined: 04 Jun 2009, 12:15

Re: time offset and 'link with'

Post by Hirazi Blue » 26 Mar 2010, 20:38

Could you share your faulty expression, the one that throws the syntax errors? That way correcting it might be easier... :D
Stay safe, sane & healthy!

User avatar
druitre
Posts: 471
Joined: 25 Jun 2009, 23:35

Re: time offset and 'link with'

Post by druitre » 27 Mar 2010, 12:49

OK: suppose I want to drive the local Y position of null 'B' with the local Y position of null 'A'. I do a 'link with' and get the expression:

l_fcv( A.kine.local.posy )

Then, I want to offset null 'B' 5 frames, so it wil lag 5 frames behind the motion of null 'A'. I go (in the expression editor) to function>time>frame offset. I get:

at_frame( <Fc-30>, <fcurve-driven parameter> )

so I'll try and replace the fcurve-driven parameter with the initial expression:

at_frame( <Fc-30>, l_fcv( A.kine.local.posy ) ) (doesn't work)
at_frame( <Fc-30>, A.kine.local.posy ) (nope)
at_frame( Fc-30, A.kine.local.posy ) (IT WORKS!)

Hey! I've done all kinds of random variations yesterday and none worked, must've not done this one. YAHOO!!!

Errr...

I'm happy enough allright, but I don't understand how it works without the 'l_fcv' bit. I would think that's the bit telling null 'B' what to look for, and the '( A.kine.local.posy )' the where to look for it.

Or have I lost the option to tweak the relationship with an fcurve by omitting the 'l_fcv' bit? (Yeah, that's what it looks like... no more fcurve-editable animation)

OK... if I insert the l_fcv back in:

at_frame( Fc-30, l_fcv( A.kine.local.posy ) )

Doesn't work either, although it says it's a valid expression. So.... how would I do that? Have fcurve AND time offset?

User avatar
Hirazi Blue
Administrator
Posts: 5107
Joined: 04 Jun 2009, 12:15

Re: time offset and 'link with'

Post by Hirazi Blue » 27 Mar 2010, 12:59

One quick partial answer:
The syntax used in the User's Guide uses the < ... > to indicate a token to be replaced by a value without the "<" and ">" signs. That's why "at_frame( <Fc-30>, A.kine.local.posy )" doesn't work as the "<" and ">" don't belong there and "at_frame( Fc-30, A.kine.local.posy )" does...
Stay safe, sane & healthy!

craft
Posts: 107
Joined: 03 Jan 2010, 00:40
Location: Portugal
Contact:

Re: time offset and 'link with'

Post by craft » 27 Mar 2010, 13:18

here you go :)

l_fcv(at_frame(Fc + 10, Null1.kine.local.posx ))

couple of things were going wrong with that expression. i had to try a little bit myself because i've never done that b4.
1st thing was that you need a frame offset, not a time offset (or else use the current time, not current frame).
2nd thing you need to first read the A.kine.localposx at the given frame and only then pass it to the link_fcurve ;)

keep it up!

User avatar
druitre
Posts: 471
Joined: 25 Jun 2009, 23:35

Re: time offset and 'link with'

Post by druitre » 28 Mar 2010, 13:00

Hey Tiago and HB,

yes, that makes sense. Now that I see it :) Get rid of the <>.
What throws me off is that the editor inserts the function with those <> included, although I can understand the logic behind it.

I see also how you'd get at l_fcv(at_frame(Fc + 10, Null1.kine.local.posx )) and the expression is accepted as valid, but how do I access the fcurve? The icon next to the kinetic property changes from 'linked with' to 'expression' and I can't get to fcurve editor from RMB it.

User avatar
Hirazi Blue
Administrator
Posts: 5107
Joined: 04 Jun 2009, 12:15

Re: time offset and 'link with'

Post by Hirazi Blue » 28 Mar 2010, 13:59

You cannot access the fcurve on a parameter driven by an expression, because "you can’t have both fcurves and expressions on the same parameter at the same time". :( ;)
Stay safe, sane & healthy!

craft
Posts: 107
Joined: 03 Jan 2010, 00:40
Location: Portugal
Contact:

Re: time offset and 'link with'

Post by craft » 28 Mar 2010, 14:41

actually you can. you better create the link f-curve before setting the time offset expression, because i don't know any way to create the fcurve AFTER the expression was inserted.

then all you have to do is go to your expression editor and look at the top toolbar for the "editor" menu and choose "f-curve editor" instead.
also, if you go to your scene explorer and switch to "all+parameters" and dig down to your parameter with the expression you can see the Fcurve inside the expression.
also, you can right click your parameter's icon in any property page and choose animation editor.

User avatar
druitre
Posts: 471
Joined: 25 Jun 2009, 23:35

Re: time offset and 'link with'

Post by druitre » 29 Mar 2010, 10:12

Hey Tiago,

that's how I've made my expression - first linked with, then inserted the function. What I get is:
go to your expression editor and look at the top toolbar for the "editor" menu and choose "f-curve editor" instead.
That doesn't work, there's no "editor" button in the menu of the expression editor that opens.
also, you can right click your parameter's icon in any property page and choose animation editor.
Yes, but what I get is "animation editor - expression editor", this time with the "editor" button in the menu, but with expression-windows on the right side and local transform properties on the left. Switching to "fcurve editor" gives (on the right) an empty fcurve-window, as soon as I select (on the left) the local property with the expression it switches to expression-window.
also, if you go to your scene explorer and switch to "all+parameters" and dig down to your parameter with the expression you can see the Fcurve inside the expression.
This one works, actually! So it IS there, there's just no way I can get to it from RMB on parameter icon.

(BTW, I'm on 7.01)

craft
Posts: 107
Joined: 03 Jan 2010, 00:40
Location: Portugal
Contact:

Re: time offset and 'link with'

Post by craft » 29 Mar 2010, 12:14

weird.. well at least one works, but it's strange that you can switch to fcurve ed. and get a blank graph if you can reach it from a different approach. gotta double check that when i have the time. i think it worked here, but then again, never trust a guy that stays sleepless for 22+ hours every'day'.

Post Reply

Who is online

Users browsing this forum: No registered users and 41 guests