Python Studies 03: Matrix

Table of Contents


  • Write a python script that will place an interesting 3D group of surfaces in a Maya scene.
  • The python script(s) will implement one or more procedures. Each procedure will be responsible for generating part of the matrix.
  • The procedures MUST accept inputs so that the position and/or scale and/or orientation of the surfaces they create can be controlled.
  • The main point to consider is that the matrix should present an interesting configuration of shapes. Aesthetics are far more important than complexity, therefore, pay particular attention: collecting photographs of inspirational images, the principles of 3D composition, 2D composition, shading, and lighting.
  • Finally, rendered all images using Pixar’s RenderMan for Maya.


Inspired by the proceduralism and the theme of repetition of Tendril Studio and Velvet Spectrum‘s splash screen designs for Maxon Cinema 4D.

Matrix Renders

Here are the results of using Python to procedurally create surfaces distributed in space to form an interesting 3D composition. Unintentionally, I was able to combine the two sets of references into something novel: a glorious and marvelous flower design.

User Interface Research

For this project, I  was highly inspired by the UI design by Joseph Chen’s Neuron Generator. Below is what I noticed that was stellar about his whole project:

  • Website: Clean, minimal, and succinct presentation and documentation.
  • UI is neat with attention to details such as aligning Slider labels to the right,  and adding dividers between controls to increase readability.
  • Scripts: Listing of his contact information, name convention: neuron_gen, neuron_utils, QModule, run, and information tab to explain how his script works with buttons to bring users to his other projects.
UI Breakdown of Joseph Chen's Neuron Generator

User Interface Overview

Some enhancements to the user experience was 

  • On hitting the Delete button, Maya will automatically select the source object used for Generation process to help users speed up the iterative design process.

How to install

  1. Download

  2. Unzip and put the folder under your Maya script folder

    • Windows: C:/ user/username/Document/Maya/scripts

    • Macintosh: Users/username/Documents/Maya/scripts 

  3. Open the Script Editor in Maya and switch to the Python tab.

  4. Drag and drop the file into the bottom panel. OR use the code below to run Mandala Generator.

  5. Select Command > Execute

  6. You could also highlight the script and drag it to the custom shelf. 

import sys
import mandala_gen
dialog = mandala_gen.main()

#if reloaded needed, uncomment the code below



When I first began this Programming class for Visual Effects, I had cold feet and was intimidated by the fact that I might not be able to keep up with the course. I was not very comfortable and confident in Autodesk Maya despite learning it a decade ago, and also the fact that I had no knowledge of how to use Renderman compared to my classmates who were in the VSFX program. As a lone MOME student in this course, I wondered if I can keep up with my classmates. However, I realized that things were not as bad as I imagined. Python is relatively easy compared to Javascript, and Maya is really easy to operate if you just read the Script Editor for troubleshooting and debugging. As the Professor mentioned in the first class, you just need practice to get better. Indeed he was right, as the course progresses, so did my proficiency in programming. 

In the final analysis, I learned a lot from this project and these past 7 weeks. I look forward to implementing these programming concepts in Cinema 4D and in my career.