In one of our previous demo reels there was a brief clip showing a parameterised window model. Since this was released we've been asked a number of times about the best way to create this kind of object. To answer those questions this tips and tricks episode will look at the best way to prepare a window model and parametrise it using RailClone so that it can be easily re-used in in different sizes. Once we've gone through the process of creating this object, we'll also show how you can automatically fill an entire façade with windows in a single click.
Once you understand how RailClone works, creating these styles is very straightforward but actually you should only need to do it once. To create different window styles all you need to do is swap the source geometry, there's no need to go through this full procedure each time.
By completing this tutorial you will be able to:
The exercise files for this tutorial includes the following .max scenes compatible with Max 2010 and includes materials for Mental Ray and V-Ray.
This tutorial starts from a single complete window object, shown below.
To parametrise this geometry we need to slice this mesh into a 2d grid of separate pieces that fits back together like a jigsaw using one of RailClone's array types. Because we want to adjust the height and the width of the window, we'll use the A2S generator which has the following inputs:
To split the geometry to fit into these inputs we use 8 Slice modifiers. The position of the slice planes is marked in yellow in the image below, there are 4 needed for each Axis. Also in this image are the segments that these slices will create with their associated inputs in an A2S generator. The segments highlighted in red don't have an equivalent generator input, but we'll see later how you can get around this limitation.
To create these slice planes, follow these steps:
We can now toggle the Slice type of these modifiers to create the segments needed to create a parametric window.
Because this process can be a bit tedious we have a script we use internally called RailClone slicer. It allows you to create and control all the necessary slice planes from a single interface to prepare models for both 1D and 2D arrays. To use it just adjust the spinners to places the slice planes and when you're done you can click the Slice Geometry button to create and name all the individual pieces. If you'd like to try it out you can download the maxscript file below, or find out more about the script on our forum.
With the geometry prepared we can now add them to a RailClone object.
Standard Inputs
X Evenly columns - Extending inputs
With a simple window done we can add the divisions, starting with the mullions. To do this we need to add start and end segments for the X Evenly Column in the top and bottom rows. Unfortunately the generator has no inputs for this purpose but It is possible to create this effect using a selector operator and a simple expression:
In order for this to work X Evenly > Extend to Side must be turned on
Adding the transoms using Sequence operators
To add the transoms we'll use a different technique.
Creating multiple windows in one click
Here's were all that hard work pays off. In this scene there is a facade with 67 different sized windows. Also in the scene is a single spline object that consists of a rectangle for each window aperture.
When you use a Extend X/Y Size to area and a Clipping object that consists of multiple splines RailClone will generate a new array for each spline. This means that in each rectangle we will get a separate unique window of the correct size. To illustrate this, let's add our window model to this façade.
Using these technique you should be able to parametrise many types of window and as mentioned at the beginning, the second one you create should be much simpler as you already have the style set-up and only need to swap the geometry. Some companies may find it beneficial to create a library of generic windows that can be used or adapted for their projects, if you're interested in creating custom libraries for RailClone, check out the last chapter of our Next Steps with RailClone guide. In our next tutorial instalment we'll extend the technique and look at how to create a roller blind style with a randomised openness setting to add some life-like variation to the windows. Meanwhile, stay tuned for future training, or for more information about many aspects of RailClone's features please see our reference section or visit the tutorials page for more Tips&Tricks videos and in-depth tutorials.