Wednesday, 12 February 2014

Python Scripting - Columns Rotation

The rotation of the columns was a problem initially but I managed to fix the problem with teacher's help. :) The equation was the main problem. :/ Instead of using math.pi inside the move axis, I have to use math.cos and math.sin for aX and aZ respectively. The spacing or gap is to control the space from the pivot(0,0,0) which is the center. (2 math.pi)/10 simply represents 360 degree divided by the number of columns. I have also did the same thing to the torus.

Columns Rotation Solution

Main Structure with columns rotation

And finally! The columns are rotating around the structure. ^^

Python Scripting - Main Structure

When I first started out, maya scripting was quite tough to understand. For this assignment, I have chosen to do the Leaning Tower of Pisa. The first thing I did was to do the basic main structure for the tower which is made up of cylinders.
Main Structure Script

Making cylinders were kind of tough at first but it was fun during the process. As you can see from the picture above, I have broken down the script into 3 functions. The first function makes the middle and the top cylinders, the second scripts the base platform at the bottom and the last makes the columns. The base platform was rather hard to get it work at first but I managed to do it. I have added "index += 1", gap and height so that the steps inclines upwards in the Y-axis individually. To make the shape of the base platform stand out, I have added "index*10" in both the X and Z axis(scale) so the steps decrease in size.

Making columns and creating a master function

In order to make the whole script run, I needed to add another function called "myCreation". Under myCreation, I have added the above functions. However, I had a problem with the columns and needed to change the equation. I wanted to make an equation to allow the number of columns I want to rotate around the the main structure of the tower. So the equation simply didn't work out.

Tuesday, 7 January 2014

Maya Scripting: Settling with a final idea.

Leaning Tower of Pisa

You've guessed it right. :D I have decided to deal with The Leaning Tower of Pisa for my scripting. The reason I chose the Leaning Tower of Pisa is it has a repetitive pattern and a nice structure. 

Leaning Tower of Pisa Modelling

Modelling

I went online to search for examples of Leaning Tower of Pisa models and other people did actually manage to complete the modelling for it. *Amazed*

In conclusion, I feel that it will be a challenge for me to make a model for Leaning Tower of Pisa. However, I will persevere to complete my model. :D