Railclone - Windows Part 1
2 Panel Conditional
This is the first Window in a series of Itoo Railclone Tutorials I will be making to help artists use the power of parametric in their workflow to build windows.
I have tried a few different types of approaches and will showcase one below for a basic Fixed Sliding Window (Fixed being it does not slide open its just for architectural purposes). I have found the most important step to creating the window is to define what you hope to achieve with it before you begin building it in Railclone as there is many different ways to approach it.
Before you begin, or even as you create I advise you check how Generators are built within Railclone and use this as a guide - it will help you solve problems when you need to:
Please note I am working in units: mm
Create a Fixed Sliding Window (fixed being the window does not slide open)
I need to apply this to many splines with different size X / Y but maintain the thickness of the frame and mullions
I need to always have the Vertical Mullion in the centre of the window
The window on the left is inset from the frame and setback from the window on the right
The window on the right is apart of the frame and the glass connects into the Vertical Mullion
We will use a A2S Generator so we can apply this to many different splines with different lengths and widths.
We also Set the Initial A2S Generator to Scale the Default Mode. This is to reduce tiling and scale the pieces we need along its respective axis eg:
Start/End - Scale on the Y
Top/Bottom - Scale on the X
Corners/ X Evenly - Do not scale
We will also extend the Clipping Area to the Spline :
In this particular case by slicing the areas we need for each section of the geometry we take care of the offsets and setback for each window making our job a little easier - however the trade off is that we cannot open the sliding window. I will go into how we achieve this in the next tutorial.
You can also use Railclone Slicing script for max.
Ensure you follow the official Railclone tutorial here for creating the base window type - this is just an extension of that tutorial. The main difference between that tutorial and this one is we use a Condition node to control which parts appear on the left side to the right side as you can see below:
Now we have our Geometry sliced (and labelled) as above we can put these into our A2S Generator. All of our Condition operators will be as such:
Remember reference back to our initial guide as to how Generators are built, this means that if we put a condition into our Top piece, if it is less than 50% it will be True, if not it will be False.
For the last piece of the puzzle we need to wire an Arithmetic node into the Index of the Selector (Right click on the Selector Node > Export Parameters > Index). Change the type of the Arithmetic node to Expression and enter this for the expression:
if ( YSplinePosition==0,3,
if ( YSplinePosition==1,1,2 ))
Essentially this expression says:
If the Y Spline Position is 0 then place Input3
If the Y Spline Position is 1 then place Input1
Else Place Input2
0 being the bottom, 1 being the top of the Y Length of our Rectangle/Spline.
You should end up with a window that looks as such: