Palladio:一个面向Houdini的开源城市引擎插件

 

 

原文链接:

https://www.esri.com/arcgis-blog/products/city-engine/3d-gis/palladio-open-source-cityengine-plugin-for-houdini/

插件地址:

https://github.com/Esri/palladio

 

Matthias Buehler,vrbn.io
Simon Haegler,苏黎世埃斯里研发中心

最初的动机之一Esri市工程师是为电影创造一个比手工模拟一切更有效的数字城市环境。虽然自从加入ESRI产品家族以来,CityEngine的主要应用已经转向城市规划,但我们在视觉特效产业(VFX)中仍然有一个很小但很强的用户基础。最近一个使用“城市英语”的电影的例子是叶片转轮2049.

城市英语的核心是程序性建模语言“CGA”。CGA代表的是“计算机生成的体系结构”,它可以表达广泛的建筑模式(例如窗口的布局)、大量的配置(例如建筑物的翅膀)等等。CGA被组织成规则,这些规则被评估成建筑物或整个城市的三维模型。这些规则使用外部属性–从简单的值(如“建筑物高度”)到更复杂的输入数据(如分区法)。最后,这些外部属性控制着一个城市的总体设计,并确保多个建筑之间的一致性。

虽然CityEngine有许多内置特性可以在场景级别(例如地图层)为CGA创建属性,但这些属性通常来自外部软件包,必须导入。虽然在VFX和GIS世界中有许多文件格式支持属性的传输(例如Alembic或Esri FileGDB),但是在这个过程中总是存在一定的开销甚至转换损失。

CityEngine用于编写规则包(RPK),它是CGA规则和相关资产(几何图形和纹理)的独立集合。这些包随后可以由运行在其他主机应用程序中的CityEngineSDK使用,以创建最终的3D模型。

属性的困难只是我们研究如何将CityEngine CGA直接集成到其他软件包中的原因之一,正如我们用Autodesk Maya的实验插件。Maya插件演示了一个工作流,该工作流使用CityEngine编写“规则包”(RPK),该插件基于城市Engine SDK(又称“程序运行时”,PRT)。

我们希望把这提升到下一个水平,并将CGA无缝地集成到VFX工作流中,从建模到模拟(比如破坏、火灾、水)到最终的渲染传递。因此,没有比这更好的主机应用程序了。胡迪尼,有着20多年的VFX程序工具的历史。

 

输入“Palladio”-一个开源的Houdini插件

VRBN苏黎世研发公司也乐于推出一个名为“Palladio”的新开源项目。Palladio是SideFX Houdini的插件,并封装了过程建模核心城市工程师。它的目标是在VFX,游戏,建筑可视化和城市规划社区的开发者。我们将这个插件看作是为城市环境创建更高层次的建模工具的一个构建块。胡迪尼数字资产(HDA).

SideFX Houdini是获奖用于VFX仿真、建模、动画和渲染的软件包。胡迪尼最初是在1996年发布的,在程序上有着很强的背景,比如毁灭、烟雾、火灾和水模拟。它作为一个通用的建模和动画工具最近获得了牵引力,并成为一个适合的主机非常具体的建筑建模工具的城市引擎CGA。

我们邀请所有与Houdini和CityEngine一起工作的开发人员尝试一下Palladio,甚至可以分叉存储库并创建拉请求。目前,Palladio既不是ESRI,也不是Vrbn的产品,也没有任何一家公司的官方/商业支持。如果您对与Palladio有关的商业服务感兴趣,请联系Info@vrbn.io

欢迎来到“Palladian计算机墓地”

让我们看一个例子,看看如何将Houdini运算符和CityEngine规则结合使用。这些结合在一起的可能性是无穷无尽的和有趣的探索。在这个例子中,最初是一个反乌托邦的大城市的市中心,最终看起来就像一个垃圾场的旧电脑案件捆绑在一起的渔网。这个演示场景是可得在Palladio GitHub存储库上(附于发行版)。

此示例场景由四个主要步骤组成,前三个步骤使用按顺序链接的CityEngine规则包(RPK)生成街道、包裹和建筑旧电脑箱。第四步使用Houdini工具将凸包的线框放在“建筑物”周围。请注意,在独立的CityEngine中,链接规则包和组合CGA叶形几何操作是不可能的,至少在这种直截了当的方式下是不可能的。

(1)第一RPK通过递归细分和旋转形状范围生成街道布局和原始布局。

(2)第二次RPK随机抵消原始地块,将其划分为建筑足迹和庭院面积。

(3)第三个RPK创造了实际的建筑体积。这些建筑基本上是由两种不同正面风格的随机堆叠的立方体组成的。

(4)接下来,我们使用Houdini算子在建筑物的“叶形”(左图像)周围创建一个凸包,然后将其合并在一起(右图像)。

最后,我们重新考虑了所有的“码”,并添加了线框,使它看起来像一个网。同时,我们使用材料。

请注意,Palladio不只是生成几何。每个Palladio“Generate”操作符也可以发出CGA属性或报告,比如作为Houdini原始属性的唯一建筑物标识符或材料属性。在这个例子中,我们使用它来计算建筑物的数量(没有显示在上面)。

 

Matthias Buehler, vrbn.io
Simon Haegler, Esri R&D Center Zurich

One of the original motivations for Esri CityEngine was to create digital urban environments for movies in a more efficient way than modelling everything manually. While the main application of CityEngine has shifted to urban planning since it joined the Esri product family, we still have a small but strong user base in the visual effects industry (VFX). A recent example of a movie where CityEngine has been used is Blade Runner 2049.

At the core of CityEngine is the procedural modelling language “CGA”. CGA stands for “Computer Generated Architecture” and can express a wide range of architectural patterns (e.g. the layout of windows), mass configurations (e.g. wings of a building) and much more. CGA is organized into rules that are evaluated into 3D models of a building or a whole city. These rules consume external attributes – from simple values like “building height” to more complex input data like zoning laws. In the end, these external attributes control the overall design of a city and ensure consistency across multiple buildings.

While CityEngine has a number of built-in features to create attributes for CGA on the scene level (e.g. map layers), these attributes often come from external software packages and have to be imported. And while there are a number of file formats in the VFX and GIS world that support transport of attributes (e.g. Alembic or Esri FileGDB), there is always a certain overhead or even conversion loss in this process.

CityEngine is used to author Rule Packages (RPK) which are a self-contained collection of CGA rules and associated assets (geometry and textures). These packages can be subsequently consumed by the CityEngine SDK running inside other host applications to create the final 3d models.

The difficulty with attributes is only one of the reasons we looked into ways to integrate CityEngine CGA into other software packages directly, as we have demonstrated with an experimental plugin for Autodesk Maya. The Maya plugin demonstrates a workflow that uses CityEngine to author “Rule Packages” (RPK) that are consumed by a plugin based on the CityEngine SDK (also known as “Procedural Runtime”, PRT).

We want to take this to the next level and have a seamless integration of CGA into a VFX workflow that ranges from modeling to simulation (think destruction, fire, water) to the final render pass. For this, there is no better host application than SideFX Houdini, with its 20+ years of history in procedural tools for VFX.

 

Enter “Palladio” – an open-source Houdini plugin

VRBN and Esri R&D Zurich are happy to introduce a new open-source project called “Palladio”. Palladio is a plugin for SideFX Houdini and wraps the procedural modeling core of CityEngine. It is aimed at developers in the VFX, Game, Architectural Visualization, and Urban Planning communities. We see this plugin as a building block to create higher-level modelling tools for urban environments in the form of Houdini Digital Assets (HDA).

SideFX Houdini is an award winning software package for VFX simulation, modelling, animation, and rendering. Houdini was originally released in 1996 and has a strong background in procedurally creating special effects like destruction, smoke, fire, and water simulations. It recently gained traction as a general purpose modelling and animation tool and makes for a suitable host for the very specific architectural modeling tools of CityEngine CGA.

We invite all developers working with Houdini and CityEngine to give Palladio a try, maybe even fork the repository and create pull requests. Currently, Palladio isn’t either an Esri or a vrbn product and there isn’t an official/commercial support from either of them. If you are interested in commercial services related to Palladio, please contact info@vrbn.io.

Welcome to the “Palladian Computer Graveyard”

Let’s look at an example to see how you can use Houdini operators and CityEngine rules together. The combined possibilities are endless and fun to explore. In this example, what started out as a dystopian mega-city downtown ended up looking like a junkyard of old computer cases bound together by a fishing net. This demo scene is available on the Palladio github repository (attached to releases).

This example scene consists of four main steps, the first three steps use CityEngine rule packages (RPK) chained in sequence to produce streets, parcels, and buildings old computer cases. The fourth step uses Houdini tools to put the wireframe of a convex hull around the “buildings”. Please note that chaining rule packages and operating on combined CGA leaf shape geometry is not possible in standalone CityEngine, at least not in this straight-forward manner.

(1) The first RPK generates the street layout and raw parcels by recursively subdividing and rotating the shape scopes.

(2) The second RPK randomly offsets the raw parcels to divide them into building footprint and yard area.

(3) A third RPK creates the actual building volumes. The buildings basically consist of randomly stacked cubes with two different facade styles.

(4) Next, we use Houdini operators to create a convex hull around the “leaf shapes” of the buildings (left image) and then merge it all together (right image).

Finally, we remesh all the “yards” and add wireframes to make it look like a net. Also, we apply the materials.

Please note that Palladio does not just generate geometry. Each Palladio “generate” operator can also emit CGA attributes or reports like unique building identifiers or material properties as Houdini primitive attributes. In this example, we use this to count the number of buildings (not shown above).

 

 

Acknowledgements

Our thanks go to the fine folks at Esri R&D Zurich and VRBN that provided valuable comments and feedback. Special thanks go to Johnny at vrbn for his work on the logo.