You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-175Lines changed: 6 additions & 175 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,186 +32,17 @@ If you have to compile locally for windows, there's a `mayaConfigure.bat` file t
32
32
33
33
Currently, the easiest way to handle building a spline and all of its required connections is to use `twistSplineBuilder.py` and run the `makeTwistSpline` function inside. You will probably have to edit this file to fit in your pipeline.
`prefix` is the naming prefix for all the DAG objects.
38
38
`numCVs` is the total number of CVs
39
39
`numRiders` is the number of evenly spaced locators riding the spline. Locators are used because joints don't show orientation.
40
40
`spread` is the amount of space between each controller (cv and tangent). So a spread of 1 makes the CVs 3 apart.
41
41
`maxParam` is the parameter value of the last CV. It defaults to (3 * spread * (numCVs - 1))
42
+
`closed` is whether the spline will form a closed loop
43
+
`singleTangentNode` is whether to use the newer/simpler single node to calculate the automatic tangents
42
44
43
-
# Node Documentation
44
-
45
-
## TwistSpline Node
46
-
47
-
This node implements the TwistSpline, which is a dynamically re-parameterizing bezier spline that interpolates twist along its length.
48
-
49
-
This TwistSpline can have any number of Control Vertices, and each control vertex has an incoming and outgoing tangent. The incoming tangent is ignored for the first CV, and the outgoing tangent is ignored for the last CV.
50
-
51
-
The OutputSpline plug is a custom type specific to this set of nodes.
52
-
53
-
The per-CV plugs control how the spline behaves and reparameterizes. The ControlVertex plug recieves the worldpace position and orientation of the CV itself. The InTangent and OutTangent are world matrices that define the bezier tangent positions and orientations for this CV. ParamValue and ParamWeight are used as a pair. ParamValue is the parameter that the currentCV will have when ParamWeight is 1.0. If ParamWeight is 0.0, then the parameter of this CV will float between it's neighbor's parameters (as a percentage of the lengths of its neighboring bezier spline segments). The parameterization algorithm works as long as any paramWeight is greater than 0.
54
-
55
-
TwistValue and TwistWeight work in a similar way. Twists are interpolated between values that have weight, and skip those that don't. Because this is handled as an interpolated float value, twist behavior allows for arbitrary values, and can twist past 360deg multiple times along the spline.
56
-
57
-
UseOrient is the "weight" of the ControlVertex worldspace orientation as part of the twist. Because of the limitations of Matrices and Quaternions, you can never get more than a 180 degree twist using orient behavior and popping can occur if you're not careful.
58
-
59
-
DebugDisplay and DebugScale show the orientation frames calculated along the spline and control their size.
60
-
61
-
62
-
| Long Name (short name) | Type | Default |
63
-
| --- | --- | --- |
64
-
|outputSpline (os) | TwistSpline | n/a |
65
-
| `The custom spline data output`|||
66
-
|outputNurbsCurve (onc) | NurbsCurve | n/a |
67
-
| `A Maya-native NURBS curve output. Note: It will reparameterize by length, but it will not include twist data`|||
68
-
|splineLength (sl) | double | 0.0 |
69
-
| `The total length of the spline`|||
70
-
|splineDisplay (sd) | bool | True |
71
-
| `Whether to draw the spline`|||
72
-
|debugDisplay (dd) | bool | False |
73
-
| `Whether to show the debug axes`|||
74
-
|debugScale (ds) | double | 1.0 |
75
-
| `The size of the debug axes`|||
76
-
|vertexData (vd) | compound | n/a |
77
-
| Inputs for all of the per-cv data |||
| `Whether to use the orientation of this CV as part of the twist`|||
94
-
95
-
## TwistTangent Node
96
-
97
-
This node Controls the behavior of a single bezier tangent control.
98
-
99
-
This node assumes the tangent being controlled is an outgoing tangent. So for incoming tangents, the "previous" and "next" cvs are swapped.
100
-
101
-
These nodes usually come in pairs. One for each twist spline segment. The in/out linear targets are connected in a cycle between them. Don't worry, it's not an *actual* cycle as the plugs aren't connected that way internally to the node.
102
-
103
-
| Long Name (short name) | Type | Default |
104
-
| --- | --- | --- |
105
-
|out (out)| double3 | n/a |
106
-
| `The final output from this node. Usually connected to a tangent input on a TwistSpline node`|
| `The linearTarget Z component`|
148
-
|auto (a)| double | 1.0 |
149
-
| `Whether or not the output is controlled automatically by the CVs`|
150
-
|smooth (s)| double | 1.0 |
151
-
| `Whether an automatic output is smooth or linear`|
152
-
|weight (w)| double | 1.0 |
153
-
| `The Length of the auto tangent. A weight of 1 is 1/3 of the distance between the current and next CVs`|
154
-
155
-
## RiderConstraint Node
156
-
157
-
A node that gets transformations at a given parameters along the spline. Generally, you will make many rider objects, and skin your geometry to those riders.
158
-
159
-
This node contains many convenience options. Normalization allows easy 0 to 1 parameterization no matter the length of the spline (as a spline that is unpinned will default to parameterizing by length). The globalOffset and globalSpread parameters are common sliding options. And useCycle allows you to constrain in loops so any rider that goes past the end parameter will loop back to the beginning, and vice-versa.
160
-
161
-
The multiple spline inputs allows you to switch between controlling splines. For instance, you could build a second spline with extra controls as the need arose, and swap control of the riders to that new spline.
162
-
163
-
Note: Despite its name, this isn't actually implemented as a constraint, but it behaves similarly.
164
-
165
-
| Long Name (short name) | Type | Default |
166
-
| --- | --- | --- |
167
-
|rotateOrder (ro) | enum | XYZ |
168
-
| `Enum of the rotation order standard to Maya`|
169
-
|globalOffset (go) | double | 0.0 |
170
-
| `A value added to all input parameters. This shifts everything connected to this constraint along the spline.`|
171
-
|globalSpread (gs) | double | 1.0 |
172
-
| `A value multiplied by all input parameters. This spreads everything out (happens before the offset)`|
173
-
|useCycle (uc) || false |
174
-
| `Whether or not to cycle the parameters once they go past the end. If not, they extrapolate linearly.`|
175
-
|normalize (n) | boolen | True |
176
-
| `If true, then the input parameters are remapped so that (0, normValue) maps to (0, restLength) of the spline`|
177
-
|normValue (nv) | double | 1.0 |
178
-
| `The remapped maximum value when normalizing`|
179
-
|inputSplines (is) | compound | n/a |
180
-
| `The group that is a spline and its corresponding weight.`|
0 commit comments