Shade 10 PathConstraints
From ShadeCamp
Contents |
PathConstraints
PathConstraints provides additional power to Shade’s animation features and is used to animate objects smoothly along a path or set still objects to a specifically shaped path. PathConstraints is included with both Shade standard and professional.
Animating Objects Along a Path
Animating a Train Along a Track
Creating the Train
To model a simple train, extrude a closed line object and then create a hierarchy structure with a ball joint. To illustrate how PathConstraints works a sample file is included ready to use.
1. Open ShadeExplorer by choosing ShadeExplorer from the View menu.
2. In ShadeExplorer select the Documentation- Sample tab and open "SM_8504_PathConst01_rail. shd." If you drag and drop the file into the Figure window from ShadeExplorer the objects in the scene will be placed inside a Part.
Tip: Select "Supplemental Manual" from the Catalog pulldown menu in ShadeExplorer to display all the samplefiles used in the Supplemental Manual.
In this file an open line represents the path that the train will follow, a closed line represents the cross section of the track, and an extruded closed line represents the train car. The open line will be the path used for PathConstraints.
3. Choose Ball Joint from the Part tool in the Toolbox and click at the front end of the train to create a ball joint there. In this sample file, the ball joint should be located precisely at the origin of the scene, world coordinates 0, 0, 0.
4. In the Browser, move the extruded closed line inside the ball joint. This train car will be the first car.
5. With the Ball Joint part selected in the Browser, choose Copy > Translation from the Toolbox and create a copy of the train car behind the original. Do the copy operation four times so that the result is five train cars lined up in a row.
6. Now arrange the objects in the Browser so that the ball joints (and train cars) are nested within each other, as shown below. The last train car should be nested inside the fourth ball joint, which in turn should be nested within the third ball joint, and so on creating a hierarchy of ball joints.
The train is now finished.
Creating the Track
To create the train track we will extrude the closed line object along the path of the open line. Since this is the same open line that will be used for PathConstraints, it will be easiest to set the starting point at exactly the same point as the ball joint of the first car. The starting point of the open line in this sample file is at the origin.
1. Select the open line and click the Memorize button in the Toolbox to memorize the object. If the Memorize button is hidden, click the black triangle next to Memory in the Toolbox to make it visible.
2. Select the closed line and choose Sweep (under Memory) in the Toolbox. The track is extruded along the open line.
Using PathConstraints
PathConstaints allows you to control the path of a still or animated object.
1. In the Toolbox, choose Part > Path. A path joint is created.
2. Move the newly created path joint directly below the open line in the Browser.
3. Now move the entire train inside the path joint.
4. With the path joint selected in the Browser choose Object Info from the View menu. By moving the Path slider in the Object Info window the first train car moves along the path, with the rear cars following rigidly behind it.
5. With the path joint still selected in the Browser, choose Part > PathConstraints End in the Toolbox. The PathConstraints dialog appears.
6. The default settings are suitable for the purpose of illustrating PathConstraints here, so click OK to accept the settings. (For details about the PathConstraints dialog box, please see “PathConstraints - Reference” later in this chapter.) The PathConstraints attribute is now applied to the path joint. In the Browser this is displayed as “Path:PathConstraints”.
7. Select the joint of the last car of the train in the Browser.
8. In the Figure Window, click or drag the cursor at the rearmost edge of the last car. An End object (End: PathConstraints) is created below the joint selected in the Browser. End objects must be created behind the last ball joint.
Note: When creating End objects, dragging the cursor in the Figure Window will change the size of the object but this size has no effect on its function.
Note: The End object can be moved in the Figure window or moved in the Browser hierarchy after it is created.
9. In the Browser, select Path: PathConstraints and adjust the joint slider of the path joint in the Object Info window to move the train along the path.
The movement of the train is constricted so that the centers of all the ball joints and the End object stay on top of the path. If the position of a joint or End object is off-center one or more of the train cars may face the wrong direction. In that case, enter Modify Mode and adjust the center of the joint or End object.
10. To record an animation of the train, open the Motion window and add keypoints along the timeline by moving the Path: PathConstraints slider. When finished setting up the timeline, render out the animation by selecting Create Animation from the Rendering menu. For more information on animating in Shade, see Chapter 19 in the User's Guide.
Moving a Train Along a Banked Track
1. Open “SM_8504_PathConst02_bank.shd” from the ShadeExplorer Documentation-Sample tab. If you drag and drop the file into the Figure window from ShadeExplorer the objects in the scene will be placed inside a Part.
This file contains a train with PathConstraints and a banked track.
2. Moving the Path slider of the Path:PathConstraints part in the Object Info window will move the train along the track but the train keeps its vertical orientation, ignoring the bank.
The “upper direction” in the PathConstraints dialog box must be adjusted in order to move the train along the bank. Create a copy of the original path and then create the “upper direction”.
3. With either the Path: PathConstraints joint or the End: PathConstraints object selected in the Browser, choose PathConstraints Attributes from the Custom tool in the Toolbox. The PathConstraints Attributes dialog box appears.
4. Verify that the “Use the upper direction path if it exists” checkbox is checked. If it is not checked, check it now.
5. Make a copy of the Open line that is directly above the path joint in the Browser, and move this copy above the original Open line.
6. Now edit the copied Open line in the Figure window. The angle between the position of this line and the position of the original line will be the bank of the track.
7. Moving the slider in the Object Info window of the Path joint causes the train to move along the track following the bank. If the angle of the train does not match the angle of the track, adjust the path while checking the angle.
Setting Objects to a Specific Path
Creating a Bicycle Chain
1. Open “SM_8504_PathConst03_chain.shd” from the ShadeExplorer Documentation-Sample tab.
In this file there are link objects with two components that form the chain and a closed line which forms the path for the chain. Rotator joints are set for each piece of the chain. These rotator joints are all flat joints.
TIP: Objects with many links, such as a bicycle chain, are easier to work with in the Browser if they are set to be flat joints. Select “Flat” from the drop down menu in the lower left corner of the Object Info window to make an object a flat joint. Flat joints share the same hierarchy level in the Browser with each other but are treated as if they were nested.
2. Select Path from the Part tool in the Toolbox. A Path joint is created in the Browser.
3. Move the Path joint to just below the Closed line in the Browser.
4. Now move the entire bicycle chain object (Rotator_A01 to Rotator_B32) inside the Path joint in the Browser.
5. With the Path joint selected in the Browser, choose PathConstraints End from the Part tool in the Toolbox. The PathConstraints dialog box appears.
6. The default settings are appropriate this time so click OK without modifying the settings. The PathConstraints attribute is applied to the Path joint and the PathConstraints named is appended to the part name in the Browser. (For details about the PathConstraints dialog box, please see “PathConstraints - Reference” later in this chapter.)
7. Select the last object in the bicycle chain (Rotator_B32).
8. In the Figure window click or drag at the point of the last link in the bicycle chain. An End object is created below the Rotator_B32 part selected in the Browser.
9. By moving the slider of the Path joint in the Object Info window the chain moves along the path.
Note: If the path is a closed line object it will form a loop even if the joint value is 0.
However, zooming in to the start of the chain in the Figure window will reveal that the chain is not quite long enough. Several links must be added to complete the chain.
10. Select all the rotator joints inside the Path joint in the Browser and then select Reset All Joints from the Move tool in the Toolbox. The chain returns to its original position.
11. Select Rotator_A32 and Rotator_B32 and choose Translate from the Copy tool.
12. Double-click the newly created parts to change their names to Rotator_A33 and Rotator_B33.
13. Now move the new links appropriately in both the Figure window and the Browser. In the Figure window, move the new links to the end of the chain. In the Browser, move them below the Rotator_A32 and Rotator_B32 parts.
14. By opening the Rotator_B33 part in the Browser you will see an End part. This object is not needed, so it can be deleted.
Important: If an object containing an End object is copied, a new End object will be created along with the new object; however this new End object has no effect on the PathConstraints. The correct End object is named “End: PathConstraints”.
15. Move the PathConstraints End object to the Rotator_B33 link in the Figure window, and inside the Rotator_B33 object in the Browser.
16. Open the Object Info window for the Path joint again and watch the chain move along the path as you move the slider back and forth. This time, zooming in to the start of the chain shows that the chain is the perfect length.
If you add links to the chain and the length is not quite right, adjust the length of either the path or the links themselves.
Note: When animating bicycles or similar situations when the chain must rotate continually, modifying the range of joint values used by the slider makes it easy to adjust the acceleration or deceleration. Click the joint slider while holding the Ctrl (Win) or Control (Mac) key to open the Joint Advanced Settings. Set the maximum value to be the number of loops you wish the chain to make and the slider will then show multiple revolutions.
PathConstraints Reference
PathConstraints Attribute Settings
When applying PathConstraints to a path joint, choose PathConstraints_end_creator from the Part tool in the Toolbox with the path joint selected in the Browser. Adjust the settings in the PathConstraints dialog box, click OK, and then select the last joint (ball joint or rotator joint) in the hierarchy of the path joint to create a PathConstraints End object.
Adjusting PathConstraints Attributes
To modify the PathConstraints attributes of a path joint choose PathConstraints Attributes from the Custom tool in the Toolbox with the PathConstraints part or End part selected in the Browser, and adjust the settings in the PathConstraints Attributes dialog box.
Deleting PathConstraints Attributes
To remove PathConstraints from a path joint, delete the corresponding PathConstraints End object.
The PathConstraints Dialog
The PathConstraints dialog is where the PathConstraints attributes can be modified.
Upper direction Pull-down Menu
Specify the X, Y or Z axis for the upper direction of the PathConstraints object. If the axis specified here and the direction of the path line object overlap, the object may face the incorrect direction. This setting is only valid for ball joints and rotator joints that are parallel to the path line object.
Auto Roll: The PathConstraints object will not control the upper direction. Even if the path overlaps with the X, Y or Z axis direction the object will face correctly, but the Roll rotator can be added to fit the path or motion.
Use the Upper Direction Path If it Exists Checkbox
If there are two line objects immediately above the path joint in the Browser hierarchy the first line will be used to specify the angle of the path. If Auto Roll is selected in the Upper Direction drop down menu this line will not be used to specify the angle.
Ignore Limiter of the Joints Checkbox
When checked, the range limiter of the PathConstraints rotator joint will be ignored. To turn the limiter on or off for individual rotator joints, leave this checkbox off and in the Object Info window check the Range checkbox for individual rotator joints |
































