Itoo Software Forum

Author Topic: Help with Lamellas travelling along 2 splines  (Read 818 times)


  • Newbie
  • *
  • Posts: 1
Help with Lamellas travelling along 2 splines
« on: July 27, 2015, 04:48:39 PM »

I'm new to RailClone2 and it seems to be the answer to my modeling problem. In MAX, I am trying to model a architectural component called a Silver Flow for a client and I cannot get the articulation that I would like. Up until now, I have been manually moving each "lamella" and adjusting the size by eye - which is quite tedious. The lamellas follow 2 splines and incrementally increase/decrease in length, pitch, yaw, and overall angle to the ground. The only constant is the profile dimensions of the lamella (ex. 2"W x 18"L).

Please let me know if you have any suggestions on how to get this done in RailClone....I really appreciate the help in advance!


Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 1608
Re: Help with Lamellas travelling along 2 splines
« Reply #1 on: July 27, 2015, 06:46:08 PM »
Hi Patrick,

This is a tricky one  to solve with RailClone because we don't currently have a generator that can create segments between two parallel lines. The solution I've come up with actually uses a few of 3DS Max's built in modifiers to create a base spline that is then used in RailClone to create the geometry. The RailClone object then has to use an expression to increment the rotation.

  • I started by creating a spline object with the two rails to create the basic shape. One the shape is roughly correct, the segments are divided so that there is one vertex  on each spline per lamella.
  • Apply a Cross section modifier create a spline to connect the vertices between the two rails
  • You can then delete or detach the two original rails as we don't need them for the lamellas. In the attached file I've detached the rails and then used them with a Skin modifier on the lammella splines so that I can easily edit the shape later.

  • In order to be able to incrementally rotate the lammellas I've had to add material IDs to the splines. This is because though RailClone has a segment counter it resets for each spline so I can't use it to control a gradual rotation. As a workaround I can however increment the material ID on the splines and use that instead.  To save the laborious process of manually adding material IDs you can run this script on the spline:

    for i = 1 to numsplines $ do

       for n =1 to (numSegments $ i) do
          setMaterialID $ i n i
       splinesRC = numsplines $
       print splinesRC

    The script will also tell you how many Ids were created which you'll need to create the the RailClone object.
  • The RailClone object itself is quite straightforward. Just create an L1S array and add the lammella profile to the default input. I've also changed the Default Mode to Scale
  • To control the Y rotation, I've added an expression as follows:


    In this expression:

    Input1 = the start angle for the lamellas rotation
    Input2 = the end angle for the lamellas rotation
    Input3 = the number of lamellas (and also the number of material ids as provided by the script.

    This gives you a nice controllable effect - if you prefer you could simplify it by using Input1+XSplineMatID*Input2 where input1 is still a start angle but input2 is just the angle increment.

The final graph looks like this:

This file is attached below. I hope it is useful but I know expression can be daunting for new users so if there's anything further I can do to help out,  please let me know.

Many thanks,

Paul Roberts
iToo Software