返回资讯中心
外部精选
软件工程
#开发者实时流

Complex Building Coloring in Arcol

Arcol is the browser-based design tool for buildings, letting architects and contractors collaborate directly on early project definition and ideation, comparing trade-offs and options in the earliest phases of the desi…

Hacker News 最新joeld422026/10/14 · 2026/10/1412 分钟阅读

以下正文同步自 Hacker News 最新,版权归原站所有,已转换为易读排版。

Arcol is the browser-based design tool for buildings, letting architects and contractors collaborate directly on early project definition and ideation, comparing trade-offs and options in the earliest phases of the design process. We recently launched an integration with the 3d modeling tool Rhino, allowing our users to create arbitrarily complex building shapes and stream those into Arcol for evaluation - floor plans, metrics, site layouts, and more.

We talked previously about the process of importing arbitrary 3d models, cleaning up messy and broken geometry to allow users to model anything they can imagine without compromising on their workflow.

But what comes next? Once the user has imported the model, they will split it into floors and begin breaking those floors down into floor plans - individual units and rooms - to demonstrate how the building might satisfy particular unit mix requirements or be used in practice by its owner. A critical step in this visualization is that the resulting buildings must be able to draw the colors of the floor plans it contains correctly, like so:

In Arcol, we call this workflow “complex buildings”. Their shapes can be arbitrary and the models can contain tens of thousands of triangles, but editing their floor plans needs to feel immediate. The rendering challenge we faced was keeping the building’s shape and all the spaces within it visible and responsive, even as the design changes.

This challenge led us to research and experiment with several approaches, and ultimately, to invent a new approach to rendering buildings that lets us draw scenes and diagrams at interactive speeds, without needing to recompute the building geometry, even for truly complex buildings with millions of polygons.

Floor plans in Arcol define volumes in space for each room, and we want to intersect these with the building shell to determine the correct exterior coloring to apply. The traditional way to approach this problem in CAD is through Constructive Solid Geometry. This approach would geometrically compute the intersection between the shape of the building shell and the internal functions and area types defined by the floor plans, resulting in the geometry of these overlapped regions. This was a lot of computation to generate a detailed model that, ultimately, we didn’t actually need.

We’re still calculating the cross-section analytically for each floor against the building mesh, so we can accurately calculate metrics and areas for Arcol’s measurement and reporting features. But for interactive display we want something that can update in real-time.

Additionally this approach would need to handle lots of cases that are difficult for CSG algorithms, including building masses that look reasonable but have invisible problems like tiny gaps or duplicated edges. We needed something that would work with even with a highly tessellated curved surface, photogrammetric reconstruction, or lidar scanned building model. We tried some remeshing and shrink-wrap approaches to preprocess the geometry, but that resulted in messy geometry, rounded off corners, and weird shading even at unreasonably high triangle counts. Ultimately, we realized that using CSG on dense models was too slow to allow our goal of interactive editing.

One interesting approach is the idea of using “stencil CSG”. This works not by figuring out where the meshes intersect geometrically, but by drawing them using the stencil buffer to mask one shape with another. By carefully rearranging the operations, you can render an arbitrary CSG tree with this approach, and this has been used by tools such as OpenCSG to render complex CSG scenes.

This seemed promising, however, we’re still drawing each room or object separately. So in this case, we want to draw the building shell (purple sphere) with the color from the interior volumes that it overlaps, but since the shell is still a single draw, even though it’s clipped correctly, it still has a single material color, taken from the shell’s draw call not the extrusion.

While this method is simple to implement in isolation, it’s harder to make it work in the context of a larger scene. This approach resulted in a lot of render passes per building and was difficult to integrate with the rest of the scene geometry like the site context buildings, imported models, and other scene buildings.

We realized that we don’t need to compute arbitrary CSG volumes here. Our problem was more specific: we just want to draw the interior regions where they are overlapping the building shell, and we only need the color from the region, as the rest of the information can come from the building shell.

The idea was that instead of using a single stencil pass to mask where a volume was, we could render a pair of z-depth images: both the nearest z-depth (a typical z-buffer), and also one for the furthest backfacing depth.

正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。

打开原文
去社区讨论 →