RailClone 4 involved several changes to the core that might affect styles created in RailClone 3 or below. Below are some explanations, tips and tricks to help you migrate your workflows and existing styles to RailClone 4.
Chained Transform Operators
In RailClone 3 if you chained together multiple Transform nodes, the order would not make any difference. To illustrate, in the following examples, two transform operators are used: one for translate and another to Rotate. In the top chain we are using Translate then Rotate, in the bottom chain it's the reverse, Rotate then Translate.
Notice that changing the order in RailClone 3 makes absolutely no difference to the outcome.
But in RailClone 4 the order makes a difference. In the first chain, the segment is translated on the X axis and then rotated. The result is the same as RailClone 3. However, in the second chain, the segment is rotated first, and the translation then occurs along its modified X-axis orientation. This should be much more intuitive for users as it is similar to the way Max works natively when using local coordinates.
In a single Transform node, Scale operations now occur before Rotation
In RailClone 3. when rotating and scaling in a single Transform node, the rotate operation would be carried out first, followed by scale. This resulted in skewed geometry as shown below. In RailClone 4, the scale operation occurs before rotation, resulting in geometry that scales along the local axes as expected.
In older styles, users may have used two Transform operators to fix the skewing issue. This is no longer necessary.
Changes to the Compose operator
The Compose operator allows you to assemble two or more segments in a group. In RailClone 3 the bounding box of geometry grouped in this way was calculate based on the first segment in the Compose operator. For the purposes of determining the position of adjacent segments, the others were ignored.
For example, imagine that you have five segments attached to a Compose node in Group mode. It would appear as follows (all the pivots are aligned to the centre of Segment 1):
In RailClone 3, only segment 1's bounding box is used to calculate how the items are assembled along the spline, causing the adjacent segments to overlap.
To fix this in RailClone 3 you would edit the Right Padding of Segment 1.
As you can see, this is not terribly intuitive. so in RailClone 4 it now works more like 3ds Max's Groups. All segments are forced to use Pivot Alignment mode and the bounding box is calculated based on the extents of all the segments wired to the Compose operator. There is no longer any need to adjust the padding for the first segment. If you do still want to adjust the padding, the recommended approach is to add a Transform operator after the Compose node and adjust it from there, just as though the composed geometry was a regular Segment.
You can also use this transform operator to change the Alignment. Setting all 3 axes to Pivot will give you the same behaviour as RailClone 3. Therefore, if you have RailClone 3 styles to update to RailClone 4, do the following:
- Add a Transform operator after the existing Compose node
- Enable Alignment
- Change the X, Y and Z axis to Pivot
- If necessary, enable Padding and adjust the spacing.
Reset Created Version to use updated features
To retain compatibility with older scenes, some features use RailClone 3's algorithms even when opened in RailClone 4. If you would like to update an old style to use RailClone 4's changes just select the object and run the following Maxscript: