Free-form Floor Plan Design using Differentiable Voronoi Diagram 11/03/2024 Free-form Floor Plan Design using Differentiable Voronoi Diagram Introduction Recent data-driven methods have employed deep learning to create floor plans. However, these learning-based methods often fail to support unconventional room shapes and new constraints that are not assumed in a specific training dataset. Unfortunately, the existing methods are not suitable for "free design of the ground plans" advocated by an architect Le Corbusier. In this paper, we present a differentiable room representation for the flexible generation of floor plans, while considering various constraints on the shape and connectivity of the room. Our representation uses the Voronoi diagram to partition the floor into multiple rooms. Specifically, one room is defined using multiple Voronoi cells that are implicitly defined based on the distance to the Voronoi sites(centroids of the voronoi cells) and support topology changes, which facilitates flexible exploration of room connectivity during optimization. Although the Voronoi diagram represents rooms with changing topologies, the unconstrained Voronoi diagram is excessively flexible to produce plausible floor plans. For instance, a room may be separated into multiple islands or may have unnecessarily complicated wall shapes. To overcome these issues, we develop tailored loss functions that encourage rooms to have connected shapes with simple wall shapes. In addition, by performing the optimization multiple times with different random initial- izations, the user can efficiently obtain various design options Related Work Automatic layout generation: In this paper, we focus on the generation of architectural floor plans, where the rooms must satisfy varying connectivity and size constraints specified by the architect, as well as other geometric requirements, such as the simplicity of a wall. Urban pattern: layout design by hierarchical domain splitting Data-driven estimation of building interior plans Interactive Furniture Layout Using Interior Design Guidelines Make it Home: Automatic Optimization of Furniture Arrangement Game Level Layout from Design Specification Floor plan gneeration: this work aims to generate the layout and connectivity of rectangular or cubic rooms using different computational approaches, Evolutionary approach for spatialarchitecture layout design enhancedby an agent-based topology finding system MIQP-based Layout Design for Building Interiors Computer-Generated Residential Building Layouts Computing Layouts with Deformable Templates iPLAN: Interactive and Procedural Layout Planning WallPlan: Synthesizing Floorplans by Learning to Generate Wall Graphs BubbleFormer: Bubble Diagram Generation via Dual Transformer Models. HouseDiffusion: Vector Floorplan Generation via a Diffusion Model with Discrete and Continuous Denoising Voronoi diagram in graphics and vision: our method can represent various free-form wall and boundary shapes using the differentiable Voronoi diagram, whose shapes can be fluidly optimized through gradient-based optimization. Cellular Topology Optimization on Differentiable Voronoi Diagrams Differentiable Voronoi Diagrams for Simulation of Cell-Based Mechanical Systems Hybrid explicit-implicit representations: hybrid representations allow the algorithms to handle constraints on the explicit boundary geometry better while enabling a flexible topology change. Cubic Stylization Method Floor plan representation The user provides a 2D region \(\Omega\), which is the outline of the available space. Given the region, a connected and bounded shape in the 2D space \(\mathbb{R}^2\), we intend to compute a partition of \(\Omega\) into multiple rooms. Voronoi diagram: To achieve topological flexibility in the connectivity between rooms, we use the Voronoi diagram to represent the partition. A Voronoi diagram is generated from a set of points, called sites \(\mathcal{S} = \{s_1 \,...\, s_N\}\). Each site \(s_i\) is assiciated with a region \(\mathcal{C}_i\) called cell, which comprises the points whose nearest site is the cell's site, i.e., \[ \,\\ \mathcal{C}_i = \{ \mathbf{x} \in \Omega \, | \, ||\, \mathbf{x}-s_i \,|| \leq ||\, \mathbf{x}-s_j \,|| \text{ for all } i \neq j \} \,\\ \] Voronoi vertex: The cells take polygonal shapes, whose corner vertices are called Voronoi vertices. We denote the set of all the Voronoi vertices in the diagram as \(\mathcal{V} = \{ \mathbf{v}_1 \, ... \, \mathbf{v}_M \}\). To compute the deformation of the room boundary from the site motion, classifying the Voronoi vertices into the following three types is convenient (see Fig 1 above): \(\text{(a)}\) the intersection of the three bisectors, \(\text{(b)}\) the intersection of one bisector and the boundary \(\Omega\), and \(\text{(c)}\) the vertex forming the corner of \(\Omega\). Unlike \(\text{(a)}\) and \(\text{(b)}\), the position of \(\text{(c)}\) does not depend on the Voronoi sites and is constant during our optimization. The Voronoi diagram shows the partition of the input region \(\Omega\) by a set of points called sites \(\mathcal{S}\). The corners of the Voronoi cells are Voronoi vertices \(\mathcal{V}\). The Voronoi vertex is either a vertex of \(\Omega\) \(\text{(c)}\), on the boundary edge \(\text{(b)}\), or inside \(\Omega\) \(\text{(a)}\). The combination of multiple cells represents a room. Room representation: A typical floor plan is complex and thus its room cannot be represented by a single Voronoi cell. To increase the representation capability, we combine multiple cells to represent one room (see Fig 1 right-most). This is concretely achieved by associating each site with one of the rooms, which is determined at the initialization and then remains constant. Initialization: At the time of initialization, we randomly generate a user-specified number of sites in the input region \(\Omega\). To ensure that no two sites are excessively close to each other, we use the Poisson disk sampling with the dart-throwing algorithm. Note that the areas of individual sites are not constrained during the optimization, and the room area of the output plan is governed by the area loss explained later. Floor plan optimization We optimize the shape and connectivity of the rooms by moving the positions of the sites. The sites are moved to minimize the scalar loss function \(\mathcal{L}\) that formulates the desirable properties of the rooms. Since the optimization variables are continuous values of 2D coordinates, they can be easily incorporated into the optimization framework using the gradients of \(\mathcal{L}\). During the optimization, we do not strictly constrain the site to be inside the region \(\Omega\). Instead, by allowing the sites to move freely outside \(\Omega\), we can handle a concave input region \(\Omega\). Differentiable Voronoi diagram: We differentiate these components with respect to the site positions \(\mathcal{S}\) using the chainr rele by computing the gradients \(\partial\mathcal{V} / \partial\mathcal{S} \). The positions of the Voronoi vertices change linearly with the infinitesimal movement of the sites. However, this change does not affect the loss or gradient computation, which is performed independently for each iteration. Loss function: We update the coordinates of the sites \(\mathcal{S}\) to minimize the loss \(\mathcal{L}\). Specifically, our loss \(\mathcal{L}\) is defined as the weighted sum of the different losses as \[ \,\\ \begin{align*} \mathcal{S}^{*} &= \arg \min_{\mathcal{S}} \mathcal{L}(\mathcal{S}, \mathcal{V}(\mathcal{S})) \\ \mathcal{L} &= \mathcal{L}_{\text{wall}} + \mathcal{L}_{\text{area}} + \mathcal{L}_{\text{fix}} + \mathcal{L}_{\text{topo}} + \mathcal{L}_{\text{Lloyd}} \end{align*} \,\\ \] We use gradient-based optimization to minimize the loss function \(\mathcal{L}\) in the above. Each time the sites are moved by the optimization, the Voronoi diagram is updated. We use \(\mathcal{L}_{\text{fix}}\) to fix some of the sites. For instance, the entrance to the house is specified by the user by fixing the sites related to the entrance there. Wall loss: As the unconstrained Voronoi diagram typically produce undesirable fluctuations in the wall orientations, we design a tailored loss function to regularize the wall complexity. Inspired by the Cubic Stylization, we regularize the \(\mathcal{L}_1\) norm of the wall length. \(L_1\) norm is defined as \(v_x + v_y\) (norm of \(x\) + norm of \(y\)), therefore the \(\mathcal{L}_{\text{wall}}\) has the minimal when vector \(\mathbb{v}_j - \mathbb{v}_i\) is vertical or horizontal. \[ \,\\ \mathcal{L}_{\text{wall}} = w_{\text{wall}} \sum_{(v_i, v_j) \, \in \, \mathcal{E}} ||\, \mathbb{v}_i - \mathbb{v}_j \,||_{L1} \,\\ \] where \(\mathcal{E}\) denotes the set of edges of the Voronoi cells between two adjacent rooms and the \(\mathbb{v}_i\) and \(\mathbb{v}_j\) denote the Voronoi vertices belonging to the edge. Computation of loss functions Area loss: The area of each room is specified by the user. We minimize the quadratic difference between the current room areas and the user-specified targets. Here, \(\bar{A}_r\) denotes the target area for the room \(r\). \[ \,\\ \mathcal{L}_{\text{area}} = w_{\text{area}} \sum_{r=1}^{\#Room} ||\, A_r(\mathcal{V}) - \bar{A}_r \,||^2 \,\\ \] Lloyd loss: To regulate the site density, we design a loss function inspired by the Lloyd's algorithm. Here, \(\mathbb{c}_i \) denotes the centroid of the \(i\)-th Voronoi cell. This is useful for attracting these exterior sites inside \(\Omega\). \[ \,\\ \mathcal{L}_{\text{Lloyd}} = w_{\text{Lloyd}} \sum_{i=1}^N ||\, \mathbb{s}_i - \mathbb{c}_i \,||^2 \,\\ \] Topology loss: We design the topology loss such that each room is a single connected region, and the specified connections between rooms are achieved. We move the site to satisfy the desired topology by setting the goal position \(\mathbb{t}_i\) for each site \(\mathbb{s}_i\) as \[ \,\\ \mathcal{L}_{\text{topo}} = w_{\text{topo}} \sum_{i=1}^N ||\, \mathbb{s}_i - \mathbb{t}_i \,||^2 \,\\ \] The goal position \(\mathbb{t}_i\) can be automatically computed as the nearest site to the site from the same group. The positions of target sites for topology loss For each room, we first group the sites belonging to that room into groups of adjacent sites. If multiple groups are present, that is, a room is split into separated regions, we set the target position of the site \(\mathbb{t}_i\) as the nearest site to that group. If a room is connected in one piece, we examine the connectivity between two different rooms specified by the user. If two rooms that are specified as “connected” in the input are not adjacent, we compute the nearest pair of sites from each room and then set the positions as the target positions for each other. Results Demos ( ... ) https://github.com/nobuyuki83/floor_plan