and I need some advice first. I came across a tech demo by Naughty Dog
and they had this awesome wrist setup
And I have been trying to find out what it is and how to apply that to game rigs. I have seen it done on a few maya rigs available out there, but I am rigging this one for multiple game engines like UDK, Unity and gonna try Cry engine too. And I would really like to test this out but I havent found any papers on how to build it like I want it.
I have seen ow its done using blendshapes so when a bone is 100% in the cone that blendshape kicks in 100% deformation, but I need the same method to work on deformation joints.
So lets say when the index finger bends down 90 degrees the knuckle joint kicks in and preserves the volume of the knuckle, but when the index finger is bend the opposite way (up) the knuckle joint is not driven.
I hope I explained myself and if there is a topic on this please direct me to it, much appreciated
thanks!
FWIW, A cone is easy to test for: get the vector of the cone ( typically that would be the worldspace vector that’s the local X axis of the bone) and vector to the test point from the Bone. Do a dot product on the vectors and see if the point is inside the angle: A dot product of 0 would mean they are 90 degrees apart, a dot of 1 would mean they are aligned: in between the dot will be the cosine of the angle
I basically take the matrix of the target and destination node and pipe those into a custom node that then compares two axis against each other. The calculations boiled down to dot products of the two axis vectors and some angle math.
The user can specify x against x or x against y, etc. I extended the calculation to describe editable ellipse cones so the user could describe a more arbitrary shape (more like havok ragdoll constraint cones…), with a min and max. the output was basically 0-1. 0=outside the max bounds and 1 inside the min bounds and 0-1 blend in-between.
with that you can drive set driven keys or constraint weight values… whatever you want.
Thanks for the replies and apologies for late reply, Ive been busy with an art test for the last 4 days, but ive read through the posts the same day. I was going to say that what Marco showed was great, but its only half of the setup that I want to do (making a pose reader). So I was thinking of how to drive the deformation bones and like Andy said it seems to be the set driven key way.
Andy you have some awesome stuff over there its exactly what I want to set up! Its just that my minimal node and almost to none scrippting knowledge in maya is slowing me down and I cant wait to test things out once Im done with this art test. It seems your method is a little different to Marcos as you are using dot product. I dont wanna ask for a personal tutorial as you must be a pretty busy guy lol, but any links to help me understand it would be of much help, I will try dig around it myself.
Something more simplistic can be created without any heavy scripting. I did many tests trying to get what i wanted without api code first.
Off the top of my head, you can use a VectorProduct node, pipe in to that two world matricies (if you use locators there’s a .worldMatrix attribute already on the shape node) and then set the vector product to dot product operation.
You can then use some set range nodes and some conditions to change the dot product output to something that sets some min max bounds(via some attributes on another node somewhere).
There’s no nice cone being drawn doing it this way but the calculations should work. I’m sure you could use some nodes to give you a visual output.
I’m oversimplifying it, but if i had to recreate something, i’d start there.
Something more simplistic can be created without any heavy scripting. I did many tests trying to get what i wanted without api code first.
Off the top of my head, you can use a VectorProduct node, pipe in to that two world matricies (if you use locators there’s a .worldMatrix attribute already on the shape node) and then set the vector product to dot product operation.
You can then use some set range nodes and some conditions to change the dot product output to something that sets some min max bounds(via some attributes on another node somewhere).
There’s no nice cone being drawn doing it this way but the calculations should work. I’m sure you could use some nodes to give you a visual output.
I’m oversimplifying it, but if i had to recreate something, i’d start there.
I didn’t read through all this and the linked articles, but Maya now has an “angle between” node. Feed it two vectors and you’ve got yourself a pose reader. Use set driven keys or route the output of the “angle between” node to something like a “set range” node, in order to drive your joints.
Of course stuff like this should really in many cases be handled at runtime as well (depending on your needs), but that opens another can of worms.