Saturday, April 19, 2014

ARCH 653: PARAMETRIC MODELING USING DYNAMO





Follow the link below to view in better quality.

                          https://www.youtube.com/watch?v=HHVeVuX9-ao&feature=youtu.be









Purpose
The purpose of this design project was to make use of Dynamo to drive the parametric modeling of our building components in Revit.  We had the option of either updating our previous models, or creating new models with new parameters to be altered.


Design Concept
For my design project, I chose to re-use my previous model (which can be seen in the blog post below).  It is a 25 story conceptual high rise living apartment/hotel complex located in Seattle, Washington.  It is an L-shaped building where the shorter leg side is made up of 20 stories and contains the hotel side of the apartment and the restaurant on the lower level.  The long leg side is made up of 25 stories and contains the apartment side of the building. 
For this project, the building façade was my primary focus.  The concept for the building façade was to have a series of large, multi-colored glass panels that extruded from the building surface.  Each panel would be extruded a different depth from the building surface.  The color pattern and extrusion depth pattern are to appear randomized in order to give a unique aesthetic look to the building.   


Preliminary Design
For my preliminary design, I decided to remodel my original building façade using a different approach.  This time I wanted to use a combination of adaptive point panels and curtain panel by pattern instead of only adaptive point panels like I did for my previous design.  My thoughts were that it would make the building façade much smoother, and faster when loaded into the model as well as easier to control when using Dynamo. 
To begin, I started by creating 5 separate square adaptive point panels and assigning them material property parameters.  The materials I gave them green glass, blue glass, navy glass, light gray glass and dark gray glass (all were created).  Once the individual adaptive panels had been created, I opened a rectangle curtain panel by pattern, created a surface and divided that surface into 25 segments (5x5 gridlines).  From here, I loaded in each of the 5 different color adaptive panels, and created a random grid system which will be used as the main façade component. 
Next I opened up my mass model and loaded in the curtain panel by pattern façade that I created and assigned it to be the surface of my building.  On certain faces of the building I only used one of the façade curtain panels, while on others 2 or 4 were required in order to keep the sizes of the panels proportionate to one another. 
Finally, I made sure that all of the parameters I wanted to change (extrusion depth and panel color) were properly nested into the current mass family. 
Once this was completed, the next step was to utilize dynamo to drive the parameters. 



Dynamo Model
When programming the dynamo segment of my project, there were 2 main parameters that I wanted to be able to change simultaneously and with ease: The individual glass panel colors, and the extrusion depth of the individual glass panels.  To reach this final design, there were three major steps I took: 
·        The Test Phase
·        The Combination Phase
·        The Randomization Phase


The Test Phase
The test phase was exactly what it sounds like, it was the phase of my design where I wanted to test my idea on a single panel to ensure that it worked properly.  In order to begin I made use of a few different dynamo parameter drivers: “Set Element Parameter”, “Select Model Element”, “Get Material By Name”, and “String”.
To make these 4 parameter drivers work properly, I first had to select the element in my model I wanted to change.  In this case, the element that I wanted to change was one of the 14 different curtain panels that made up my façade.  Once selected, I plugged that box into the “element” slot of the “Set Element Parameter” box.  Next, I needed to tell Dynamo which parameter of the selected element I wanted to change.  Therefore in one of the “String” boxes, I typed the name of one of the 5 different material parameters for the selected element (Navy/Green/Blue/Light Gray/Dark Gray) and plugged that box into the “param” slot of the “Set Element Parameter” box.  Finally, I needed to tell Dynamo what value to give the parameters.  To do this I made use of another “String” which I gave the name of the material I wanted to be assigned to the parameter selected.  I then plugged that “String” into the “Get Material By Name” box and then plugged that box into the “value” slot on the “Set Element Parameter” box. 
Once everything was connected, I ran the Dynamo and the material changed to whatever material I specified it to be, thus indicating that my test phase was correct.





The Combination Phase
For this phase of the project, instead of recreating the same process above for each and every panel on each and every façade, I decided to make use of “Lists”.  The “Lists” allowed me to combine all 5 different panel color parameters as well as all 5 of the materials into one box and then feed that information to the “Set Element Parameter” boxes.  The only inconvenient thing was that the “Set Element Parameter” box did not accept a “List” for the “Select Model Element”.  Therefore, I had to create 14 different “Select Model Element” boxes and 14 “Set Element Parameter Boxes” in order to properly drive the entire building façade at once. 
Once all 14 of both box types were created I attached each “Select Model Element” box to a corresponding “Set Element Parameter” box and selected each of the 14 curtain panels that made up my façade.  Next, I attached 5 “Strings” (each with a different parameter for the different color panels) to a “List” and plugged that list into each of the 14 “Set Element Parameter” boxes.  Finally I attached the other 5 “Strings” (each with a different material property) to a corresponding “Get Material By Name” box (5 boxes), then attached each of those boxes into another “List” and finally attached that list to each of the 14 “Set Element Parameter” boxes.
When I ran the Dynamo program, everything worked well and I could change the material properties to whatever I wanted and the corresponding panels would also change. 












The Randomization Phase
For this phase, I wanted to make the color pattern on the façade of my building randomize each time that the code ran.  In order to do this, all that was required was to make the list that contained the material properties random.  Therefore, I made use of a parameter driver box named “Shift List Indices”.  This parameter driver box shifts the current list based on a given number.  For example, if the number were 3, it would shift all the list values up 3 spaces moving the first, second and third values to the end of the list.  To make it randomized I made use of the “Random Number” box and multiplied the random number by 5 (five is the number of parameters) since the random number is only from 0 to 1.  Next I made sure to round the number up to a whole number after it has been multiplied, and finally this value will be plugged into the “amt” slot of the “Shift List Indices” box. 
Once that was completed I plugged the list into the “Shift List Indices” box and then plugged that box into the 14 different “Set Element Parameter” boxes. 
When I ran the Dynamo program, the color pattern changed each and every time.  I had achieved a truly randomized pattern.






Panel Extrusions
Once this design was completed for the panel color pattern, the next step was to make a randomized panel extrusion pattern.  This was done in the exact same manner as the panel color pattern was done.  The only different was instead of using “Strings” and “Get Material By Name”, I used “Number” to give an extrusion depth value to the panels. 
Also, so that I could change both the material color pattern and the extrusion depth pattern on the façade at the same time, I made sure to link the already created “Select Model Elements” to 14 new “Set Element Parameters”  (which control the extrusion) as well as the original 14 (which control the material color pattern). 












  
Final Results
Here you can see the final results from running the Dynamo program a few times.  Notice how the color pattern changes as well as the extrusion depth pattern changes each time that the program runs. 
























No comments:

Post a Comment