Image Image Image Image Image
Scroll to Top

To Top

Autodesk Maya

27

Jan
2012

15 Comments

In Autodesk Maya
MEL

By Anthony

Autodesk Maya “City Builder”

On 27, Jan 2012 | 15 Comments | In Autodesk Maya, MEL | By Anthony

City Render

I was organizing directories on my computer and ran across what could be of some use to others: a Maya MEL script for procedurally creating a downtown cityscape.

Download the MEL script

It is pretty straightforward to use (GUI-wise) so I’ll just briefly go over how to set up the script.

1. First you must open the MEL script, select-all, then copy.
2. Open up Maya 2011 or 2012 (not sure if the script will work on lower versions) and open the script window by pressing the little square button at the far right-bottom.
Maya Script Button Reveal

3. Paste the scriptcode into the script box then press the run button

Maya Run Script Button Reveal

4. Now a GUI should pop up and you can start creating your own city!
5. Watch the following video for instructions as to how the city-builder works.

NOTES: This was a only meant to be a quick way to create a cityscape; so if you want more advanced materials or textures you will have to add them yourself. Please feel free to play with and modify the script as you like! As a heads up, though, I have the city objects layers locked so they aren’t selected when selecting the plane to create buildings.

Comments

  1. i love this script it is amazing

  2. You are a life savior. Thank you so much. Cheers!

    • Anthony

      No problem! Glad you can find it useful.

  3. # Error: SyntaxError: invalid syntax
    🙁

    • Anthony

      This is likely because you copy and pasted it into the Python tab. Make sure to paste it into the MEL tab of the editor/console. Otherwise I am not sure as it seems to work for me.

  4. hi im very new to maya and have enjoyed your script very much. could you tell me how I unlock the building layer so I can edit materials and textures please?

    • Anthony

      Hi Kevin,

      Open up the layers panel at the bottom of the channel box and beside each layer you should see two checkboxes. One is to toggle the visibility of the layer; and the other can toggle between locking states. Just keep clicking on the second box until it is blank. To learn more about Maya layers you can try here: http://3d.about.com/od/Creating-3D-The-CG-Pipeline/ss/Maya-Lesson-2-4-Scene-Organization_3.htm . Good luck!

      • Thanks very much……now to export this beast to cryengine 3 🙂

    • It’s great to read something that’s both enjoyable and provides prgmaatisdc solutions.

  5. I have the question the scrip is great and I like the textures on the building, but how to do you add textures to the windows. I am doing it individually which takes allot of time, is are their layer that specific to window or is it in the outliner.

    Thanks

    • Anthony

      Hi Tony, sorry this script was created as simply a modelling exercise. There is no easier way to texture that I am aware of.

  6. Nice bro . keep it up .

  7. awesome bro .. very help .. thank u so muchhhhh

  8. thank you so much ..it awesome script
    yaa its worked good.

  9. Great script Anthony! works fine on maya 2013 64bit

Submit a Comment