Itoo Software Forum
RailClone => RailClone Pro (*) => Topic started by: Gabriel on October 07, 2015, 01:09:54 AM
-
Hello,
I was wondering if there is a way to transform the same segment along a path. For example I would like its scale to be 100% at start but to get gradually smaller by the end of the spline. I have tried playing around with the plug in but I haven't managed to have success.
Thanks in advance
-
Hi Gabriel,
To do this you would need to use an expression that will rescale the object based on it's position along the spline. To do this follow these steps.
- Create a new Transform operator and wire the it between the segment you wish to rescale and the generator
- Right click on the Transform operator and export the Fixed Scale X,Y, and Z properties
- Create a new Arithmetic node, wire it to the Transform nodes exported scale parameters and set the mode to Expression
- Create a Numeric node for the start scale value and wire it to the Arithmetic nodes 1st input
- Create a second Numeric node and wire it to the Arithmetic node's second input. You will now have a graph like the image below. New nodes are shown in red
(http://i.imgur.com/NwyOWsJ.png)
- Finally we need to add the expression. In the Arithmetic node, open the expression editor and enter:
(1-XSplinePosition)*Input1 + XSplinePosition*Input2
This expression is using the segment's position along the base spline to gradually transition between the start value (Input1) and the end value (Input2). XSplinePosition returns a scalar between 0.0 for the start of the spline and 1.0 at the end, so it can be used as a multiplier to gradually increase [ XSplinePosition*Input2] and decrease [(1-XSplinePosition)*Input1] values. By adding the two halves of the equation together we get a transition from one state to the next.
I hope that helps, please see the attached file for this example.
Many thanks!
Paul
To learn more about expressions, check out Chapter 3 of our new RailClone guide (http://docs.itoosoft.com/display/RAILCLONE/3++-+Wiring+Parameters+and+Attributes).
-
Oh I see! Thanks a lot for your help Paul. :D
-
Hello,
Is it possible to have more control points? Not only start and end, but some in the middle.
Thanks
-
Hi,
Though it is possible, it's a little bit fiddly at the moment (see attached).
(http://i.imgur.com/i8dQOiN.png)
In future versions we hope to make this process simpler, possibly using transform markers placed along the spline.
Many thanks,
Paul
-
thank you!
-
Hi Paul,
I made some tests...
If start scale is higher than 30% - everything goes wrong
Please see the screenshot - http://clip2net.com/s/3oKF6o5
-
Hi,
You're right, there was a mistake in the graph. The attached version should fix it.
Many thanks,
Paul