Skip to main content

Converting RailClone 2 styles for RailClone 3

For most users, objects created in RailClone 2 should work in RailClone 3 without any issues, but there are a few changes that may require you to updates your styles.

Automatic Changes

Several changes required to make styles work in RailClone 3 take place automatically. These are listed below for the rare times this does not happen.

Changes to expressions syntax

Return

Expressions now require you to add a Return property before the expression and a semicolon ; at the end of the line.

  • In RailClone 2

    Input1/Input2\*100

  • In RailClone 3

    Return input1/Input2\*100;

If statements

When testing for equality in If statement in RailClone 3, it is now necessary to use a double equals ==.

  • In RailClone 2

    if(Input1=1,5,9)

  • In RailClone 3

    return if(Input1 == 1,5,9);

Float and Integer values

In RailClone 3, the way that numbers are written is important. For example 1/2 in RailClone 2 will return 0.5. The numbers are recast as float values. In RailClone 3 you have more control over the types of numbers you wish to use in expressions. Numbers without a decimal place are considered to be Integers, and with a decimal place they are Float values. Consequently Return 1/2; in RailClone 3 will return 0.

  • In RailClone 2

    1/2

    Returns 0.5

  • In RailClone 3

    return 1.0/2.0;

    Returns 0.5

    return 1/2;

    Returns 0

info

Both Maxscript and Python evaluate numbers in this way, and Max expressions are the exception. For this reason, we chose this approach.

Manual Changes

There are a few changes between RailClone 2 and RailClone 3 that may require you to manually edit your styles. These are listed below.

Evaluation order of Fixed Size and Rotate the Transform Operator

RailClone 3 fixes some illogical behaviour present in the Transform operator for previous versions. In RailClone 3, Transform->Fixed Size is computed before applying other transformations (such as Rotate or Scale). This means you can now rotate a segment, for example by 45 degrees, and then resize it using Fixed Size with no problems. In RailClone 2 this would cause the segment to skew, which is seldom desirable.

RailClone 2 | Scaling takes place after rotation, causing unwanted skew

RailClone 3 | Scaling takes place before rotation. No skew.

Unfortunately some styles have been designed to get around this earlier limitation and now don't work correctly in RailClone 3. The fix is usually relatively easy, just swap the X and Y fixed size values for the rotated part so that the sizes for each axis are set before the segment is rotated. We're aware that this can be inconvenient, and we are looking into the best way to support older styles without causing confusion for users who could then experience two different ways of fixed size being calculated.

A2S Generator's Z and Y offset for Rotated arrays

In previous versions of RailClone, if an A2S array was rotated using the X Rotation value then both Y and Z offset would give the same results. In RailClone 3, these parameters are now fixed and behave as expected, but this can affect styles that had previously worked around these limitation. If your styles are no longer behaving as expected, it may be necessary to swap the values for X Offset and Y Offset. Depending on the style it may also be necessary to enter a negative value instead of a positive or vice-versa.

Original settings and Fixed settings for RailClone 3

Visual Differences

UVW changes

RailClone 3's automatic box mapping features have been completely rewritten. As a consequence you may see some differences in styles that were created with previous versions

Randomised Properties

Due to changes in the RailClone 3 core, randomised values may be different when opening a RailClone 2 object in RailClone 3.