AiyaPK Posted June 6, 2018 Share Posted June 6, 2018 As the title suggests. So suppose I have a single point somewhere in space, this would be my parent point. Now suppose I add a child point at (1,1,1) from the parent point. How could I ensure that if I rotate this parent point in my animation, the child point would maintain its distance and 'orientation' with respect to the parent point? I realize parent/child constraining is a feature of chops? but I think I would like to maintain control and flexibility back at the point level. I think this somehow involves matrices and vector math but not entirely sure what's the proper method. My thinking is to give the parent point an arbitrary orientation (let's call it N). There would also be a vector from the parent to the child point. And then maybe there would be a length calculated so it is known how many units away this child is. This would be the rest state. My parent point would get animated, at which point, the parent N would be pointing somewhere else. I would query this new N to compare to the template N, and from there work out where my child point is suppose to be... Is this the proper way of approaching this problem or is there some incredibly simple tool I'm missing for this exact purpose? Quote Link to comment Share on other sites More sharing options...
julian johnson Posted June 6, 2018 Share Posted June 6, 2018 Not sure if this is what you need but it illustrates a simple way of doing a very rudimentary parent/child hierarchy in vex. The parent can have any number of children (including 1). (Done in 16.5.473). parent.hip Quote Link to comment Share on other sites More sharing options...
AiyaPK Posted June 7, 2018 Author Share Posted June 7, 2018 thx julian for the tip! I'm going to use your example as a basis and work from there. Your example gave me some pretty good insight into how to use matrices so hopefully I'll be able to find my answer. One question though, in one of your attrib wrangles, you had @m.ay=0.1 I was curious and randomly tried out m.az and m.bx... are these how you access the individual attributes of a matrix in vex? so 'a' is actually the 4th row for translation, and 'b' is for the 3rd row? I tried 'c' and 'd' but they don't work.. Is there a help card detailing this? Quote Link to comment Share on other sites More sharing options...
julian johnson Posted June 7, 2018 Share Posted June 7, 2018 (edited) http://www.sidefx.com/docs/houdini/vex/lang.html If you look under the heading 'Dot Operator' there's an explanation of the matrix dot syntax. Edited June 7, 2018 by julian johnson 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.