TB2 - Week 1
This week I made the first steps towards making the city generator within Maya using Python.
First I planned out which 5 features I would be trying to add to the window that the user can then use to spawn objects, create animations or generally construct and populate the city.
First I decided on the 3 basic features the user can interact with. These consisted of Buildings, Roads and Cars. My initial plan is too allow the user to pick the number and length of the roads as well as the height, number and density of the buildings that will run along side them. Then I would implement the ability to spawn cars along the road, and possibly giving the user control over the number and density of the cars within the city, allowing them to make the city seem as dense or as spread out as they would like.
I spent my first class on this project re-acclimating to python after the holidays and began the script by adding a window that the user can interact with. This will be the foundation of which all the other features are built on top of.
Window Code:
Next I added the function "Create_Building", this would be called upon when the user clicked the "Create_Building" button. I also added an Integer Field in the piece of window code that will allow the user to type the amount of buildings they would like within the scene:
B_Number = cmds.intField()
After struggling to add a piece of code that would disperse the buildings across the scene using a random number generator, I moved on to use the basic function I used for the buildings to add roads:
This is what the user currently sees when using the window.
Next I plan to disperse the buildings and roads, and add the ability to create cars.
My Blog
Reading Time
Status | In development |
Category | Tool |
Author | up2122682 |
More posts
- TB2 - Week 10Mar 27, 2023
- TB2 - Week 9Mar 27, 2023
- TB2 - Week 8Mar 27, 2023
- TB2 - Week 7Mar 14, 2023
- TB2 - Week 6Feb 27, 2023
- TB2 - Week 5Feb 27, 2023
- TB2 - Week 4Feb 14, 2023
- TB2 - Week 3Feb 06, 2023
- TB2 - Week 2Jan 30, 2023
Leave a comment
Log in with itch.io to leave a comment.