FredDoes3D Posted May 27, 2015 Share Posted May 27, 2015 Hi there, first post here! I have recently started dabbling with Houdini again, currently following a digital tutors tutorial running into an issue: In the video the tutor copies the transform channel parameters of one xform node and pastes them into another xform as relative reference. (the goal is to make one object do the same transformation as another object is doing) i always get a bad parameter reference error. I noticed that in his xform node he has transform values (after using $CEX and $CEZ to put the first object on 0,0,0) in mine its all 0?He is using an older version of houdini so im wondering i im doing something wrong or if the node might have changed? Since the process is simply copy paste i cant find an error in what im currently doing. Maybe one of you can find one? Is there another way of doing the same thing? Thanks! Quote Link to comment Share on other sites More sharing options...
Sierra62 Posted May 27, 2015 Share Posted May 27, 2015 Can you post a scene? based off what I think you are asking. Right click on the variable name(translate), select copy parameter. Then on the transform node you want to copy to, select the same parameter name, right click and select paste copied relative reference. The $CEX $CEY $CEZ is a common expression for Pivot. This expression takes the pivot point and moves into the center of the object. If you upload your scene I could probably give you better advice. Quote Link to comment Share on other sites More sharing options...
FredDoes3D Posted May 27, 2015 Author Share Posted May 27, 2015 yes this is exactly what im asking for and is the same as whats being explained in the video.am literally doing exactly that but it gives me a bad parameter reference ill post the scene when i get back homethanks for the quick reply! Quote Link to comment Share on other sites More sharing options...
FredDoes3D Posted May 27, 2015 Author Share Posted May 27, 2015 here is the problem singled out, im trying to get the transformation of xform3 copied into xform4 (are there other methods of doing this? in a traditional package i would use something like grouping or a point constraint) transformBadReference.hip Quote Link to comment Share on other sites More sharing options...
gaurav Posted May 27, 2015 Share Posted May 27, 2015 try following in tx ty tz fields eval(chsraw("../xform3/tx")) eval(chsraw("../xform3/ty")) eval(chsraw("../xform3/tz")) Quote Link to comment Share on other sites More sharing options...
FredDoes3D Posted May 27, 2015 Author Share Posted May 27, 2015 hi gaurav thanks for your input! your expression does work in the example scene but i read up on what it does and from what i understand its basically like putting the same expression/variable (-$CEX in this case) into the other object's transform right? even though it works in this example its not what i want in my final scene as it only returns a correct result if both objects to be moved are the same, right? what i want to do is: take a poly object, change it with the clip SOP, use the modified object's centroid to move it to 0,0,0 and apply the same transformation to the original, unaltered object) any ideas why i cant just copy the relative reference to the copy sop as it is intended? driving me nuts haha Quote Link to comment Share on other sites More sharing options...
anim Posted May 27, 2015 Share Posted May 27, 2015 that workflow doesn't for quite a few versions back, it was made that way on purpose due to some dependency issues if I recall correctly so since then local variables will not evaluate within the parameter, therefore will return 0 and since the parameter will show 0, the reference will get 0 as well so as a solution you need to use centroid() expression instead of $CE? so: centroid(opinputpath(".",0), 0) centroid(opinputpath(".",0), 1) centroid(opinputpath(".",0), 2) that will give you the same result, and populate parms with correct values, so your references will work Quote Link to comment Share on other sites More sharing options...
FredDoes3D Posted May 28, 2015 Author Share Posted May 28, 2015 Thank you Tomas, that solves my issue! I will use the centroid expression from now on!So as a general rule, local variables I can only use within a node, not referencing it by others? Quote Link to comment Share on other sites More sharing options...
anim Posted May 28, 2015 Share Posted May 28, 2015 it's safer to think about it that way you can as well use bbox() expression to replace $SIZE?, $?MIN and $?MAX variables if you need to reference the values Quote Link to comment Share on other sites More sharing options...
FredDoes3D Posted May 29, 2015 Author Share Posted May 29, 2015 great, ill have a play with bbox too, learned a bit about it a while back in class but i will definitely have to brush up on it Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.