Go to: Related nodes. Attributes.

The spring node represents a group of springs between points in one or more particle or geometry objects. The stiffness, damping, restLength, and end1weight/end2Weight attributes control the motion of the springs.

Node name Parents MFn type Compatible function sets
spring shape kSpring kBase
kNamedObject
kDependencyNode
kDagNode
kShape
kSpring

Related nodes

rigidConstraint, dynBase, field, airField, turbulenceField, radialField, vortexField, newtonField, volumeAxisField, dragField, uniformField, gravityField, pointEmitter, particle, rigidBody, geoConnectable

Attributes (36)

count, damping, dampingPS, deltaTime, end1Weight, end2Weight, idIndex, idMapping, lengths, manageParticleDeath, maxUsed, minSprings, minUsed, obj0Index, obj1Index, objCount, object0, object1, objectMass, objectPositions, objectVelocities, objects, outputForce, point0, point1, pt0Index, pt1Index, restLength, restLengthPS, sortedId, stiffness, stiffnessPS, useDampingPS, useRestLengthPS, useStiffnessPS, validIndex

Long name (short name) Type Default Flags
end1Weight (f) double 1 outputinputconnectablestorablekeyable
The amount [0,1] that the first or the 'from' end will be affected by the spring.
end2Weight (t) double 1 outputinputconnectablestorablekeyable
The amount [0,1] that the second or the 'to' end will be affected by the spring.
useStiffnessPS (usps) bool true outputinputstorablekeyable
This attribute determines if the node uses per object or per spring stiffness. If true, each spring will use the corresponding value in the stiffnessPS array. If false, every spring will use the stiffness attribute value.
useDampingPS (udps) bool true outputinputstorablekeyable
This attribute determines if the node uses per object or per spring damping. If true, each spring will use the corresponding value in the dampingPS array. Otherwise, every spring will use the damping attribute value.
useRestLengthPS (urps) bool true outputinputstorablekeyable
This attribute determines if the node uses per object or per spring rest length. If true, each spring will use the corresponding value in the restLengthPS array. Otherwise, every spring will use the restLength attribute value.
stiffness (s) double 1 outputinputconnectablestorablekeyable
This attribute is per object. The strength with which springs are trying to maintain their length.
damping (d) double .2 outputinputconnectablestorablekeyable
This attribute is per object. How strongly the motion of springs are damped by the 'physical' properties of the springs. A larger value makes the springs converge faster to their rest length.
restLength (r) double 0 outputinputconnectablestorablekeyable
This attribute is per object. The length at which springs try to stay.
stiffnessPS (sps) doubleArray empty outputinputconnectablestorable
This attribute is per spring. The strength with which springs are trying to maintain their length. PS stands for per-spring. This attribute stores an array of data, one for each spring. The value can be edited with the spring command or component editor.
dampingPS (dps) doubleArray empty outputinputconnectablestorable
This attribute is per spring. How strongly the motion of springs are damped by the 'physical' properties of the springs. PS stands for per-spring. This attribute stores an array of data, one for each spring. The value can be edited with the spring command or component editor.
restLengthPS (rps) doubleArray empty outputinputconnectablestorable
It is per spring attribute which represents the length at which springs try to stay. PS stands for per-spring. The values can be edited with the spring command or component editor.
objectPositions (opos) vectorArray empty arrayoutputinputconnectablestorable
position array for the objects incident to the springs.
objectVelocities (ovel) vectorArray empty arrayoutputinputconnectablestorable
velocity array for the objects incident to the springs.
objectMass (omas) doubleArray empty arrayoutputinputconnectablestorable
mass array for particle objects incident to the springs.
deltaTime (dt) time 0film arrayoutputinputconnectablestorable
spring node may need deltaTime to compute force. It is connected with particle objects.
outputForce (of) vectorArray empty arrayoutputconnectable
output force to particle objects. It is "CACHED" so that the computePlug is called once for all nodes which are waiting for the output force from this spring node.
validIndex (vali) intArray empty outputinputstorablehidden
Indices to indicate which springs are valid.
object0 (obz) intArray empty outputinputstorablehidden
Indices of attached object(should be plug multi-index in the aObjectPositions attribute).
point0 (ptz) intArray empty outputinputstorablehidden
Indices of spring endpoints in their respective objects.
object1 (obo) intArray empty outputinputstorablehidden
Indices of attached object(should be plug multi-index in the aObjectPositions attribute).
point1 (pto) intArray empty outputinputstorablehidden
Indices of spring endpoints in their respective objects.
minSprings (ms) integer 0 outputinputstorablehidden
This attribute hold the shortest length of index arrays so that computeForce method will use it to get each spring without over range of the five index arrays. This will save time (don't do too many checkings) and method won't fail if some springs are missing. This attribute is affected when edit end object index arrays or end point index arrays.
manageParticleDeath (mpd) bool true outputinputstorablekeyable
This attribute determines if the spring node need to do ID/Index mapping. The default value is true for this attribute. If users know that there is not any particle died, it can be set to false. With the false value, the spring node will not do particle Id/index mapping and speed up the evaluation.
idMapping (idm) compound n/a arrayoutputinputconnectablehidden
This attribute holds the mapping information for the particle IDs<<==>>Index into per-particle attribute arrays. It will connected with aIdMapping of particle nodes.
sortedId (sid) intArray empty outputinputconnectablehidden
With this attribute, we get the particleIds from particle node. The particleId values are sorted in ascending order.
idIndex (idix) intArray empty outputinputconnectablehidden
With this attribute, we get the particle index positions into per-particle attribute arrays for the corresponding ids stored in aSortedId.
count (cnt) integer 0 outputconnectable
The number of springs in the object.
objects (obj) Message n/a arrayoutputinputconnectablehidden
Obsolete. Used only to read version 1 files. Will be removed after version 2.
objCount (obc) integer 0 outputinputconnectablehidden
Obsolete. Used only to read version 1 files. Will be removed after version 2.
lengths (lns) doubleArray empty outputinputconnectablestorablehidden
Obsolete. Used only to read version 1 files. Will be removed after version 2.
minUsed (mnu) double 0.0 outputinputconnectablehidden
Obsolete. Not used. Will be removed after version 2.
maxUsed (mxu) double 0.0 outputinputconnectablehidden
Min value used when springs were made Obsolete. Not used. Will be removed after version 2.
pt0Index (pzi) doubleArray empty outputinputconnectablehidden
Used only to read version 1 files. Will be removed after version 2.
pt1Index (poi) doubleArray empty outputinputconnectablehidden
Used only to read version 1 files. Will be removed after version 2.
obj0Index (ozi) doubleArray empty outputinputconnectablehidden
Used only to read version 1 files. Will be removed after version 2.
obj1Index (ooi) doubleArray empty outputinputconnectablehidden
Used only to read version 1 files. Will be removed after version 2.