Complete Guide to the Angle Measurement Plugin
This plugin measures angles between three points (nodes) on a figure and can drive various actions based on those measurements. Here's how to use it effectively:
Initial Setup
1. Installation
- Add the plugin to a Person atom (not Empty or other atom types)
- Go to the Person atom → Plugins tab → Add Plugin → Select "Angle Measurement.cs"
2. Understanding the Interface
The plugin creates several UI sections:
- Node Selection (3 dropdowns)
- Angle Configuration (sliders and toggles)
- Performance Settings (smoothing and frame skip)
- Trigger Controls (activation and actions panel)
Node Selection - The Foundation
Selecting Your Three Points
You need to choose three nodes that form the angle you want to measure:
- Center Node - The vertex of the angle (where the angle is measured from)
- Node 1 - First reference point
- Node 2 - Second reference point
Common Use Cases & Node Examples
Measuring Elbow Bend:
- Center Node: lForeArm or rForeArm
- Node 1: lShldr or rShldr (shoulder)
- Node 2: lHand or rHand
Measuring Knee Bend:
- Center Node: lShin or rShin
- Node 1: lThigh or rThigh
- Node 2: lFoot or rFoot
Measuring Head Tilt:
- Center Node: neck
- Node 1: chest
- Node 2: head
Measuring Spine Curve:
- Center Node: abdomen2
- Node 1: chest
- Node 2: hip
Finding the Right Nodes
- Use the "Refresh Available Nodes" button if nodes don't appear
- Nodes include both bones and control points
- The dropdown is alphabetically sorted for easier searching
- You can type to filter in the dropdown
Angle Configuration
Angle Range Settings
- Min Angle: The minimum angle value (typically 0°)
- Max Angle: The maximum angle value (typically 180°)
- Current Angle: Shows the live measurement (read-only)
Invert Angle Toggle
- Unchecked: Measures the direct angle between the vectors
- Checked: Measures 180° minus the angle (useful for inside vs outside angles)
Example: For an elbow bend, you might want to invert so that:
- Straight arm = 0°
- Bent arm = 180°
Performance Optimization
Smoothing Factor (0.01-1.0)
- Lower values (0.01-0.1): Heavy smoothing, slow response
- Higher values (0.5-1.0): Light smoothing, fast response
- Use smoothing to: Reduce jitter, create more natural transitions
Frame Skip Interval (1-30)
- Lower values (1-3): More frequent updates, higher CPU usage
- Higher values (10-30): Less frequent updates, better performance
- Recommended: Start with 6, adjust based on your needs
Setting Up Triggers
Activating the Trigger System
- Check "Trigger Active" toggle
- Click "Open Trigger Actions Panel"
- This opens the main trigger interface
Understanding the Trigger Types
Transition Actions (Most Common):
- Actions that scale with the angle measurement
- Perfect for morphs, poses, controller positions
- Value ranges from 0 (min angle) to 1 (max angle)
Start Actions:
- Trigger once when angle enters the defined range
- Good for sounds, enabling other plugins, starting sequences
End Actions:
- Trigger once when angle exits the defined range
- Good for cleanup, stopping sounds, resetting states
Practical Setup Examples
Example 1: Elbow Bend Drives Bicep Morph
Setup:
- Center Node: lForeArm
- Node 1: lShldr
- Node 2: lHand
- Min Angle: 30°
- Max Angle: 150°
- Invert Angle: ✓ (checked)
Trigger Action:
- Type: Transition
- Target: Person → Morphs → Pose Morphs → Bicep Flex
- Value range: 0 to 1
Result: As the elbow bends more, the bicep morph increases
Example 2: Knee Bend Controls Clothing
Setup:
- Center Node: lShin
- Node 1: lThigh
- Node 2: lFoot
- Min Angle: 20°
- Max Angle: 140°
Trigger Actions:
- Transition: Clothing sim → Clothing item → Sim properties
- Start Action: Sound → Play audio when knee bends
- End Action: Reset clothing to default state
Example 3: Head Nod Detection
Setup:
- Center Node: neck
- Node 1: chest
- Node 2: head
- Min Angle: 10°
- Max Angle: 45°
Trigger Actions:
- Start Action: Play "yes" animation
- End Action: Return to neutral expression
Advanced Tips
Calibration Process
- Set up your three nodes
- Manually pose the figure in the minimum position
- Note the "Current Angle" value and set as Min Angle
- Pose the figure in the maximum position
- Note the "Current Angle" value and set as Max Angle
- Test the invert toggle to see which gives better results
Troubleshooting
"No angle measurement":
- Check that all three nodes are selected
- Ensure you're using a Person atom
- Try refreshing available nodes
- Verify the nodes actually exist on your figure
"Jittery or erratic behavior":
- Increase smoothing factor
- Increase frame skip interval
- Check if your selected nodes are appropriate for the measurement
"Trigger not working":
- Ensure "Trigger Active" is checked
- Verify your min/max angle range makes sense
- Check that the angle actually varies within your range
Performance Considerations
- Use higher frame skip intervals for background measurements
- Lower smoothing for responsive controls
- Consider multiple instances for complex multi-joint setups
Creative Applications
- Facial expressions tied to jaw angle
- Clothing adjustments based on limb positions
- Lighting changes based on head orientation
- Sound effects triggered by specific poses
- Automatic pose corrections based on joint angles
This plugin is extremely versatile and can enhance realism by creating automatic responses to natural body movements. Experiment with different node combinations to discover unique applications for your specific needs.