I am currently studying the Rigging For Games book by Eyal Assaf, but I am having trouble in chapter 5, regarding the stretchy IK part.
The problem is is that it tells me I need to do the following:
1. topJnt_LOC > RotatePivotTranslate to topJnt_DBN > Point1
2. topJnt_LOC > RotatePivotTranslate to atRest_DBN > Point1
3. topJnt_LOC > World Matrix [0] to atRest_DBN > InMatrix1
4. midJnt_LOC > RotatePivotTranslate to topJnt_DBN > Point2
5. midJnt_LOC RotatePivotTranslate to endJnt_DBN > Point1
6. endJnt_LOC > World Matrix [0] to atRest_DBN > InMatrix2
7. endJnt_LOC > RotatePivotTranslate to atRest_DBN > Point2
8. endJnt _LOC > RotatePivotTranslate to endJnt_DBN > Point2
_LOC's are location objects and _DBN's are DistanceBetween nodes. However, when I try to connect the RotatePivotTranslates to their respective Points, the value I get is 0.0 for endJNT_DBN and topJNT_DBN. The atRest_DBN seems to work, so I assume it has something to do with the Matrices. Meanwhile, the file that I downloaded from http://www.thetingirl.com/rigging-for-games/ has these same nodes and they give me the right values ~5 for topJnt_DBN and ~6.6 for endJnt_DBN. Even more crazy, if I create a new node in the provided file, I get 0.0 for the values, while if I import those nodes from the provided file into my working file, the nodes give me the proper values. I am at a complete loss as to why one works and the other doesn't.
Hi @Peteman12 and welcome!
I downloaded the chapter 5 files but I'm not really sure what file you're working with.
Also though, are your unit measurements the same as the one in the book you're following? Often if the units are different they can throw off things likes this.
Let me know if anything changes!
All the best,
Sean Heasley
Technical Support Specialist
Autodesk Here to Help | My Screencasts | Autodesk Virtual Agent | How To Reset User Settings | Installation and Licensing Forum | Maya Certified Hardware |
Sorry, @sean.heasley
I was working on 01_Meep_leg_setup, and 02_Meep_wing_setup has the working distanceBetween nodes that I imported (I assume the rest do, but that's irrelevant at the moment). My problem is that whenever I create a new distanceBetween node, I get this problem, but when I use the preexisting distanceBetween nodes in 02_Meep_wing_setup, things work out fine.
I don't think the unit measurements would matter in this case. I get 0.0 for the values for the newly created distanceBetween nodes while the imported ones give me the proper values. Meanwhile the units are the same.
Hi @Peteman12 sorry for the delayed response!
Can you reproduce it with a simple scene (just joints, or locators or transforms)?
All the best,
Sean Heasley
Technical Support Specialist
Autodesk Here to Help | My Screencasts | Autodesk Virtual Agent | How To Reset User Settings | Installation and Licensing Forum | Maya Certified Hardware |
Here is the file, with only the original good utility nodes (_Good), and newly generated utility nodes (_New).
Thanks for the file @Peteman12
While I'm looking at it, a coworker asked if you're using Maya in parallel mode? That can often cause some wonky issues with the Distance Node.
It might be better to set DG mode for evaluation to make sure the nodes are evaluated correctly. Worth giving it a shot 🙂
All the best,
Sean Heasley
Technical Support Specialist
Autodesk Here to Help | My Screencasts | Autodesk Virtual Agent | How To Reset User Settings | Installation and Licensing Forum | Maya Certified Hardware |
Settings->Animation->Evaluation Evaluation Mode: DG.
I just tried that, it didn't work. Any other ideas?
Hmmm I'm not 100% sure.
Some co workers say it may be an issue on your end. Since I don't have access to the tutorial can you possibly start from scratch and see if there's a step you missed or potentially post it here so I can follow along with you.
All the best,
Sean Heasley
Technical Support Specialist
Autodesk Here to Help | My Screencasts | Autodesk Virtual Agent | How To Reset User Settings | Installation and Licensing Forum | Maya Certified Hardware |
I'm not sure what step I could have missed. The only difference between the nodes is that one set is from a pre-existing scene where the nodes worked and the other are freshly generated. Why would the newly generated ones have this issue?
Hi!
For me it looks that the old nodes (without Matrix Connection) outputs wrong (some sort of baked in values) and the new ones are correct.
If the 1. Rotate Pivot Translate has a value of 0 0 0 and the 2. also has 0 0 0, then the distance between them is 0.
This can change if you additional connect Matrix values.
Keep in mind that there are many changes since Maya 2014 (feature changes and bugfixes).
Huh... That is strange. I am confused.
I won't say this fixes my problem, but it does make it make more sense.
This is frustrating.
Thanks for pointing this out.
Hi @Peteman12
A co-worker read your issue and said this
"The behavior of connections is correct in value.
All of *Jnt_LOC.rotatePivotTranslate are surely set as 0 0 0. Thus distanceBetween.point1 and point2 will be 0 0 0. This is correct.
The point is what the rig needs to achieve. I couldn’t know it because I couldn’t access the tutorial book, but it’s better to change the connection source something topJnt_LOC.translate or something else.
.rotatePivotTranslate is the value of translation for the pivot point. This is 0 0 0 by default. I recommend the user set the new value and check the distanceBetween node.
It’s easy to set, just run following line in the script editor.
setAttr topJnt_LOC.rotatePivotTranslateX 1;
Then check atRest_DBN.point1. It should be 1.0. If it’s 1.0, the nodes are working properly but .rotatePivotTranslate should be replaced to another attribute where it works when animating the rig. .rotatePivotTranslate is not updated in animation usually. I guess .translate is just fine but there would be more suitable attribute. It depends on what the user wants to do."
Let me know if this helps!
All the best,
Sean Heasley
Technical Support Specialist
Autodesk Here to Help | My Screencasts | Autodesk Virtual Agent | How To Reset User Settings | Installation and Licensing Forum | Maya Certified Hardware |
The purpose of this is to create a base length for a stretch IK. And when I tried to use the Translate value as an experiment, the length would change if I went to close in, meaning that the leg would shrink.
Okay, it turns out that even the book acknowledges the solution they provided doesn't work anymore. A later chapter seemed to have this work out without the need for the middle LOC and using world Matrices.
Thanks for your help anyways. I very much appreciate it.