Giter Club home page Giter Club logo

citygen's Introduction

CityGen Maya Script

CityGen is a procedural cityscape generator for Maya written in python. This can be done through either procedurally created buildings, or with user-supplied buildings. 

Using CityGen

First, install the CityGen script by copying the cityGen.py file to your scripts folder.
In Mac OS X, this is located at /Users/[username]/Library/Preferences/autodesk/maya/scripts
In Windows, this is located at c:/Users/[username]/Documents/maya/2013-x64/scripts/

Note: Depending on your OS and Maya version, these paths may differ

2.   Once you've installed the script, open up the script editor
3.   Copy and paste the following code into the editor. Once you've done that, highlight the code and drag and drop it onto your custom shelf to add it to your shelf.


import maya.cmds as cmds
import cityGen as cg
reload(cg)
cg.UI()


4.   Press the newly created button to run the GUI.
5.   Below are the options available to you in the GUI
City Width: The width of the city
City depth: The depth of the city
Maximum Building Height: when using the procedural buildings, this controls how tall they can be
Building Gap: The space between buildings
Street Width: How wide the streets are
Block Size: The width of a city block, or the distance between streets

6.   Procedural Buildings vs. User Created
If you'd like to have the script create a set of sample buildings for you, simply run the script without anything being selected
To have the script replicate buildings that you've created, first group the buildings so they're under a single group node. Select the group node, and then press the generate button

Note: Be careful when using user generated buildings. If your buildings have a high polycount and you're creating a large city, you could run into memory issues.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.