ARCH 653 Final Project - BIM Data for Creative Design and Applications + Generative AI

Experiment Sun path Responsive Panels in Revit Using Dynamo



For my second project, I decided to experiment with sun-responsive panels in Revit using Dynamo. The goal was to create panels that dynamically adjust their position based on the sun's direction, optimizing shading and sunlight capture
So, here’s how I created this sun-responsive panel:

Part 1: Creating the Panel Family in Revit

First, I started by creating the panel family in Revit. I opened the Curtain Panel Pattern-Based Family template and added two reference points—one at the center and another offset. I made sure to turn on their reference planes for better control. Then, I connected these points with a 3D reference line.

To allow the panel to rotate, I added a rotation parameter. I selected one of the points, created a new Instance Parameter called R Panel, and linked it to the point's rotation property.

Next, I drew two profiles on either side of the line and used the Create Form tool to build the panel. I tested the rotation by adjusting the parameter in the family types, and it worked perfectly. I saved the family as Sun Panel.



Then, I moved to the conceptual massing environment. I created a curved surface because it helps show how the panels respond to the sun. I divided the surface into a grid with a fixed distance and loaded the Sun Panel family onto the grid.





Part 2: Building the Dynamo Script

Finally, I used Dynamo to make the panels respond dynamically to the sun. So, I followed few steps to created this Dynamo script to make sun-responsive panels for our project.

Step 1:Selecting the Panels
- The first step in the script was to identify the panels in the project. I used the Family Types node to load the Sun Panel family and connected it to the All Elements of Family Type node to select all panels in my model.
- To work with this panel geometry, I used the Element.Solids node, which extracts the 3D geometry of the panels.

Step 2: Finding Panel Centers
- Since the script relies on vectors, I needed the center point of each panel. I calculated this using the Solid.Centroid node, which gives the exact midpoint of each panel’s geometry.
- These center points serve as the base for generating vectors and determining panel orientations.


 Step 4: Creating Vectors for Panels
- To calculate how each panel should respond to the sun, I generated vectors for their direction. I used the Point.AsVector node to convert the center points into vectors and connected them to the Line.ByStartPointDirectionLength node. I used vector x, vector y node to get directions from the vectors as the panel will rotated only x and y directions.

In this part of the script, I set up the Z-direction for the panels. Since we don’t need vertical movement, I left the Z-value as 0 using a Vector.ByCoordinates node. To handle all panels, I used List.Count to get the number of panels and repeated the Z-value with List.OfRepeatedItem. Then, I combined the X, Y, and Z directions with vector.bycoordinates and connected this to direction of Line.ByStartPointDirectionLength node.

So, I used Line.ByStartPointDirectionLength to draw lines in 3D, showing the panel directions. This confirmed everything was aligned correctly and set the foundation for sun alignment in the next step.


Step 5: Calculating the Sun Direction
- Next, I calculated the sun’s direction using the SunSettings.Current node, which retrieves the sun’s position based on the Revit project settings. I set a time in settings.
- I needed X, Y and Z vector with the SunSettings.SunDirection node and needed to use List.repeateditem for all the panels.after that connected them with vector.bycoordinates.
Next, I visualized the sun’s direction by using Line.ByStartPointDirectionLength, which drew lines in the direction of the sun for comparison with the panel vectors.

Step 6: Comparing Panel and Sun Vectors
- To determine how the panels align with the sun, I used the Vector.AngleWithVector node. This calculates the angle between the sun’s vector and each panel’s direction vector. we will rotate everything around z axis. I added vector.zaxis and connected with rotationAxis of Vector.AngleWithVector node.
- The result tells me whether a panel is facing the sun directly or at an angle.

Step 7: Controlling the Panel Movement
- Now, to make the panels dynamic, I created a logic to control their rotation. I used a Code Block to define conditions:
  - If the sun’s angle is less than 45 degrees, the panel opens to allow maximum sunlight.
  - If the angle is greater, the panel remains closed to provide shading.
- I applied this logic to the panels using the Element.SetParameterByName node, which controls the R_Panel parameter I had set in the family.

  
It’s flexible enough to allow further customization, like using Z-direction vectors for 3D rotations or adding additional conditions for specific designs.

And that’s how this script works! It automates the rotation of panels to align with the sun dynamically, optimizing both shading and sunlight capture. 











Step 8: Visualizing the Result
- Finally, I tested the script by adjusting the sun’s position in Revit’s Sun Settings. The panels responded dynamically:
 - Panels facing the sun opened up.
 - Panels at steeper angles remained closed for shading.
 For instance, at 45 degrees, panels were open, and at 0 degrees, they were closed.



Presentation video:




References:









Comments

Popular posts from this blog

ARCH 653 Building Information Modeling in Architecture Project 1 - Parametric BIM + Generative AI

ARCH 655 Project_01