Maya Python Script - City Generator

This project was done a while ago. Its learning goal was to create a Python tool in Maya that allows an artist to easily generate different landscapes.

This project was done a while ago. Its learning goal was to create a Python tool in Maya that allows an artist to easily generate different landscapes.

I have done an initial concept for the UX in Figma to understand how the artist might use it.

I have done an initial concept for the UX in Figma to understand how the artist might use it.

For the road generation, I have used curve projection and extruded an edge along the curve.

For the road generation, I have used curve projection and extruded an edge along the curve.

For buildings distribution, a dummy locator was used and a random building is selected from a list provided by the user.

For buildings distribution, a dummy locator was used and a random building is selected from a list provided by the user.

I have tried to expose as many parameters as possible to the artist.

I have tried to expose as many parameters as possible to the artist.

For material assignment, I wanted user to be able to create a new material and assign it right from the tool UI.

For material assignment, I wanted user to be able to create a new material and assign it right from the tool UI.

There are multiple ways to expand on this project, such as adding road intersections and maybe making the tool more real-time in Maya by using MASH, as I did on one of my previous projects.

There are multiple ways to expand on this project, such as adding road intersections and maybe making the tool more real-time in Maya by using MASH, as I did on one of my previous projects.

This video shows how the city generator works. Some items were fixed in later iterations, such as building orientation along the road.

Maya Python Script - City Generator

This project was done a while ago. Its learning goal was to create a Python tool in Maya that allows an artist to easily generate different landscapes. Artist would provide a terrain geometry, a curve for the road, and buildings geometry.
Another goal for this project was to dive deeper into Python in Maya and learn about procedural generation.

During planning phase I have created a list of features that would be needed. Because this was a short-term project I decided to limit the scope of it. I broke down the problem into 4 separate pieces: generation of the road, building distribution, material assignment, and lighting setup. This guided how I split up the UI into tabs.

After scoping, I have done an initial concept for the UX in Figma to understand how the artist might use it.

I have done some initial prototyping to see what is possible in Maya and how to approach the city generation. This also adjusted some of my expectations for the UX.

For the road generation, I have used curve projection and extruded an edge along the curve. This allowed me to create clean repeated UVs. I have decided to extend the scope here and also included an ability to generate a river. The later also adjusts the terrain. Several checks were added to make sure the user knows which input to select.

For buildings distribution, a dummy locator was used and a random building is selected from a list provided by the user. I have tried to expose as many parameters as possible to the artist.

For material assignment, I wanted user to be able to create a new material and assign it right from the tool UI. When user created a material, it would be added into drop down list and it would be possible to assign it to selection. I have also included an ability to pan the material to support the river.

If this project was done now, I would have probably done it with Houdini.
There were several issues with generation as well, such as the road that was floating above the terrain a bit - ideally we would want it to be integrated into the terrain.

There are multiple ways to expand on this project, such as adding road intersections and maybe making the tool more real-time in Maya by using MASH, as I did on one of my previous projects.