View Full Version : Why do my "link with" expressions suck so bad?
11-30-2004, 04:42 PM
Alright, what the F am I doing wrong? When I use the "link with" expression to have the rotation of one object drive the rotation of another in a chain I can only do one axis and the other two are neglected. I'm assuming this is my ignorance and not the software, but I'm pissed that I can't figure it out. I've played with Maya's "Set Diven Keys" and they went without a hitch. I've got to figure that XSI's "link with" works primarily the same way, but I have yet to make it work right.
Here's what I'm doing; open the local transform panel for cube1, right click on "rot X" open my "link with" selection panel and link it to the Ori.Euler.X of cube and then set my relative values. Everything works great up to this point, but when I go thru the same process to link it to the Y rotation and the Z rotation, set up all the relative values I, I get nothing. The X rotation still works, but nothing else.
Any help, especially explanations in great detail of what to do is appreciated. Thanks.
12-01-2004, 09:27 PM
Okay, I haven't received a repsonse as to what to do, but I think I can do what I need with a scripted operator instead. I'm playing with it, but if anyone can give me some really great examples or tutorials that would be absolutely fantastic!
12-02-2004, 07:29 AM
as long as you don't need to set relative values, an orientation constraint would do the job.
The "link with" connection of all three orientation channels is working fine here. Maybe you should click on any of the animation icons to open up the animation editor for f-curve tweaking. There you can edit the f-curves of all three orientation channels to set the relativ values. Have you had a look at the f-curves already?
12-02-2004, 09:50 PM
Can you give a little more of a description about what you want in the end? Might be easier to recommend the best route.
By the way, if you just parameters to drive other parameters (without an fcurve like you would get with relative keys) - you can drag one animation divot(driver) to another (driven). That will put a simple = expression on the parameter.
12-03-2004, 01:21 AM
What I have is a chain of cubes that are parented down the line and I want a null to make them rotate so they would bend over; i.e. cube4 is parented to cube3 which is parented to cube2 and so on, when I rotate the null centered at the parent "cube" all the cubes will follow the parent, but will also rotate the incriments of the null. I can get the first link, whichever axis I choose, to work through the "link with" command, but none of the other axis' do. I have that bad feeling that it's the way I have my preferences, but not sure what I did to set it that way. It gets me really frustrated because I know the answer is there and I just can't find it. Definitely banging my head against the proverbial wall.
12-03-2004, 01:22 AM
Where can I find a good tutorial on expressions?
12-03-2004, 07:30 AM
So you want each cube's rotation to equal the rotation value of the null? And because they are parented in a chain, each one's rotation will be 'added' to the parent so you get a curling effect?
Try going through these steps... (It looks long, but it's pretty easy and might help)
-Parent your cubes offset from one another.
-Select all the cubes, press Ctrl-K to open up a Kinematics property page. Pin it so it stays open. This is a multi-ppg so any changes will effect all the cubes.
-Create your null, press Ctrl-K to open it's Kinematics ppg. Pin it open.
-Now drag the animation divot from the Null's Rotate X onto the Rotate X on the multi ppg. Do the same thing for Rotate Y and Rotate Z.
The animation divots changed into an "=", showing that an expression is now driving that parameter. (If you look on the tabs in your ppg - you'll see 3 'expression' tabs. Clicking on these will open a tab to let you adjust the expression without going into the expression editor.
Normally, because you made the changes (applied the expression) to a multi-ppg, it should have affected every cube. Unfortunately, there is a bug that only applies the expression to the first object in the selection.
There is a workaround though - just right click on each "=" sign by Rotate X in the multi ppg and choose "Copy Animation", then right-click and choose "Paste Animation". Do this for Y and Z as well. This copy/paste action will apply the expression to all the selected objects.
Now you should be able to grab that null and rotate the chain. It will curl like a finger.
Click on the "=" sign to open up the Expression Editor to take a closer look.
There's a bunch of expression tutorials over on www.edharriss.com, but there's a pretty comprehensive read in an excerpt from XSI Illuminated at : http://enemy.mesmer.com/moebius/FMPro?-db=article&-format=free%5ftutorial%5fread.html&-sortfield=LearningOrder&-op=eq&ProductName=XSI%20Illuminated%3a%20Expressions&-max=1&-find=
12-03-2004, 07:34 AM
What I have is a chain of cubes that are parented down the line and I want a null to make them rotate so they would bend over; i.e. cube4 is parented to cube3 which is parented to cube2 and so on, when I rotate the null centered at the parent "cube" all the cubes will follow the parent, but will also rotate the incriments of the null. I can get the first link, whichever axis I choose, to work through the "link with" command, but none of the other axis' do. I have that bad feeling that it's the way I have my preferences, but not sure what I did to set it that way. It gets me really frustrated because I know the answer is there and I just can't find it. Definitely banging my head against the proverbial wall.Try to drag the animation icon of the rotation channels of the null object to the corresponding icons of each cube. Hold down Ctrl while you drop the icons to prevent the expression editor to pop up each time. If you rotate the null all the cubes should do so in local space, so that the whole chain of cubes is bending accordingly.
EDIT: Ooops, ignore my post, Ablefish already explained it perfectly. :-)
12-03-2004, 03:50 PM
The bug still exists in 4.2 so the Copy Animation/Paste Animation is needed.
12-03-2004, 07:54 PM
Well, I thought that was exactly what I was looking for, but I am in the same place; whatever axis I link first is the only axis that works. Which tells me, again, that it is something in the way I have my preferences set or some transform locked that is preventing this from working.
Ever have that frustrated feeling that you know you changed one simple thing that altered everything you need to do, but you can't, for the life of you, remember what that was. I do appreciate all the help.
12-03-2004, 11:46 PM
Couldn't you upload a scenefile so that someone can have a look at it?
12-05-2004, 04:50 PM
I will- I'm in the process of removing XSI completely from my computer and reinstalling it to see if I can't rectify whatever I did. If this doesn't work I will post a scene.
12-06-2004, 01:01 AM
Okay, well that didn't work, as a matter of fact it made the problem worse. Now, as a display of my naivity, how do I upload my scene files for someone to have a look at them?
12-06-2004, 11:24 PM
If you zip a file, you should be able to attach it to a reply right through the cgtalk interface.
12-07-2004, 07:13 PM
Well, I guess you can't post an attachment until after you have 30 posts online, which I must be just shy of, but, good news(!), I installed my ver. 4.2 and all is good in the world- everything works like a charm. Thank you for all the responses and all the help.
01-20-2006, 12: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.
vBulletin v3.0.5, Copyright ©2000-2014, Jelsoft Enterprises Ltd.