Introduction to 3D Modelling & Parametric Design Sapta Sunusae MSc Computational Methods in Architecture Cardiff University
CONTENTS 1. Morphs & 3D Smoothing 2. Aggregation 3. Multi-agent Modelling based on Physarum Polycephalum 4. Python for Grasshopper 4.1 Vertex Control : Randomize Vertices 4.2 Dispatch Faces Randomly 4.3 Frame Probabilistic Subdivision 4.4 Quad Subdivision with Attractors 4.5 Subdivision Combination 5. Reference
ART801 - Sapta Sunusae - 2056054
2/19
1. Morphs & 3D Smoothing [Box Morph] To use this method, we need to create a base geomtery and a twisted box. There are various ways to create twisted box using pufferfish plugin in grasshopper. In this case, twisted box is created by to surface. To make it more dynamic, the input for UV division can be controlled by graph mapper. [Catmull-clark subdivision] Catmull-Clark subdivision is a method to smooth a 3-dimensional polygon mesh surface by dividing the surface’s polygons into smaller polygons, repositioning the previous vertices based upon adjacent vertices. The method takes each primitive polygon contained in the mesh and divides the polygon into quadrilaterals, constructing new vertices based upon the averages and adjusting the previous vertices of the original polygon based upon the surrounding environment. source : algosome.com
Softwares - Rhinoceros 3D + grasshopper - Pufferfish plugin - Weaver bird plugin ART801 - Sapta Sunusae - 2056054
3/19
Pufferfish Plugin for Grasshopper
Weaverbird Plugin for Grasshopper
Pufferfish is a set of 330 components which focuses on Tweens, Blends, Morphs, Averages, Weaverbird is a topological modeler by Giulio Piacentino that contains many of the known subdivision and transTransformations, & Interpolations - essentially Shape Changing. This plugin is written by formation operators, readily usable by designers. Michael Pryor
(c) (d)
(b)
[1] Base Geometry
[5] Morph to Twisted Box
Create a simple geometry that will be morphed into a twisted box. It is important to have horizontal connection (a),(b),(c),(d) in each side if the twisted box is arranged id UV direction. In case where the twisted box has UV and W as vertical direction, make the connection for top and bottom side as well in the base geometry.
The next step is to plot the base geometry that has been bounded by box in step [2] into a twisted box created in step [4]. Grasshopper has a default box morph component. However, in this case, the component used is from pufferfish plugin as it runs faster.
(a)
[2] Bounding Box Bounding box is added to the base geometry using bounding box component in grasshopper.
[6] Morphed Geometry All of the geometries plotted inside the twisted box are now merged as one geometry.
[3] Surfaces There are various ways to create twisted box, one of them is formed by two surfaces. To be specific, box will be generated within bottom surface and top surface.
[7] Catmull-clark Subdivision
[4] Twisted Box through Surfaces Twisted box is created with the UVdivision only, W division is not added as the base geometry created without top and bottom connection. If W direction is added, final geometry will have no connection in vertical direction. This component is part of pufferfish plugin. ART801 - Sapta Sunusae - 2056054
For a refined result, mesh smoothing is needed. Catmull-clark subdivision component from weaverbird plugin allows the mesh to be subdivided which result a smooth surface.
4/19
2. Aggregation
Aggregate architecture are understood as material systems consisting of large masses of granules - designed or natural - interacting with each other only through loose, frictional contact. As a consequence, they take the realm of structural stability and architectural planning into entire re-configurability and into merely probable predictions of their prospective behaviour. [Beesley, P, Khan, O, Stacey, M 2013, ACADIA 2013:Adaptive Architecture]
Softwares - Rhinoceros 3D + grasshopper - Fox plugin ART801 - Sapta Sunusae - 2056054
5/19
Fox Plugin for Grasshopper Fox plugin contains series of algorithms for Graphs, Aggregations, Iso-surfaces. It is developed by Petras Vestartas and Gediminas Kirdeikis from Workshop at Vilnius Academy of Arts (VAA).
[5] Target Geometry
[2] Rotation, iteration and direction
[1] Initial tile
(-a1)
(c)
(b1) (-c) (c1) (b)
(-c1)
(b)
(a) (a)
(b1)
(a1) Tile
Iteration 1
In one tile, there are 3 lap joints which are (a) and (c) that able to make connection, then joint (b) which is a root. Thus, the connection only allows joint (a) to connect to (b) and (c) connects to (b).
Target Geometry
Using fox plugin for grasshopper, assign the lap joint for connections and root. As lap needs to be perpendicular to each other to create joint, rotate the tile clockwise/counter clockwise for each new connection made. The direction of the tile has to be adjusted to move forward or backward to the original tile.
[3] Tile growth
Iter. 2
(a)(b)(c)
x direction neutral -x direction
(a)(b)(c)
(a)(b)(c)
(a)(b)(c)
(a)(b)(c)
(a)(b)(c)
(a)(b)(c)
(a)(b)(c)
(a)(b)(c)
(a)(b)(c)
(a)(b)(c)
Iter. 1
(a)(b)(c)
It is crucial to ensure the initial tile is inside the target geometry, otherwise fox plugin will not able to run the function. In this case, the target geometry is a merged two sphere with a hollow space inside and the tile iteration is made up to 40 times.
[6] Final aggregation
(a)(b)(c)
Iter. 3
Tile inside target geometry [iteration 40]
(a)(b)(c)
(a)(b)(c)
Iteration System [4] Tile growth The growth system goes to x and -x direction, where joint (a) and (c) face to opposite direction. As one modul will connect to other two moduls : The number of modul for each iteration (N) = 2n n = Iteration e.g. Iteration 3 (n=3) N = 23 =8 ART801 - Sapta Sunusae - 2056054
6/19
[Tile]
[Target Geometry]
[Tile]
[Target Geometry]
ART801 - Sapta Sunusae - 2056054
7/19
3. Multi-agent Modelling based on Physarum Polycephalum
P.Polycephalum is a single-celled slime mould that is able to solve a maze by retracking all the paths and find the shortest way to get food. Jeff Jones, in his book From Pattern Formation to Material Computation addopted the behaivour of this eukaryotic organism into a multi-agent system. Furthermore, this code is developped for 3D environment by Ma Yidong as a plugin for grasshopper namely Physarealm.
Softwares - Rhinoceros 3D + grasshopper - Physarealm plugin ART801 - Sapta Sunusae - 2056054
8/19
Physarealm Plugin for Grasshopper Physarealm is a stigmergy algorithms which based on p.polycephalum behaviour. It is developed by Ma Yidong from his design studio at School of Architecture, Tsinghua University
P.Polycephalum initial agent (point emitter) Foods Obstacles
Multi Agents Behaviour The P.Polycephalum stigmergy algorithm aims to find a way to the food and avoid obstacles in an environtment. In the diagram (i), green dot represents inital P.polycephalum cell (point emitter in the physarealm plugin), blue dots as foods, two red spheres are the obstacle, and box as and environment. While at the diagram (ii), agents has spreaded in all direction inside a box approaching the food. Agents will make crowd around the foods and start leaving other space without food to create an efficient path.
ART801 - Sapta Sunusae - 2056054
9/19
Initializing Population
Generating Network
In the first three steps, the process is about creating points population in an environment. Physarealm plugin is used during this step.
The second step is analizing the posible network among the points population. In this model, shortest walk is chosen as a final path which is sorted from proximity network.
[1] Initial Setting In this case, torus shape is chosen as an environtment for the physarealm. There is one point emitter (green dot) and three foods (blue dot) inside the torus. The number and location of both point emitter and food is optional as long as it is inside the environment, however it will affect the agents movement together with the subdivision setting for the environment (torus).
[4] Proximity 3D From the agents point, proximity grouping is generated to initate the network. In this example, the group of proximity is made of five. It means that 5 points close to each other will be connected with a line.
[5] Average and Line In this step, line is generated from two points ; average position (red dot) and each agent’s position (green dot) to create an input for shortest walk path in the next step.
[2] Trigger, Interval, Reset After adjusting the initial setting, core component of physarealm need a trigger and interval. The interval will capture each of agent’s movement in a certain time such as 10 ms, 20ms, 50ms and so on. Trigger button allows to start or stop the capture. Another one is reset button which can restart the simulation. In this picture, agents still move around the point emitter since the reset set to false.
[6] Shortest Walk Network from step 4 (proximity) is sorted to create the shortest path from the average position in step 5 to each agent’s position.
[3] Capture the movement Once the toggle button for reset set to true, agents will start spreading in the environment to search for foods. The picture shows that agents make crowd around the food. Stop the trigger button to capture the agents at a certain time.
ART801 - Sapta Sunusae - 2056054
[7] SubD Pipe As the final step, the shortest walk path is now thickened with subD pipe. To create more chamfer in each branch, set the smooth value when generating the pipe.
10/19
4. Python for Grasshopper
In this part, the main focus is to split mesh surface into smaller faces and recurse it several times. By adjusting the level of recursion, applying random value and other inputs, the iteration results in many different forms.
Softwares - Rhinoceros 3D + grasshopper - Python Programming Language ART801 - Sapta Sunusae - 2056054
11/19
4.1 Vertex Control : Randomize Vertices
4.2 Dispatch Faces Randomly
Move each vertex randomly and create a new mesh Input type mesh : Mesh (Item Access), depth : float (Item Access)
Move each vertex by the closest attractor and create a new mesh Input type mesh : Mesh (Item Access), probability : float (Item Access)
[1] Input Mesh
[1] Input Mesh
In this example, the input is a mesh plane which has 5 width and 3 height division.
In this example, the input is a mesh plane which has 20 width and 20 height division. (quad mesh)
[2] Get all Vertices The first step is to extract all vertices in a mesh and store it in a list.
y
z
1
1
-1
1
Make each quad face in the input mesh ash as triangular face.
[3] Randomize xyz Movement Each vertice in a list then will be moved in a random value within a range of -1 to 1.
x
-1
[2] Triangulate Mesh
[3] Mesh A Output The random selection work on the following loop: For each face in mesh input, If random*100 < probability value (input), the mesh will be in output A, Else, the mesh will be in output B. In this example, probability value set to 50.
-1
[4] New Faces from New Vertices The final step is to add faces to all moved vertices that is extracted from mesh input.
[4] Mesh B Output Mesh B is a set of faces that does not belong to Mesh A.
ART801 - Sapta Sunusae - 2056054
12/19
4.3 Frame Probalistic Subdivision Move each vertex by the closest attractor and create a new mesh Input type mesh : Mesh (Item Access), recursionLevel : int (Item Access), recursionProbability : float (Item Access), offsetDepth1 : float (Item Access), offsetDepth2 : float (Item Access), holeRatio : float (Item Access)
[1] Input Mesh In this example, the input is a mesh plane which has no subdivision, hence there are for vertices. (quad mesh)
vidx3
Subdivision on Triangular Mesh Iteration 1
Iteration 2
Iteration 3
Iteration 4
Iteration 5
Iteration 6
[2] Offset Vertex
widx3 widx4
widx2 vidx2
vidx4
After extracting the vertex from inital mesh, all vertices is offseted inside, according to the value inserted in offset1, offset2. Based on the offset value, each vertex will not only moves in xy, but also z direction.
widx1
vidx1
[3] Add Subdivide Face widx2
Every each four vertices will create a new subdivision face to be patched for a whole new mesh.
widx1
vidx2
vidx1
[4] Second Iteration In this example, the input is a mesh plane which has 5 width and 3 height division.
ART801 - Sapta Sunusae - 2056054
13/19
4.4 Quad Subdivision with Attractors Move each vertex by the closest attractor and create a new mesh Input type mesh : Mesh (Item Access), recursionLevel : int (Item Access), offsetDepth1 : float (Item Access), offsetDepth2 : float (Item Access), attractors : Point3d (List Access), attractorRange: float (ItemAccess)
[1] Input Mesh
vidx4 vidx3
vidx1
In this example, the input is a mesh plane which has no subdivision, hence there are for vertices. (quad mesh) There is also attractor point input which is located by default at 0,0,0 (center of the mesh plane). This attractor point will define the location of the peak for division part.
vidx4 vidx3
widx5
widx3
vidx1 widx4
vidx2 vidx2 vidx4
widx2
widx1
[2] Add new vertices
widx3 vidx3
widx4 widx5
widx2 vidx1 widx1
Insert a new midpoint between each existing points and take a center point among those four. widx1=(vidx1+vidx2)/2 widx2=(vidx2+vidx3)/2 widx3=(vidx3+vidx4)/2 widx4=(vidx4+vidx1)/2 widx5=(vidx1+vidx2+vidx3+vidx4)/4
[5] OffsetDepth1 and OffsetDepth2
[6] Fourth Iteration
By combining input from OffsetDepth1 and OffsetDepth2, vidx1, vidx2, vidx3, vidx4 and widx5 will move along the mesh normal. While widx1-widx4 are still in their position,
Each quad mesh will continue to be subdivided, and some vertices will be translated following the first iteration’s rule.
vidx2
[3] OffsetDepth1
vidx4 vidx3
OffsetDepth1 input allows vidx1, vidx2,vidx3, vidx4 to translate in the same direction with mesh normal.
vidx1
vidx2
[4] OffsetDepth2
widx5
OffsetDepth2 input allows widx5 to translate in the same direction with mesh normal.
widx3 widx4
widx2
widx1
ART801 - Sapta Sunusae - 2056054
14/19
4.5 Subdivision Combination All of the python subdivision component created in the previous part will be combined. Weaverbird plugin will be used for mesh thickening and smoothing.
ART801 - Sapta Sunusae - 2056054
15/19
[1] Input Mesh
[2] Vertex Control : Randomize Vertices
In this example, the input is a mesh plane which has 5 width and 5 height division. (quad mesh)
Input 1. Mesh 2. Depth : Multiply the random value from python Output 1. New Mesh
[6] Custom Frame Probabilistic Subdivision Input 1. Mesh 2. Recursion Level Define the number of recursion 3. Recursion Probability Define the percentage of recursion 4. Offset Depth 1 Value for vertex offset 5. Offset Depth 2 Value for vertex offset 6. Hole Ratio Size of hole offset Output 1. Mesh
ART801 - Sapta Sunusae - 2056054
[3] Dispatch Face Random Input
1. Mesh 2. Probability Define the random switch for t Output 1. New Mesh A 2. New Mesh B
[7] Weaverbird’s Catmull-clark Subdivision
[8] Weaverbird’s Mesh Th
Component of Weaverbird Plugin
Component of Weaverbird Plu
16/19
mly
[4] Custom Frame Probabilistic Subdivision
the output Mesh A and Mesh B
hicken
Input 1. Mesh 2. Recursion Level Define the number of recursion 3. Recursion Probability Define the percentage of recursion 4. Offset Depth 1 Value for vertex offset 5. Offset Depth 2 Value for vertex offset 6. Hole Ratio Size of hole offset Output 1. Mesh
[9] Quad Subdivision with Attractor
[5] Weaverbird’s Mesh Thicken Component of Weaverbird Plugin
[10] Final Output
1. Mesh 2. Recursion Level Define the number of recursion 3. Offset Depth 1 Value for vertex offset 4. Offset Depth 2 Value for vertex offset 5. Attractor Point input as attractor 6. Attractor Range Value to set the radius of attractor Output 1. Mesh
ugin
ART801 - Sapta Sunusae - 2056054
17/19
5. Reference 1. Morphs & 3D Smoothing - Design Morphine 2. Aggregation - Gediminas Kirdeikis 3. Physarealm - Sajade Omidipour 4. Physarealm - Yuxiang Zhang 5. Python for Grasshopper - atlv.org
ART801 - Sapta Sunusae - 2056054
18/19
Thank You ©2022
ART801 - Sapta Sunusae - 2056054
19/19