.. _sec-zLineOfAction: zLineOfAction ------------- .. |br| raw:: html
When real muscles fire, they contract. In order to provide artistic control, the line of action capability permits you to model this process in reverse. The amount of contraction is determined by monitoring the length of a NURBS curve. The control points of this curve can be rigged in any arbitrary way, in a manner that approximates the insertion of the muscle into the bone(s). For example, you can rivet the curve endspoints to bone(s). Or, you can rig the curve with a skin cluster. .. note:: You should not rivet the curve to the muscle geometry itself, as this will create a cycle. If the curve length shortens (due to bone(s) motion), the zLineOfAction node fires the muscle, which in turn causes the muscle's volumetric shape to undergo geometric bulging. The zLineOfAction node automatically adds excitation to the muscle's zFiber node so that the muscle will contract to (approximately) match the **contraction** of given input curve(s). The curves are standard Maya NURBS curves; and most often, they only have two control nodes (one at each endpoint), which means that they are actually line segments. The resulting excitation depends on the curve's length ("pos"; generally, the shorter the length, the higher the excitation), the rate that the curve's length is changing ("vel"), and the acceleration of the curve's length ("acc"). Usually, these attributes can all be left at default values. The first parameters to try tweaking are posSensitivity and stretchBias. Note that the line of action firing is added on top of any firing set by zFiber's excitation attribute. The final muscle fiber excitation is the sum of the excitation set by zFiber's excitation attribute and the excitation originating from zLineOfAction. Therefore, zLineOfAction will have an effect even if you set zFiber's excitation to 0.0. .. note:: Prior to ZivaVFX v1.9, zLineOfAction did not take into account the zSolverTransform transform matrix during length computations. This could cause the wrong zFiber excitation in certain cases. |br| A new plug, iSolverParams, was introduced in ZivaVFX v1.9 to fix the problem. Disconnecting this plug causes the zLineOfAction node to report a warning message. To upgrade scenes made with older versions of ZivaVFX, please run following Python script in the Maya Script Editor: :: from utility import fix_loa_connection; fix_loa_connection.run(); +--------------------------+--------------------------------------------------------------------------------+ | Attribute | Meaning | | | | +==========================+================================================================================+ | **maxExcitation** | Clamp the excitation at this value. | | | | +--------------------------+--------------------------------------------------------------------------------+ | **stretchBias** | Sets the imaginary rest length of the muscle to be (1+stretchBias) times | | | the actual rest length. | | | The line of action will not excite when the curve is this length | | | (but will excite when the curve is shorter than this length). | | | This parameter can be positive or negative. | | | Setting stretchBias to a positive number will make the muscle excite | | | already when the curve's length equals its input length. | | | If stretchBias is set to a negative number, then the curve will need to | | | contract somewhat before any excitation occurs. | | | | +--------------------------+--------------------------------------------------------------------------------+ | **posSensitivity** | Multiplies the effect due to changes in curve length. | | | For example, setting this to 2.0 will double the amount of excitation. | | | | +--------------------------+--------------------------------------------------------------------------------+ | **velSensitivity** | Multiplies the effect due to velocity of the curve's length. | | | When this is large, the muscle will excite more when the curve is shrinking | | | and less when the curve is elongating. | | | Typically, this can be left at zero. | | | Effective values for this attribute are difficult to determine. | | | Values of 1000 or more may be required to see an effect. | | | It depends significantly on the animation. | | | | +--------------------------+--------------------------------------------------------------------------------+ | **accSensitivity** | Same concept as velSensitivity, but based on acceleration instead of velocity. | | | | +--------------------------+--------------------------------------------------------------------------------+ | **oLength** | For reference, this is set to the length of the input curve(s). | | | | +--------------------------+--------------------------------------------------------------------------------+