This is now possible using Expressions. RailClone has a function called XSplinePosition
that returns the segments position along the spline. 0.0 represents a segment at the start of the spline and 1.0 a segment at the end. Using this we can control the scale of an object based on it's current position in the array. To do that:
- Wire the Segment to a Transform
- Right click on the Transform operator and export the Z
and Z Fixed Scale
parameters, or a whichever you wish to control.
- Create two new Numeric
nodes, call the first Scale Start
and the second Scale End
- Wire them to a new Arithmetic
node and set the operation to Subtract
. This will give you the total amount the segments changes between the start and end of the spline.
- Create a second Arithmetic
note and wire Scale Start
to the first
input. Wire the Arithmetic
node created in the previous step to the second
- Change the mode of the new Arithmetic node to Expression
, click Edit Expression
Where Input1 is the starting scale and and Input2 is the total scale change between the start and end of the spline.
- Wire the arithmetic node to the Transform
inputs. The final graph will look like this:
I've also attached a file with this example so you can try it out. If you'd like to know more about expressions, parameters and attributes then this chapter of the Next Steps with RailClone
guide can be useful. I hope that helps, please let me know if you have any further questions.