Learn new skills with our bite sized lessons

  • Home
  • Tutorials
  • Creating a Procedural Coffered Ceiling with 3ds Max and RailClone
Creating a Procedural Coffered Ceiling with 3ds Max and RailClone
Learn the basics of the A2S generator and the Segment Y Role macro


RailClone Pro

  • RailClone Logo

In this tutorial we’re going to demonstrate how to make a parametric coffered ceiling that allows you to define the size and position using a rectangular spline, as well as adjusting the spacing between the horizontal and vertical beams. 

Really though, this is an excuse to demonstrate the main inputs of the A2S Generator PLUS a handy macro called Segment Y Role that allows you to target bits of a 2D array that aren’t normally accessible without resorting to an expression. These parts include the intersection where the horizontal and vertical beams cross, as well as the T-Shaped intersection where they meet the sides. This tutorial is therefore useful for a very wide variety of objects, and the techniques demonstrated could also be seen as a successor to our older windows tutorial.

In most of our tutorials, we start with the source geometry already modelled, but a few users have asked for a little more information about preparing the assets for RailClone, so in this tutorial, we’ll start from nothing and demonstrate the modelling process from start to end. If you’d like to follow along, then scene files are available from the iToo Software website


First of all, we need to model a section of ceiling that can be sliced into a jigsaw of pieces to become a parametric object. There are lots of ways to do this, but in this example, I’ll trace an image of a typical profile using a spline, and then covert it to polygonal geometry using the Bevel Profile modifier. To do this 

  1. Find yourself a picture of a profile (or make one up!).
  2. Add the image to a plane so it can be traced. 
  3. Create a new Line object and trace the profile.  I  only trace one side of the profile so that we can create the perimeter of the ceiling. We’ll create the double-sided profile used by the interstitial beams using a Symmetry Modifier in the following steps. 
  4. If necessary, scale the spline to the correct size and then reset the XForm
  5. To turn this into the panelling. Create a square rectangular spline about 1m on each side. 
  6. Add a Bevel Profile modifier, and change the mode to Classic. This mode allows us to use a spline to define the profile instead of the modifier’s built-in graph. 
  7. Click on Pick Profile and select the ceiling profile spline from the scene. 
  8. If necessary, add a Normal modifier to the object and enable Flip Normals. This is a ceiling so we want the face direction to be downwards.
  9. Now we have a single panel, but we want a model that includes a central bar, plus a junction where they meet the sides and in the middle. To do this we use one or more symmetry modifiers. In 3ds Max 2022 and above you can use just one modifier since it has been improved to do multi-axis slicing. In the earlier versions you’ll need to use two modifiers, but the principle is exactly the same. 
  10. Enable X and Y symmetry
  11. Turn on Snaps and Right-click to open the Snaps menu. Enable Midpoint.
  12. Go to the Symmetry Modifier’s Mirror sub-object level.
  13. Move the gizmo so that it snaps to the midpoint of the bottom left diagonal edge. This should give you a nice proportionally sized perimeter as well as a cross member on the X and Y axes. If you move to any corner other than the bottom left, you’ll need to use the modifier’s flip settings to create the same effect.
  14. If you plan to use multiple materials, then add an edit poly modifier and assign material IDs. Here I used material ID 1 for the ceiling and an ID of 2 for the beams.


We now have the basic geometry. To create a flexible RailClone style we can slice this into several parts. In fact, I will create 16 pieces divided into 4 rows, starting from the bottom upwards they are as follows:

  1. Start - Bottom
  2. Bottom
  3. X Evenly - Bottom intersection
  4. End - Bottom
  5. Start
  6. Default
  7. X Evenly
  8. End
  9. Start - Y Evenly intersection
  10. Y Evenly
  11.  X Evenly - Y Evenly intersection
  12. End - Y Evenly intersection
  13. Start - Top
  14. Top
  15. X Evenly - Top intersection
  16. End - Top

To create these from our geometry the easiest way is with Slice modifiers. This can be done manually, but because this process can be a bit tedious we have an unofficial script we use internally called RailClone slicer. It’s available in the downloads for this tutorial.

The script allows you to create and control all the necessary Slice modifiers from a single interface to prepare models for both 1D and 2D arrays. Just drag it to the Max viewport to run and then it’s pretty straightforward to use:

  1. First of all, click the Pick Geometry button and select your geometry from the scene
  2. Next we enable the elements we wish to create slices for. So we’ll begin with the Start. Enable the checkbox and increase the distance to move the slice plant until it is just past the left beam. Note the value, it might be easier to use it again for the other entries.
  3. Now do the same for the Right side. I’ll copy and paste the value.
  4. Several of the slices have two values: Position and Size. For X-Evenly we’ll leave the Position centred but increase the Size so that the slice planes are on either side of the central beam.
  5. On the other hand, for the Default segment you’ll need to move the position to the centre of one of the panels. 
  6. That takes care of the slices on the X-axis, now we’ll slice on the Y-axis. 
  7. Disable Global Size since we’ll need to use a couple of different slice sizes.
  8. Enable Bottom and increase the size. Do the same for Top.
  9. Enable Y-Evenly and increase the size to encompass the middle beam. 
  10. And finally, enable Default and move the position to the centre of one of the panels. Increase the size. 
  11. Once you’re done, click on the Slice Geometry button and the script will create all 16 parts automatically. To remove the slice planes from the original geometry when you are done you can click on the C button

Now all we need to do is to pop these parts into a new RailClone style. 

Creating the RailClone style

  1. First of all, create a rectangular spline to define a temporary ceiling area. Then, create a new RailClone object and go to the Modify panel.
  2. Open the Style Editor and add a new A2S generator. This generator is used any time you wish to create 2-dimensional arrays. As we will see, it constructs the objects in a grid by allowing you to target specific parts of the array with different geometry. Before we add geometry though, we need to specify the size of the array, and we’ll do that using the closed spline we just created. 
  3. Go to the Generator’s settings and enable Extend X/Y size to Area. When this is enabled, RailClone will automatically calculate the size of the array to fill a closed spline wired to the Clipping Spline input.
  4. Let’s add that spline. Create a new Spline node and pick the spline from the scene. Wire it to the Clipping Area input
  5. Now we’ll add the geometry, starting from the bottom. Add a new Segment node and pick the Start - Bottom segment from the scene. Wire it to the input with the same name.
  6. There’s one setting we’ll need to change for all the segments, and that is how they align on the Z-Axis. By default, RailClone will align segments on the Z-axis using the bottom of their bounding box. Because several of the segments we created earlier are different heights, this would result in them not aligning correctly. To fix it, we go to the Segment’s Alignment settings and change Z to Pivot
  7. To save doing this every time, we’ll copy and paste this segment to import all the other geometry.
  8. Clone a Segment node and select the End - Bottom geometry from the scene. Wire it to the input with the same name.
  9. To fill in between, clone the Segment node again, wire it to the Bottom input and pick the appropriate segment from the scene. 
  10. Now we’ll do the same for the top. Clone and wire the Start -Top, End - Top and Top segments to their relevant inputs. 
  11. To fill between the top and bottom, clone a Segment node again and select the Start geometry. Wire it to the Start input.
  12. Now, you may have realised by now that it may not actually be necessary to create so much geometry because much of it is identical only mirrored on the X and Y axes. So to demonstrate an alternate approach we’ll show how you can reuse the Start geometry for the End input.  All you need to do is wire a Mirror operator to the End input and then wire the Start segment to that. By default, this node flips geometry on the X-axis. There are further options to flip on the Y and Z axis so you could actually get away with far fewer segments than I’m using here. 
  13. We now have the perimeter done - to fill in the remaining area, clone a Segment node once more and select the Panel geometry from the scene. Wire it to the Default input. We now have a parametric panel done. If you change the size of the spline, the panel size also changes. 
  14. Now lets add divisions on the X and the Y axes. If we refer to the original model, we need an input for where the vertical divisions meet the top and bottom, where the horizontal divisions meet the start and end, and where the divisions intersect. But as you’ll notice, there’s actually only one input each for the X Evenly and the Y Evenly divisions. This is where a new Y Role macro comes in. It an be used in any vertical input  such as Start, End, X Evenly, X Corner, and X Marker and it adds several additional inputs as we’ll see
  15. Add a Segment Y Role Macro to the X Evenly input.

    Clone a Segment node and pick the X Evenly geometry from the scene. Wire it to the Macro’s Default input. This is the same as if we’d wired it directly to the generator’s X-Evenly input. To change the spacing, go to the Generator’s rules and adjust the Evenly Distance settings. While you’re here, I’d also enable Adaptive mode for both evenly axes which will give you a more even distribution instead of scaling only at the beginning and end. 
  16. Now, as you can see, we’ve broken the array a bit. That’s because we don’t have segments yet for the top and bottom intersections. Let’s fix it! Clone a segment and pick the X Evenly - Bottom segment from the scene. Wire it to the Macro’s Bottom input.
  17. Do the same thing for the X Evenly - Top segment. This time wiring it to the Macro’s Top input. 
  18. Now lets add the horizontal divisions. Remember I said that the Y Role macro is only used in vertical inputs. That means that we don’t use it in the Y Evenly input. Instead we’ll just add the Y Evenly Segment as normal. 
  19. So where do we use the Y Role macro? The answer is in the Start and End inputs, as both of these these are targeting vertical parts of the array. We can add one after the existing segment, wiring the segment to the Macro’s Default input
  20. There’s another thing we need to change. Select the Generator and go to the Rules tab and scroll down to the  Evenly settings. You’ll notice that by default the X Evenly and Y Evenly Extend to Side options are Enabled. In order for the Macro to work, the Y Evenly Extend to Side option needs to be Disabled. This setting determines whether the segments wired to the Evenly inputs extend to the sides or not. 
  21. Now we’re ready to add the remaining segments. Clone a Segment node and pick the Start - Y Evenly geometry from the Scene. Wire it to the Macro’s Evenly input. You’ll see the geometry appear on the sides!
  22. There’s one last piece of geometry we need to target, and that’s where the X Evenly and Y Evenly divisions intersect. To do that we go back to the Macro wired to the X Evenly input. Clone a segment and wire it to the Macro’s Evenly input. Pick the Intersection from the scene.
  23. Assign a material and the style is now complete! We can quickly assign it to any rectangular spline to create a procedural ceiling of any size!

Sometimes we get comments that maybe a simple ceiling like this could have been done quicker manually - and for one-off projects that might be true. But in every case what we aim to produce an asset that can be reused again and again saving time in the future, and one that can be easily adjusted should the architect request changes. So with that in mind, in this final step, I’ll add a couple of parameters for the X Evenly and Y Evenly spacing that can be controlled directly from the Modifier panel. 

  1. Right-click on the generator and select Export Parameters.
  2. Check  X Evenly and Y Evenly distance and click OK. New inputs will be created.
  3. Create two new Numeric nodes.
  4. Change their type to Scene Units.
  5. And finally, wire them to the new inputs. 
  6. You can now control the spacing from the Modify Panel.  

And that concludes the tutorial. Now, although this tutorial used the example of a coffered ceiling, the techniques and the understanding of how the A2S segments jigsaw together will help you to create a huge number of different types of objects. In fact, the windows and cladding were created in exactly the same way. 

If you open the scene you can explore the graphs and see how the same type of base geometry was used. Once you’ve done this once or twice, you can even just swap the geometry in the segments to create different parametric objects in a matter of minutes!

We hope you enjoyed this tutorial, If you haven’t already, please feel free to subscribe to our YouTube channel to get notifications for more handy tips on how to use RailClone and Forest Pack coming soon.