Ziye Liu's Blog
  • ( www.ziyeliu.com )
  • Home
  • Visual Effects Blog
    • Houdini >
      • Procedural Courtyard House
      • Procedural Music Animation
    • Maya - MEL >
      • MEL Rooftop Generator
      • MEL Circle of Spheres
    • Maya - Rendering >
      • Maya Render Premultiply Issue
      • Depth of Field and Bokeh
      • 3D Render - Match to a Real Object
      • RenderMan I
      • RenderMan II
    • Python >
      • Python Sampler Quilt
      • Motion Capture Data Parsing
      • Python and Turtle Graphics
  • Themes & Variations
    • The Film
    • Scene 1 - "Crazy Polka Dots"
    • Scene 2 - “Untitled”
    • Scene 3 - "Grapes"
    • Scene 4 - “Narcissus Garden”
  • 中文博客

Traditional Chinese Rooftop Generator

A Maya MEL Script

By Ziye Liu
M.F.A. Visual Effects, 2012
This is the second assignment of Prof. Deborah R. Fowler's VSFX 705 - Programming Concept class in Spring 2013.
This rooftop building tool is still in development. The idea is to build a Traditional Chinese rooftop using Maya Embed Language (MEL).
In the end, it will be a procedural modeler tool, preferably with shader and texture control. (it also depends on my learning progress of MEL)
Picture
Click above to download the Script. Use it at your own risk.
Picture
The Rooftop Generator can create a traditional Chinese rooftop 3D polygon model procedurally.
Demo video of the Rooftop Generator:

Inspiration

Picture
The Forbidden City, Beijing, 2007, by Ziye Liu
The history of architecture is part of the history of its culture. Unlike royal palace and tourism spots, those less attractive ancient buildings that still exist in modern China are being threatened by modernization and urbanization.
Photographs © Ziye Liu, All Rights Reserved 
Picture

About Traditional Chinese Architecture

This rooftop generate can be used to create 3D model suitable for the following types:
Picture
Hsuan-Shan (悬山) 
The 3rd one on the 1st row in the illustration (Fig. 1, below):
  • 悬山顶's Wikipedia page (Simplified Chinese)
  • 悬山's page in Baidu Encyclopedia (Simplified Chinese)
  • Simplified Chinese: 悬山(a.k.a. 挑山)
  • Traditional Chinese: 懸山
  • Chinese Pinyin: Xuán Shān, a.k.a. Tiāo Shān
  • Wade-Giles Romanization: Hsuan-Shan, a.k.a. T'iao-Shan
History
Hsuan-Shan (悬山) is a type of rooftop commonly used in traditional civil buildings in China. It's been developed since the Song Dynasty (about 10th Century A.D.), then spread to Korea (named as 맞배 지붕, or matbae jibung) and to Japan (named as 切妻造, きりづまづくり, or Kirizuma-Zukuri).
The design is widely used in southern China because it's rainproof.
Social Status
Hsuan-Shan-Ting (悬山顶) is in a lower rank than other types of rooftop such as Wu-Tien-Ting(庑殿顶, Wǔ Diàn Dǐng) for royal palace and temples, and Hsieh-Shan-Ting(歇山顶, Xiē Shān Dǐng) for imperial officials. It is designated to be used by civil architectures for residents and low-ranked officials, one level higher than the lowest Ying-Shan-Ting (硬山顶) .
Picture
Ying-Shan(硬山)
The 4th one on the 1st row in the illustration (Fig. 1, below):
  • 硬山's Wikipeida page (Simplified Chinese)
  • 硬山's page in Baidu Encyclopedia (Simplified Chinese)
  • Simplified Chinese: 硬山
  • Traditional Chinese: 硬山
  • Chinese Pinyin: Yìng Shān
  • Wade-Giles Romanization: Ying-Shan
History
Ying-Shan (硬山) is the most common type of rooftop in traditional Chinese architecture. It it widely seen in civil buildings after the Ming Dynasty (about 14th Century A.D.).
It is mostly used in northern China because the rooftop's design is more reliable in preventing fire.
Social Status
Ying-Shan-Ting (硬山顶) is in the lowest rank of architecture rules, which could only be used by civil residents.
Picture
(Fig. 1) Scanned from Page 9 of Chinese Ancient Architecture Decoration (Simplified Chinese) by Lou Qingxi, Published by Tsinghua University, 2011 (扫描自:第9页,《中国古代建筑装饰五书》,楼庆西 著,清华大学出版社,2011年)

Development History

Version 1.8

Improvement
  • Operation to rotate each single objects.
  • Vertical offset function to assist align components. 
Bug Fixed
  • Reset the randomness after click on the "Reset" button.
  • Temporary hidden the presets library buttons. Will keep working on it further.
Demo 2. Rooftop curve manipulation.
May 1st, 2013
Picture

Version 1.7

New Algorithm, Curve
  • Redesign the algorithm - Curve shape rooftop available now.
  • Rewrite the code for a more flexible control.
Improvement
  • UI improvement - New icons and new layout!
  • Solve the issue when rotation objects in relative space.
Picture
April 28th, 2013
Picture

Version 1.5

Bug fixed
  • Rotation operation won't perform without selecting at least one object when running under Maya for Linux. This problem doesn't occur on Mac OS X or Windows.
Working on
  • "Curve" shape of rooftop based on section.
April 24th, 2013
Picture
Scanned from Chinese Ancient Architecture Decoration (Simplified Chinese) by Lou Qingxi, Published by Tsinghua University, 2011 (扫描自:《中国古代建筑装饰五书》,楼庆西 著,清华大学出版社,2011年)

Version 1.4

Update
  • Interface improvement - icon added, preset added.
  • Major algorithm improvement - complete rewrite, now can adjust parameters and get feedback interactively.
The New Algorithm
By changing the Slider Group's flag from -changeCommand(-cc) to -dragCommand(-dc), the slider will provide interactive feedback to the scene. But it does not speed up the manipulation process at all.
So, instead of using the algorithm of repeatedly deleting and creating every objects in each procedure, the algorithm is completely redesigned. The new solution is to create a "master" object then instant it several times in order to have the sufficient amount, then apply those "nondestructive" operations such as transformation, rotation and randomization in a separated procedure.
By doing so, the refreshing speed increased significantly, even when a large number of objects are involved.
April 21st, 2013
Picture

Version 1.3

Update
  • Interface improvement - more tool helps using helpLine command.
  • Revised algorithm - now geometry rotation and scaling is faster.
More research considering the topic about traditional Chinese architecture. 
April 20st, 2013
Picture

Version 1.1

Picture
Update
  • Added a second tile object covering the seams. 
  • Can apply randomize control to the tiles, which results in more natural looks. 
  • More control over tile's shape and sizes.
Next step...
  • More detail to the rooftop.
  • More "Authentic" looking of the tiles.
  • "Imperfect", the more perfect, new and clean it looks, the more fake it feels.
  • Curved shape.
April 16th, 2013
Picture

Version 1.0

Picture
April 14th, 2013
Picture
Picture

Resources and References

MEL Programming References
  • Maya MEL Commands Reference from Autodesk
  • Maya Embedded Language on Wikipedia
  • A Very Brief Overview of Syntax of Mel on Prof. Deborah R. Fowler's Website
  • GUI Layouts in MEL
  • Sample Portfolios of VSFX 705 Programming Concept
  • Prof. Malcolm Kesson's Website.
Others
  • Icons in the user's interface were designed by me, and created using SketchUp and Adobe Photoshop.
Reference Books
  • Chinese Ancient Architecture Decoration (Simplified Chinese) by Lou Qingxi, Published by Tsinghua University, 2011 (《中国古代建筑装饰五书》,楼庆西 著,清华大学出版社,2011年)
Picture
Picture
www.ziyeliu.com
Digital Art, 3D, Photography
©Ziye Liu, 2011 - 2023, All Rights Reserved