Nham
08-15-2007, 07:46 PM
Hello again everybody
I come with another tricky set-up problem. It deals with rigging but I think that perhaps my messiah could be maxscript or C++ so...
I try to make a cool spine for hours and I can't find a way to do it. Actually I want to clone the spine rig I've made for XSI.
To make it simpler let's take a spine composed of three dummies controlling a curve (by linked x-forms (fig. A in attachment). On the curve we have points as spine-divisions that are driven by a custom controller. Basically this controller constraints the spine-division position to the curve at a certain path percentage, constraints his x and y rotations to the curve tangent at this particular point and constraints the z rotation to a combination of the rotations of the three spine controllers. As a result, the spine-divisions can follow the curve deformation and tangent to make a nice smoothly-distributed spine (fig. B in attachment).
Finally, the scale is driven in « volume conservation » behaviour, that means It’s squashing and stretching with the curve squash&strech (fig. C in attachment).
So to make a spine rig with Max who reach this type of behaviour, I first tried to begin with a path constraint, then I realize that this controller consider the world Z-axis as an upnode for the transformation. Unfortunately, having this kind of “static” upnode always pose problems when the constrained object passing through this orientation (remember what happen when you want to make a 360 degrees circular path with a camera with target. When it comes to the 180 degrees, aligned with the “upnode” or “upvector”, the camera roll becomes crazy because this there is nothing anymore to say where the top is for the camera, when you pass 180 degrees, the camera can find the upnode and flips to orient the camera with the right top reference again, see fig. D in attachment).
As I can’t find a way to assign a new upnode for Path constraint, I then tried to develop a scripted controller to drive the divisions positions on a curve by an other way that a path constraint.
So I found some interesting functions to use with C++ or maxscript: interpCurve3D to get a position on the curve at the specific path percentage and tangentCurve3D for the tangent
Once again, it can’t solve my problem,:shrug: because the values returned by interpCurve3D & tangentCurve3D are correct for baseobject level (Line). In my case, there is a linkedXform on each vertex of the curve.
Since the functions are designed for base object level, it works perfectly when just moving the points “by hand” at Line level, but it can’t get the curve position and tangent when the vertices are driven by modifiers at sub-object level.
Here you are…I really need help because I just don’t see how I can smartly drive this spine-divisions. I will search if there is a way to drive the points directly at baseobject level regarding to the controllers position (in a way re-write a linkedXform that is not a modifier but simply drives the points realtime) but if I have to do that, I will need help too.
Maybe a Splineshape plugin in C++ ?
Sorry for being so long but I think that if you want to help me you will need to know all this stuff :) .
Thanks in advance
I come with another tricky set-up problem. It deals with rigging but I think that perhaps my messiah could be maxscript or C++ so...
I try to make a cool spine for hours and I can't find a way to do it. Actually I want to clone the spine rig I've made for XSI.
To make it simpler let's take a spine composed of three dummies controlling a curve (by linked x-forms (fig. A in attachment). On the curve we have points as spine-divisions that are driven by a custom controller. Basically this controller constraints the spine-division position to the curve at a certain path percentage, constraints his x and y rotations to the curve tangent at this particular point and constraints the z rotation to a combination of the rotations of the three spine controllers. As a result, the spine-divisions can follow the curve deformation and tangent to make a nice smoothly-distributed spine (fig. B in attachment).
Finally, the scale is driven in « volume conservation » behaviour, that means It’s squashing and stretching with the curve squash&strech (fig. C in attachment).
So to make a spine rig with Max who reach this type of behaviour, I first tried to begin with a path constraint, then I realize that this controller consider the world Z-axis as an upnode for the transformation. Unfortunately, having this kind of “static” upnode always pose problems when the constrained object passing through this orientation (remember what happen when you want to make a 360 degrees circular path with a camera with target. When it comes to the 180 degrees, aligned with the “upnode” or “upvector”, the camera roll becomes crazy because this there is nothing anymore to say where the top is for the camera, when you pass 180 degrees, the camera can find the upnode and flips to orient the camera with the right top reference again, see fig. D in attachment).
As I can’t find a way to assign a new upnode for Path constraint, I then tried to develop a scripted controller to drive the divisions positions on a curve by an other way that a path constraint.
So I found some interesting functions to use with C++ or maxscript: interpCurve3D to get a position on the curve at the specific path percentage and tangentCurve3D for the tangent
Once again, it can’t solve my problem,:shrug: because the values returned by interpCurve3D & tangentCurve3D are correct for baseobject level (Line). In my case, there is a linkedXform on each vertex of the curve.
Since the functions are designed for base object level, it works perfectly when just moving the points “by hand” at Line level, but it can’t get the curve position and tangent when the vertices are driven by modifiers at sub-object level.
Here you are…I really need help because I just don’t see how I can smartly drive this spine-divisions. I will search if there is a way to drive the points directly at baseobject level regarding to the controllers position (in a way re-write a linkedXform that is not a modifier but simply drives the points realtime) but if I have to do that, I will need help too.
Maybe a Splineshape plugin in C++ ?
Sorry for being so long but I think that if you want to help me you will need to know all this stuff :) .
Thanks in advance
