计算机工程与应用 ›› 2025, Vol. 61 ›› Issue (13): 349-357.DOI: 10.3778/j.issn.1002-8331.2404-0024

• 工程与应用 • 上一篇    下一篇

面向大型古建筑虚拟场景的程序化生成方法

张舒南,吕德生   

  1. 1.哈尔滨工业大学 深圳国际设计学院,广东 深圳 518055
    2.哈尔滨工业大学 建筑与设计学院,哈尔滨 150001
    3.互动媒体设计与装备服务创新文化和旅游部重点实验室,哈尔滨 150001
  • 出版日期:2025-07-01 发布日期:2025-06-30

Procedural Generation Method for Large-Scale Virtual Scenes of Ancient Buildings

ZHANG Shunan, LYU Desheng   

  1. 1.Shenzhen International School of Design, Harbin Institute of Technology, Shenzhen, Guangdong 518055, China
    2.School of Architecture and Design, Harbin Institute of Technology, Harbin 150001, China
    3.Key Laboratory of Interactive Media Design and Equipment Service Innovation, Ministry of Culture and Tourism, Harbin 150001, China
  • Online:2025-07-01 Published:2025-06-30

摘要: 为满足虚拟现实、三维模拟和电子游戏等领域对大范围、易于修改的虚拟场景的需求,并解决传统场景制作方法的效率低下和难以修改的问题,提出了一种新的大型虚拟场景程序化生成方法。利用程序化建模优势的方式,生成真实感地形、确定城市边界,同时构建楼阁、庭院和拱桥等中式建筑的数字资产。在构建中式建筑时,使用B样条曲线对飞檐的形状进行塑造。使用改进的细分算法在每次迭代中加入随机插值因子,生成布局更加合理的路网,并根据分割产生的区块的特征分配不同类型和风格的建筑。该方法采用程序化依赖图管理数字资产,自动处理不同资产之间的依赖关系。通过虚幻引擎实现了场景的自动生成及漫游交互。实验表明,与其他算法相比,该方法中使用的改进细分算法生成的城市布局更加均匀,区块种类更加均衡;与传统虚拟场景制作方法相比,该方法可显著缩短三维资产生成的时间,优化了工作流程,使制作者能够更高效地创建细节丰富且沉浸感强的中国古风虚拟场景。

关键词: 程序化建模, 虚拟场景, 中国风古建筑, 细分算法

Abstract: In response to the requirements for large-scale, easily modifiable virtual scenes in areas such as virtual reality, 3D simulation, and video games, and to address the inefficiencies and difficulties in modifying traditional scene creation methods, this paper proposes a novel procedural generation method for large virtual scenes. Initially, by leveraging the advantages of procedural modeling, realistic terrain is generated, city boundaries are determined, and digital assets of Chinese-style buildings, such as pavilions, courtyards, and arch bridges, are constructed. B-spline curves are employed to shape the flying eaves in the construction of Chinese buildings. Subsequently, an improved subdivision algorithm is utilized, incorporating random interpolation factors in each iteration to generate a more rational road network layout. Different types and styles of buildings are allocated based on the characteristics of the resulting blocks. This method employs a procedural dependency graph to manage digital assets, automatically handling the dependencies between various assets. Finally, the automatic generation and interactive roaming of the scene are realized through the Unreal Engine. Experimental results demonstrate that the improved subdivision algorithm employed in this method produces a more uniform urban layout and a more balanced variety of blocks compared to other algorithms. Moreover, compared to traditional virtual scene creation methods, this approach significantly reduces the time required for 3D asset generation, optimizes the workflow, and enables creators to efficiently produce richly detailed and immersive virtual scenes in a traditional Chinese style.

Key words: procedural modeling, virtual scene, ancient Chinese architecture, subdivision algorithm