Home User Guide Functions Gallery Free Trial Purchase Contact 3D Models Textures Links

MetroModeler User Guide

Overview



MetroModeler is a program for creating 3D models of urban structures and urban scenes. You can use it to create 3D models of houses, buildings, streets, and cities. Since it is designed solely for this purpose, you may find it is much easier to create such models using MetroModeler than by using a general-purpose 3D program designed to create any type of 3D models.

MetroModeler creates its output in the commonly used Wavefront .obj format that can be read by many other 3D modeling and rendering programs such as Bryce 5.5. You can therefore use the models created in MetroModeler for such applications as ray tracing, video gaming, virtual reality, animation, motion picture or television special effects, etc, by importing your output .obj file into some other program such as 3D Studio Max that is used for these purposes.

To create 3D models in MetroModeler, you need to create a MetroModeler script, which is just an ASCII file (with an extension of .mms) that uses one or more of the 200 built-in MetroModeler functions.

There are 2 ways to make such a script: (1) Manually create the script yourself by repeatedly pressing the Insert Function Call button, and filling in the form. (2) Have MetroModeler create the script automatically, by using the Random Building Generator utility (see the separate help topic on this utility).

The first of these 2 ways offers you absolute control, but the second way is much easier.

Manually creating the script yourself is not as hard as you might think. You do not need to learn any scripting language to create the scripts, and you do not need to have any knowledge of programming or programming ability. You can create a MetroModeler script by repeatedly using the Insert Function Call button, choosing one of more than 200 functions, and simply filling in the blanks in the form that appears after you have chosen your function. Graphical tools will help make it easy to fill in the form that appears after you have selected a function to use.

After you have added a function call, you can later change the function call by moving the edit cursor to the line that has the call, and pressing the Edit Current Line button. This will bring up the same dialog you used to add the function call, and will show what each part of the function call specifies, allowing you to easily make a change. You can also edit a function call (or add a new one) by typing directly into your script (although only experienced users will want to do that).

After you have created a script, you press the Create and Show .Obj File button to see the 3D model created by your script. When you press this button, your 3D model is saved in the Wavefront .obj format, which can be read by most major 3D packages.

There is a much easier way to create MetroModeler scripts: just press the Random Building Generator button. This utility includes a batch button that allows you to generate 100 or more MetroModeler scripts (and their corresponding Wavefront .obj files) automatically.

System Requirements

MetroModeler requires a PC using Windows XP, Windows ME, Windows 2000 or Windows Server 2003. The program does not run on Unix or the Macintosh. Windows 98 and Windows 95 are not supported.

If you merely want to generate 3D models of buildings without building 3D models of cities, you do not need to have a particularly large amount of memory on your computer (128 megs of RAM should be sufficient), nor do you need a fairly recent graphics card (you should be able to get by with a graphics card that is several years old).

If you want to create 3D models of cities, you will need at least 256 megabytes of memory. The larger the 3D city models you want to create, the more memory you will need. As a general rule of thumb, assume that you will need roughly one megabyte of memory for each city block in your 3D model. So if you want to create a virtual city of more than 250 city blocks, you should be using a PC with at least 512 megabytes of memory. If you want to create large 3D models of cities, it is also recommended that you have a high-quality graphics card on your PC, preferably something made in the last 2 or 3 years. A graphics card with only 64 megs of memory is sufficient to create smaller city models of only about 64 city blocks.



Installation

There are only 3 things you need to do in order to successfully use MetroModeler.

(1) Run the Setup program, which you can get by downloading the free trial, or purchasing the program. This will install MetroModeler on your computer.

(2) Obtain a program that can view 3D graphics files in the Wavefront/Alias .obj file format. You need a program that can display such a file when someone types a startup command such as

MyProgram.exe MyFile.obj


Unless you happen to have such a program already, your best bet is to go to www.ctrlview.exe, and download the excellent CtrlView program. You can get a free evaluation copy to use for 30 days for free, and a registered copy only costs $30.

(3) Enter MetroModeler, choose Options from the menu, and in the resulting dialog (under .Obj File Viewer) specify a path that leads to the .obj file viewerr mentioned in (2) above. If you installed the current version of CtrlView in the default directory, such a path would be:


c:\Program Files\CtrlView 3.20\CtrlView.exe


The path may be differerent if you are using some other program, or installed CtrlView in a different directory, or if CtrlView releases a new version using a default installation directory other than C:\Program Files\CtrllView 3.20.

If there is some problem with the entry specified in step (3) above, you will still be able to use MetroModeler to create .obj files, but when you press the "Create and Show .Obj File" button, you won't be able to see the newly created file. If this happens, adjust the .Obj File Reader entry in the Options dialog, making sure it specifies the correct location of CtrlView or some other program that will display .obj files when launched with a command such as:



MyProgram.exe MyFile.obj



Menu Choices

Below is some information on the main items that can be selected from the MetroModeler menus.


File / New -- Use this command to create a new blank script file for editing.
File / Open -- Use this command to open a previously created script file. Up to 5 files can be opened up at the same time.
File/ Save -- Use this command to save a script that you created. Please use an extension of .mms when saving your scripts (for example, MyFile.mms).
File/ Save As -- Use this command to save a script under a different name. Please use an extension of .mms when saving your scripts (for example, MyFile.mms).
File/ Convert -- Can be used to convert an .obj file (made in MetroModeler) into a VRML 1.0 or VRML 2.0 file.
File/ Close -- Use this command to close one of the files that is currently opened.
File/Recent Files -- This will show the last 5 files that you saved. Useful if you saved a file recently, but can't remember what you named it.
File/Exit -- Exits the program.
Edit/ Insert Function Call -- Does the same as pressing the Insert Function Call button.
Edit/ Edit Current Line -- Does the same as pressing the Edit Current Line button. It will bring up a dialog editing the current line (the one highlighted in blue).
Edit/ Cut -- Cuts a selected block of text from the currently displayed script file, and copies it to the clipboard. .
Edit/ Copy -- Copies a selected block of text from the currently displayed script file, and puts it on the clipboard. .
Edit/ Paste -- Pastes a block of text from the clipboard into the currently displayed file.
Edit/Find -- Searches for a string or phrase in the currently displayed file.
Edit/Find Next -- Searches for the next place that a string or phrase (selected with Edit/Find) is located in the currently displayed file.
Edit/Replace -- Can be used to replace all occurrences of a string or phrase in the currently displayed file. This menu command brings up a special dialog that makes it particularly easy to do search and replaces in a MetroModeler script file. For example, the string string field allows you to either type in any string, or choose a material from a list of all materials mentioned in the script. The replace field includes a lookup button allowing you to choose any material recognized by the system. So you can conveniently switch from one material to another without typing any text. If you are replacing one material with another, you will see images of both of the materials in this dialog.
Edit/Select All -- Selects all text in the currently displayed file.
Edit/Comment Out -- This command "comments out" a range of lines in the currently displayed file. Lines which are "commented out" will be ignored when you press the "Create and Show .Obj File" button to view your 3D model. You can use this command to "turn off" some of the code in your script. Code which has been "commented out" can easily be restored, by using either Edit/ Uncomment, or simply by removing the apostrophes at the beginning of each line.
Edit/Clear -- Removes all text from the currently displayed file.
Functions Menu -- This is a large, deeply layered menu allowing you to select almost all of the 200+ functions that can also be accessed through the Insert Function Call dialog. The functions are organized by type, which means that you might sometimes find it easier to find a function by using this menu, rather than by using the Insert Function Call dialog (which orders all the functions alphabetically, rather than by type).
Options -- This brings up a dialog allowing you to specify certain preferences that are saved from one program session to the next.
Miscellaneous/ List Objects -- This dialog displays a list of all objects that have been created directly or indirectly by your program. In some cases this may be many times longer than the number of object names mentioned in your script. (Creating a particular type of object named B1 may cause the creation of child objects named B1_Part1, B1_Part2, etc.)
Miscellaneous/ Organize Materials -- This brings up a dialog allowing you to organize the materials in your .MTL file (the one specified under Options) into different groups. The advantage of doing this is that if you have a large number of materials, it will be easier to find an appropriate material using the Select Material dialog (which allows you to filter by any material groups you have created). Ignore this dialog if you are just starting to use the program.
Miscellaneous/Random City Generator -- This brings up an advanced tool that should be used only by experienced MetroModeler users. See the separate help topic on this dialog.
Miscellaneous/Random Building Generator -- This brings up a powerful utility for automatically generating 3D models of buildings. See the separate help topic on this dialog.
Miscellaneous/Open ReviewList.txt -- This brings up a text file called ReviewList.txt. After you generate buildings with the Random Building Generator, you can review your output in a slideshow dialog that includes a button allowing you to save the name of the currently displayed building to this ReviewList.txt text file. By using that button and using this menu command, you can accumulate and view a list of buildings that you want to review or modify later, without having to write down any of their names.
Help Menu -- This menu allows you to access all the same help information contained in the online User Guide at www.metromodeler.com.



The main MetroModeler screen. There is no toolbox as you typically see in 3D modeling programs, because MetroModeler is centered around the idea of automatically generating 3D models rather than manually assembling them piece by piece with your mouse. This approach makes it far easier to create highly complex 3D models such as models of streets or cities, which can be torture to create with any program centered around mouse manipulations.

Inserting or Editing a Function Call

The Insert Function Call dialog and the Edit Function Call dialog are basically the same dialog, allowing you to either insert a new function call into your script, or edit an existing function call.

If you pressed Insert Function Call to get this dialog, start by choosing one of the functions by using the Function Name dropdown at the top. As soon as you make a selection, the contents of the dialog will change, giving you a form that lists all of the inputs (called arguments) that can be used with the function you have chosen.

You then need to fill in the form and press the OK button to insert the new function call into your script. This is usually much easier than it may at first look, for several reasons: (1) Many of the input fields will have a dropdown control (the down arrow ) next to them, allowing you to simply choose an item from the list rather than typing in something. (2) You can get help on any field on the form by hovering the mouse over the field, and waiting for the yellow Tool Tip to appear. (3) You can see an example of inputs for all of the fields by clicking on the Example radio button. If you are completely "lost," you can just press the Paste Example and Close button to insert the example into your script (which you can then later fine-tune by pressing the Edit Current Line button). (4) If you don't type in anything for the sName argument when creating a new object, the program will assign a name for you.

If you used the Edit Current Line button to bring up this dialog, the dialog will come up with all of your original inputs displayed. This makes it extremely easy to change the function call (even easier than if you had Intellisense). The Edit Current Line button is so convenient that you will probably rarely find yourself manually editing a line in your script, although it is still possible to do it that way.


The Insert Function Call/Edit Function Call dialog is really 200 dialogs in one, because the controls on it change whenever you change the function name using the dropdown at top.




This dialog allows you to choose from over 500 materials, which you can organize into different groups. You can add new materials, so that they can be selected from here.

The Random Building Generator

The Random Building Generator dialog is an extremely powerful utility that lets you create 3D models of buildings just by pressing a button, and waiting for the model to be automatically generated. You can even use utility to work in batch mode, so that hundreds or thousands of 3D models are created while you are eating dinner or sleeping.

Setting up Lists of Materials

The Random Building Generator utility works off of lists of materials that you set up by pressing the Materials button on the dialog, and going to the Choose Materials for Random Building Generator dialog. That dialog allows you to assign materials to more than 15 categories of materials, such as materials that show a row of windows, materials that show a door or entrance area, etc. You can get started immediately, because MetroModeler will fill in this dialog's slots using information stored in your MetroModeler.ini file, which (after a fresh install) already has these categories already set up with various materials that come with MetroModeler. The Random Building Generator repeatedly makes random selections from these lists of materials, choosing from whatever list is most appropriate. For example, if the utility wants to fill in an area that is supposed to be a row of windows, it makes a random choice from the "Type 5" list of materials (which is identified in the program as a list that should have only rows of windows).

You are strongly encouraged to add new materials to the lists of materials that you see in the Choose Materials for Random Building Generator dialog. The more materials that you add, the more diversity you will see in the buildings created by the Random Building Generator dialog, and the more powerful this utility will become. You are encouraged to acqure new .jpg files for use as MetroModeler materials, to add them to the MetroModeler.mtl file, and then to add your new materials to the lists of materials that you see in the Choose Materials for Random Building Generator dialog. See the "Extending MetroModeler" help topic for information on how to do this (it is usually very easy).

The Dialog's Number Fields, Checkboxes, and Main Buttons

The Random Building Generator dialog has 6 numerical input slots: Min Width, Max Width, Min Depth, Max Depth, Min Height, and Max Height. These give general guidelines to the program for the dimensions of the buildings to create (the units used are feet, which is about one third of a meter). For example, if you type 20 as the MinWidth and 200 as the MaxWidth, then the width of a randomly generated building will normally be between 20 and 200. (These inputs are ignored when houses are generated, since houses normally have a much smaller scale than large buildings.) You might want to change these Min and Max settings, depending on the type of buidings you want to create. For example, buildings intended to be used in a "Year 2250" science fiction project might use a Max Height much higher than the Max Width, which would tend to result in more futuristic "Jetson-style" buildings. Conversely, buildings intended to be used in a "Year 1850" project might use a relatively small "Max Height," which would avoid the very tall buildings that were not seen before the year 1900.

The checkboxes on the Random Building Generator dialog allow you to control what types of buildings are generated. Leave them all checked (or press the Default Settings button) to get the most diverse output from the utility, so that you will see a great variety of different types of buildings. Or, if you want only to generate certain types of output, press the Uncheck All button, and then check off only a few checkboxes.

See the FAQ for an explanation of the Bottom Plane dropdown (which normally is not used).

Press the Make Random Building button to create and view a randomly generated building. This will create a MetroModeler script that is shown on the dialog, and will display the resulting 3D model. If you like the 3D model that results, press Save to save the script. If you don't save the script, it will be overwritten the next time you press Random Building Generator again.

If you have CtrlView set up as your .obj file viewer, you can close out of that program by pressing Alt-F4. So you will need just 2 keystrokes between the creation of each random building -- an Enter key to click the Make Random Buidling button, and an Alt-F4 to close out of the viewer that shows the building. (The Batch mode discussed below requires even fewer keystrokes.)

Batch Mode

If you press the Batch button, you will get a Random Building Generator -- Batch Options dialog, which allows you to set things up so that you can generate hundreds of 3D models without touching your computer .

To use the Random Building Generator -- Batch Options dialog, you specity how many 3D models you want to make. You can also specify a maximum amount of disk space that you want to use for this purpose. The program will keep making 3D models until either of these limits are reached, whichever comes first.

The randomly created 3D models will have names such as BatchRand1.obj, BatchRand2.obj, etc. The corresponding MetroModeler script files will have names such as BatchRand1.mms, BatchRand2.mms, etc.

The "Create a .jpg file for each .obj file" checkbox is very useful if you want to run a slideshow examining all the models created during a batch run. This is a great way to examine a large number of 3D models in a way that only requires one keystroke per 3D model. Each .jpg file created in a batch run will use a convenient "isometric" viewpoint (basically an ideal perspective, with usually makes rotation unnecessary).

If you choose this option, when your batch run is done you will be prompted for whether you want to see a slideshow of the output results. If you choose Yes, you will then a slideshow of each 3D model created in your batch run. You can press the Enter key (or Next button) to move from one image to the next. If you see an image you like while watching this slideshow, you can press an Add to City button to add the corresponding script to the pool of scripts being used by one of cities you can organize with the Random City Generator utility. You can also press a button that causes the script name to be added to a ReviewList.txt text file that you can later look at if you want to fine-tune the script. Or you can press a "Make Variations Of This Building Now" button to start making variations of the displayed 3D model .Iif you press this button, the current slideshow will end, and you will be able to see a new slideshow showing these variations.

The Random Building Generator - Batch Options dialog includes a "Make Only Variations of One Script" checkbox that allows you to make variations of the 3D model made by a single script. It also includes a "Make Only Variations Of These Scripts" checkbox that allows you to make only variations in the 3D models made by a pool of scripts that you can specify. The list of scripts in this pool will be saved from one program session to the next. By adding scripts to this pool, you can extend the functionality of the Random Building Generator. Each time you add a script to this pool, it is as if you were adding some new functionality to the Random Building Generator. The "Add from File" button next to the "Make Only Variations of These Scripts" list allows you to add multiple files in that list all at once. You supply the name of any file listing MetroModeler script files (.MMS files) -- either a .BFD file created with the Random City Generator, or an ASCII text file listing multiple .MMS files (with one file listed on each line). You can also add to this "Make Only Variations Of These Scripts" list by pressing the "Add to 'Make Only Variations Of These Scripts' " button while watching the slideshow you can review after doing a batch run, which will cause the currently displayed model to be added to this list.



Tweaking the Appearance of a Building

In many cases the Random Building Generator will make a building that will look close to what you want, but not exactly what you want. In such a case, you should just press the Save button to save the script (or write down the name of the script, if you are used the Batch button to generate it). Then go back to the main MetroModeler screen, and choose File/Open to load the script you saved. Then try tweaking the script to fix whatever you thought wasn't quite right (as you can do by pressing the Edit Current Line button). Often a simple change from one material to another will make a big difference. In many other cases a simple change of a dimension (width, height, or depth) will make a big improvement. If you choose Edit/ Replace from the menu (or press Ctrl-H) you will get a special search and replace dialog allowing you to easily mass replace one material in your script with another material, without having to type in the names of either (you will even see both the search material and the replacement material in a preview).

There is also a lazy man's way of fixing a randomly generated script that isn't quite the way you want it. Press the Random Building Generator button, and then press Batch to get the Random Building Generator -- Batch Options dialog. Check the "Make Only Variations Of One Script" checkbox, and type in the name of the script you want to make variations of. The program will then make a whole series of variations of this one script (as many as you want). You can view these in a slideshow using the technique described above, and jot down the file name of the one that you like the most.

Important note : any script that you want to save should not be left with a name beginning with "BatchRand," or it will be overwritten in later batch runs. If you want to save a 3D model created through a batch run, you can load the corresponding .mms file (for example BatchRand13.mms) from the main MetroModeler screen, and use File/Save As to save it under a name that does not begin with BatchRand. Or you can simply use a DOS command such as:

rename BatchRand13.mms MyGoodScript.mms

When you try to add a script to a city, there is a convenient "Auto-rename" checkbox you can check off to change the name of a script beginning with "BatchRand." If you check that checkbox, you don't need to use File/Save or the DOS rename command to change the script name.


This dialog allows you to control what type of building models you automatically generate.




This dialog allows you to automatically generate an unlimited number of buildings, which may or may not be variations of a single building or a set of buildings.




This dialog allows you to see the results of a batch run of the Random Building Generator, and conveniently add a model to one of the virtual cities used with the Random City Generator.




This dialog allows you to customize materials used with the Random Building Generator. You can choose from over 400 materials that come with the program, or add you own materials based on your images. The more entries you add here, the more variety you will see in the randomly generated buildings.

The Random City Generator

The Random City Generator dialog is the most advanced part of MetroModeler, and should only be used ater you have got a little experience using MetoModeler. You can use this dialog to create very large and complicated .obj files that model large sections of a city. You can, for example, create a model that represents more than 300 city blocks, each block containing between 1 and 10 or more buildings. There is no limit on the variety of builidngs you can use in such a model. You can create a stunningly realistic model using more than 100 types of buildings (if you are willing to devote enough time to creating enough files to support such variety).

When you use the Random City Generator dialog, you do not choose the position of individual items on particular blocks. You instead create a list of MetroModeler script files (.mms files), each of which should typically model a particular building to be included in the city model. This list of scripts is a "pool" which the program will use to randomly populate the city blocks in your model. The larger the number of scripts that you supply, the more architectural variety there will be in the resulting model (which can be a "minature city" if you create enough city blocks). Each time the program handles a block, it will randomly select a file from your list of MetroModeler scripts, and use that to fill in all or part of the city block.

Before you can use this dialog effectively, you first need to create a few MetroModeler scripts. Create some scripts that each model a particular house or building that you want to appear in the array of city blocks created by this dialog. Do not use "#include" lines or "#use" lines in MetroModeler scripts that you intend to include in this dialog's list of scripts. The scripts must all have an extension of .mms (for example, MyScript.mms). The easiest way to create these scripts is to use the Random Building Generator dialog . Then when you bring up the Random City Generator dialog, press Add to add one of these scripts to the list of MetroModeler scripts. When you press the Add button you will get an Add MetroModeler Script File dialog that lets you control whether the building or buildings in your script file will occupy a full city block or only part of a block, and whether that building will appear once, rarely, commonly, or very commonly in the array of cityblocks that will be created. (See the separate help topic on this dialog.)

Once you have added a few scripts to the list, you can set some of the main inputs in this dialog, such as the City Blocks in Each Row and City Blocks In Each Column inputs. It is a good idea to start with numbers less than 12 for those inputs, and then try higher numbers later if necessary. The Average Width Per Block and Average Depth Per Block should be a reasonable number for a city block, in feet (about 1/3 of a meter). A number between 100 and 500 will work well, since city blocks tend to be about that many feet wide. The Sidewalk Depth Fraction is the ratio of the sidewalk's width to the width of the city block which the sidewalk is part of (.1 usually works well). The Road Depth Fraction is the ratio between the size of the road and the size of the adjacent city block (.15 or .2 work well for this value). The Row Height Multipliers field is normally left blank, but can be a comma-delimited string such as "3.2,3,2.7,2.5,2.3,2.1,1.9,1.8,1.5" which will cause rows in the back of your city to have higher heights than the rows in the front of your city model. The Base Option, Base Material, and Base Height options are also normally not used, but can be used if you want to make your city model rest on top of a hill or plateau.

To view the model of city blocks, press Create and View .Obj File. There will be a delay dependent on how many blocks you chose to create.

When you see the finished 3D model, you will probably notice (if you specified only a few scripts in your script list) that the same building is used many times. which makes your model look less realistic To make a more realistic model, you need to add more script to your list of scripts. If you use lots of scripts, someone looking at the completed model of city blocks might not even notice that some of the buildings appear more than once.

So to make your model of city blocks more and more realistic, you need to quit out of this dialog, go back to the main MetroModeler screen, create some more models of buildings, and save them as .mms files (MetroModeler scripts). Then go back to this dialog, and add the new scripts to your list of scripts.

To make such a process easier, the Random City Generator dialog allows you to save all its inputs in a file that you can retrieve later. The file will be given whatever name you type under City Name, with an extension of .bfd. So if you typed MyCity in the City Name field, and then press the Save button, all of your inputs for this dialog (including the list of scripts) will be saved in a file called MyCity.bfd. If you ever want to reload this file, you just go to this dialog and press the Load button.

For convenience, there is an Add from File button that allows you to add MetroModeler scripts from any ASCII file listing them. The file can be a text file that simply lists one .MMS file name on each line, or it can be a BFD file (see below for an explanation of that term). So, for example, if can create a .BFD file called City1, add some MetroModeler scripts to the list of scripts, and save the file. You could then close this dialog, s

How long this dialog takes to complete its work will depend on how large are the numbers typed in the City Blocks in Each Row and City Blocks in Each Column input.These 2 numbers multiplied together equal how many city blocks will be created. It will take the program between 3 and 10 seconds or more to create each city block. So if you type an input such as:


City Blocks in Each Row: 10 City Blocks in Each Column: 10


In this case 100 city blocks will be created, which may take 10 minutes or more. If you use larger numbers for these inputs, it will take still longer. Be patient. The result (if you use enough extension files) can be a spectacular, super-detailed 3D model well worth waiting for.

The effectiveness of this dialog will depend on how much time you are willing to spend creating the scripts that you add to the list of scripts. If you spend enough time to create a very large set of scripts, and use them in this dialog, when you see the final model of your city blocks you may see something more detailed and spectacular than any 3D model you have ever created.

When creating the scripts you use with this dialog, you can take advantage of this MetroModeler power feature: when you specify a material as a semicolon-delimited string (such as "dkgreen;shinyred;beige;silver"), the program will randomly select one material from the list. So suppose you create a script called Building1.mms which models a particular building, and you use a semi-colon delimited materials strings in that script. Then each time this dialog creates this building as part of the process of populating the city blocks, it will randomly choose one of the materials in your semi-colon delimited list. If you do this with lots of the scripts used with this dialog, the resulting 3D city model will look much more varied and realistic. It will be much harder for someone looking at the city blocks to recognize that some of the buildings have been reused in more than one place.

If you create a Wavefront .obj file with a very large array of city blocks, and you want to save an image of this model that displays it in the best way, you may to import the resulting Wavefront .obj file into something other than the CtrlView program. CtrlView (the recommended .obj file viewer for MetroModeler) works fine for small models, and will display even a very large model fairly well. But CtrlView doesn't seem to give you the "converging lines" effect very well when you are looking down a long street in a 3D model of a city. Other programs will handle this okay such as PoseRay and POV-Ray (both free or inexpensive). To get PoseRay, see http://user.txcyber.com/~sgalls/index.htm or Google for PoseRay. The POV-Ray product can be obtained from www.povray-org. Bryce 5.5 also can load cities created in MetroModeler.

The Random City Generator dialog includes these 2 buttons:

Vehicles : You can press this button to get a dialog allowing you to include 3D models of automobiles within your city model. You can choose to have 3D models of cars placed adjacent to sidewalks, or in the middle of streets, or in both of these locations. Using this dialog can be a great way to add additional realism to your 3D city model, since real cities almost invariably have some cars parked on the streets, and cars in the middle of streets. This dialog requires that you specify some MetroModeler scripts that model a vehicle. Cars will be randomly placed using the pool of vehicle scripts that you supply. It is easy to create such scripts from the main MetroModeler screen, by pressing Insert Function Call, and choosing Car1XAxis or Car1ZAxis. The more variety there is in your pool of vehicle scripts, the more realistic your city will look. For example, if you supply 10 different vehicle scripts, each of which use a different main color, you will then see a realistic scattering of colors in the vehicles that are produced in the 3D model (which will look a lot more realistic than all of the cars having the same color). Caution: even though the Car1XAxis and Car1ZAxis functions use only about 100 polygons each, if you use them in a very large city model, causing hundreds of car models to be created, it will significantly add to the memory and display time required for the city.

City Layout : This dialog is for use only by advanced users wanting additional control. You can press this button to get a dialog allowing you to specify a general layout that your city will have. This layout is kind of a high-altitude "bird's eye view" sketch of the city that will be generated. A layout may specify whether one or more rivers runs through the city, (and if so, where they are located, and where bridges across them are located). A layout may also specify that a body of water (which might be either a lake or a sea) lies on an edge of the city. A layout can also specify the location of a city square (such as Trafalgar Square or Tian' anmen Square), or a park within the city. To choose one of the layouts, just select an item from the Layout dropdown at the top of the City Layout dialog. You will then see a schematic depiction of the city layout. Use the Legend at the right to help you determine what each part of this depiction means.

If your layout includes a city square or a park, none of the buildings that you list in your main list of scripts will be created within these special areas. Instead the program will use a script that you can specify from this dialog (in the slots marked "Script Modeling City Square" and "Script Modeling City Park.") To create a script suitable for a park, you can add to MetroModeler.mtl a material that uses an aerial photograph of a park, and then apply that material to a Box object with a minimal height, for example: Box "B1", "MyParkMaterial", 0,0,0, 100, .05, 100

Or you can create a script that builds from a "grass carpet," and then add some trees using the Tree1 function. The "grass carpet" can be created with a line such as this:

Box "B1", "ForestGreen", 0,0,0,100, .05, 100

A script modeling a city square might begin with a line such as this to create a "concrete carpet" like the one at Tian'anmen Square:

Box "B1", "FlatWheat", 0,0,0,100, .05, 100

The script could then create one or more other buildings suitable for within a city square. You only need to create such scripts if you choose a layout that includes a city square or a park.

Under "Water Material" in the City Layout dialog, choose a material that will be used whenever your city layout specifies water areas.

If your city layout includes a Z Axis Bridge, you need to add at least one script to the list marked "Z Axis Bridge Scripts." If your city layout includes an X Axis Bridge, you need to add at least one script to the list marked "X Axis Bridge Scripts." It is easy to make such a script by using functions such as BridgeBottom1ZAxis, BridgeBottom2ZAxis, BridgeTop1ZAxis, and BridgeTop2ZAxis. Here is an example of such a script:

BridgeBottom2ZAxis "V1", "GreySteel", 5, 5, 5, 0, 0, 0, 140, 30, 30
BridgeTop2ZAxis "V2", "GreySteel", "FlatBlack", 2, 0, 30, 0, 140, 5, 30

The default city layout is one consisting of pure city blocks with no rivers, bridges, parks, or city squares. When you use this default (the first choice in the Layouts dropdown), you will not have to make any inputs in this City Layout dialog.

If you specified (under "City Blocks in Each Row" and "City Blocks in Each Column") a smaller number of blocks than the number of blocks shown in the City Layout dialog, you may not see all of the terrain features depicted in the City Layout you have chosen under this dialog.



What to Do if You Don't Like the Generated City

There are several things you can do if you are not satisfied with the output that results from the Random City Generator dialog::

(1) You can simply press the Create and View .Obj File button again. The next time a different groups of random selections will be made from your pool of MetroModeler scripts, and the result may be more to your liking.

(2) You can press on the City Layout dialog to change the general layout used in making the generated city. This can help to make a dull-looking city more interesting.

(3) You can change your inputs in the Random City Generator dialog (such as changing the number of city blocks in each row or column), or add more scripts to the pool of scripts that the random Random City Generator will use, or use the Edit button to change the parameters for particular scripts in your pool of scripts. Then you can press the Create and View .Obj File button again. The changes you made may cause the randomly generated city to be more to your liking.

(4) You can take the Wavefront .obj file that results from the Random City Generator, and load it into a 3D modeling program that allows you to mouse-select and edit parts of 3D models.

(5) You can try making changes in the MetroModeler script (the .MMS file ) created when you use the Random City Generator. You will be told the name of this file after you press Create and View .Obj FIle (it will have the same name as your .BFD file, except that the extension will be .MMS rather than .BFD). This script can be brought up in the main MetroModeler screen, and run from there (it is a good idea to uncheck "Stop on Error" if you do that). The script has comments such as "Row 1, Column 3" that can help you identify which parts of the script correspond to particular parts of your randomly generated city. For example, if you don't like a building that appears in Row 4, Column 3 of your randomly generated 3D model, you can look for "Row 4, Column 3" lines in the .MMS file, and comment out the lines that follow (by putting an apostrophe at the beginning), or change the lines. For example, a part of the script that looks like this:


'Row 3, Column 4
City1B60 1250,0,1100,150,<1>,150
'Row 3, Column 4
City1B58 1100,0,1250,150,<1>,150

could be changed to look like this:

'Row 3, Column 4
City1B70 1250,0,1100,150,<1>,150
'Row 3, Column 4
City1B72 1100,0,1250,150,<1>,150

The result would be that the next time you ran the script, instead of using the City1B60.mms script and the City1B58.mms to populate the city block in Row 3 and Column 4 of the city, the program would instead use the City1B70.mms and City1B72.mms scripts.

Changes like this are fairly easy to make. The numbers on these lines are: X starting position, Y starting position, Z starting position, width, height multiplier, and depth. Changing the height multiplier from <1> to <2>, for example, will make the building appear twice as high. You can safely change these height multipliers without any danger of messing up the tidy layout of the city blocks.

Adding to a City's Script Pool from the Random Bulding Generator

If you run the Random Building Generator in batch mode, after the 3D building models are created you will be prompted for whether you want to see a slideshow of the models that were generated. If you choose Yes, you will see a slideshow dialog that includes an Add to City button. Pressing this button is a convenient way of adding additional scripts to a pool of scripts used with the Random City Generator.

Removing Unwanted Buildings from a City

Pressing the Slide Show button is the most convenient way to review the buildings in your city's pool of MetroModeler scripts, and remove those you don't want. After you press this button you will see a slide show of each script in your city's pool of scripts, and you can press a Remove From This City button to remove any building you don't like.




The Random City Generator




This dialog allows you to pick a layout for the city that will be generated. A variety of layouts come with the program, and it is easy to create new layouts (as explained in the Extending MetroModeler section below).

Adding a Script File with the Random City Generator

The Add MetroModeler Script File dialog can be used to add a MetroModeler script to the list of MetroModeler scripts used with the Random City Generator.

In the Name of Script File slot, type the name of a file that you previously created, saved, and viewed from the main MetroModeler screen (or created using the Random Building Generator). The script should model something that you want to have appear one or more times in the model of city blocks that you are creating. The script should not include any "#use" lines or any "#include" lines. Initiallly, to keep things simple, the file should be a script that models just one building (although it is is possible to use scripts modeling more than one building). Under Frequency, type a number between 1 and 5. This number will control how commonly the building (or buildings) in your file will be used when the Advanced Tool for Modeling City Blocks creates the city blocks. If your file models some highly distinctive and uncommon building (for example, something like the Eiffel Tower or the Transamerica Bulding), you would normally type 1 to ensure that this distinctive structure is used just one time. If your file models some very common type of building that is seen (with minor variations) multple times in a typical large group of city blocks, you might type a higher number such as 3, 4, or 5.

Under "How much of city block to use with the items in this file," choose an item from the dropdown. Before making a selection, ask yourself, "How much of a city block is normally used by the type of building in my .file?" If your file models a big skyscraper or shopping center of a type that typically resides on its own city block, choose 100%, and a separate city block will be used each time such an object is created. If your file models a smaller building such as a house, select a smaller percentage such as 12.5%. Houses rarely take up a whole city block; one typically sees 6, 10, or more houses on a city block.

If your script creates a very large and intricate structure that you want to have occupy more than one city block, you can choose the 400% option (which will cause your structure to span 4 city blocks) or the 900% option (which will cause your structure to span 9 city blocks). Sometimes when it uses functions such as BuildingCore14 and GridInit and GridAdd, the Random Building Generator will create extremely intricate structures which are best used as multi-block structures. Using the 400% or 900% option with such scripts is a good choice. It is not a good idea to use the 400% or 900% option with low-polygon scripts that use a very simple geometry.

Under "Height variability," choose an item from the dropdown that will control how much variability there will be in the heights of the different buildings created from your file. (There is no need to use this dropdown if you have typed 1 under Frequency.) This variability helps to create more realistic looking city blocks (since real-life city blocks tend to be extremely variable in building size and the materials used).

For example, if your file creates a model with a total height of 50, and you choose "3 (Vary by 20%)" under "Height variability," then structures created from your file may have a height as high as 60 or a height as low as 40. Your choice here should depend partially on the type of structure in your file, and what materials it uses. Some materials and building types can be stretched or shrunk by 40% or 60% without any loss of realism; others cannot.

(You can get variability in the materials used when making use of your file if you use a semicolon-delimited material string (e.g. "Material1;Material2;Material3") when you specify a material in the file. Whenever MetroModeler encounters such a string, it randomly choose one of the materials in the string. )

The "Use only at end of row or column" checkbox is normally left unchecked. You can check it under this rare condition: you have used 1 for the Frequency, and your script contains a high-polygon model that you want to use only one time because it takes a lot of time to create it. You can then (when viewing the city blocks model) rotate your model so that the camera is in front of this high-polygon model, pointing at the center of the city blocks. The result can be an image showing a high-polygon model in the foreground, with less detailed objects in the background. This will look great, but won't take too long to render.

The "Auto-rename" checkbox should normally be checked when you are adding a script to the city's pool of scripts directly from the Random Building Generator. Checking this button will cause your script with a name such as BatchRand23 to be renamed to a name such as City12342, where the name consists of the city name plus a 5-digit randomly generated number. The advantage of this is that your script will not be overwritten the next time you do a batch run from the Random Building Generator (which may overwrite BatchRand23 if you chose to generate more than 23 3D models).






This dialog allows you to add buildings to the pool of buildings used by the Random City Generator. You can specify that any building will occupy 5%, 12%, 25%, 50%, 100%, 400% or 900% of a city block (if you use 400% or 900%, the building will span multiple city blocks).

The Outskirts Dialog

The Outskirts dialog allows you to specify outskirts or outlying areas which will be positioned to the left, right, front or back of the inner part of your city.

Use of the Outskirts dialog is purely optional when you are creating a 3D city. Do not use this dialog the first few times you want to make a 3D city with MetroModeler. Once you get some experience generating 3D cities with MetroModeler, you may want to try using the Outskirts dialog.

Creating a visualization of a large city puts a great performance burden on your computer. It helps to have a strategy for minimizing this performance burden. One such strategy is to put buildings with the most polygons in the foreground, and put buildings with relatively few polygons in the background. This way you don't waste processor time creating highly detailed buildings at a distance where no one will be able to see those details, because the buildings are too far away. The Outskirts dialog makes it easy for you to follow this strategy.

Here is an example of using this dialog in a way it was designed to be used: (1) On the Random City Generator dialog, you add scripts creating high-polygon buildings to the pool of scripts shown on that dialog (which is labeled Script Pool 1). (2) You then press the Outskirts dialog, and choose "OutskirtsLayout6" from the dropdown at the top of the dialog (or some other choice). (3) You use the Add button under the list marked Script Pool 2 to add some MetroModeler scripts to Script Pool 2, adding scripts that create buildings with fewer polygons than the scripts used in the main script pool on the Random City Generator dialog (which is labeled Script Pool 1). (4) You use the Add button under the list marked Script Pool 3 to add some MetroModeler scripts to Script Pool 3, adding scripts that create buildings with fewer polygons than the scripts added to Script Pool 2. (5) You then press the Create and View .Obj File from the Random City Generator dialog, to create your 3D model of a city.

You will then have a 3D city model with high polygon buildings in the center, medium-polygon buildings in a ring around that center, and low-polygon buildings in the outermost ring that surrounds the medium-polygon ring. When you view the 3D model in CtrlView or Bryce or some other program, you can position the camera near the high-polygon center. You then will get the "most bang for your buck." All of your high-polygon buildings will be near the camera, where the details can all be seen and appreciated. All the low polygon buildings will be in the distance, where no one is likely to notice the lack of detail in these buildings.

Here is another example of using the Outskirts dialog, which makes a more aggressive use of polygon minimization than the previous example: (1) You obtain some images showing aerial or satellite photographs of part of a city (such images can be obtained through various web sites). You add these images to the MetroModeler.mtl file, by using the "Add Materials to MetroModeler.mtl" menu command (under the Miscellaneous menu). (2) On the Random City Generator dialog, you add scripts creating medium-polygon buildings to the pool of scripts shown on that dialog (which is labeled Script Pool 1). (3) You then press the Outskirts dialog, and choose "OutskirtsLayout8" from the dropdown at the top of the dialog (or some other choice). (4) You use the Add button under the list marked Script Pool 2 to add some MetroModeler scripts to Script Pool 2, adding some low-polygon scripts that create buildings with fewer polygons than the scripts used in the main script pool on the Random City Generator dialog (which is labeled Script Pool 1). (5) You use the Add button under the list marked Material Pool 1. You add to this list some of the materials that you added in step 1. (6) You then press the Create and View .Obj File from the Random City Generator to create your 3D model of a city.

You will then have a 3D city model with medium polygon buildings in the center, low-polygon buildings in a ring around that center, and flat planes in the outermost ring that surrounds the low-polygon ring. When you view the 3D model in CtrlView or Bryce or some other program, you can position the camera near the medium-polygon center. All of your medium-polygon buildings will be near the camera. The flat planes containing aerial or satellite pictures of buildings will be in the distance, where the viewer may not be able to notice that they are just photographs rather than actual 3D models.

An approach such as that in the first example (offering more realism) may be more appropriate for something such as a book or magazine illustration, which the eye can linger at length on the details. An approach such as that in the second example may be more appropriate for something such as a motion picture or television image, where the viewer only sees the scene for a few seconds.

The "Choose CIty Block Patterns for Outskirts" button on the Outskirts dialog can be used to specify one or more pattern of city blocks that are used when an outskirts region is created. You simply check off one or more of the patterns that are displayed.


This dialog allows you to set up an arrangement involving multiple pools of scripts, which will make it easy to create very large city images using relatively little time and memory on your computer.




An example of a very large city automatically created after using the Outskirts dialog. The city was created in MetroModeler, and rendered with Bryce 5.5

The Options Dialog

The Options dialog allows you to specify preferences that are saved from one program session to the next.

An entry in the MTL File field is required, and must be a full path leading to a an .MTL file defining one or more materials. Google for ".MTL file" to find out about the format. An .MTL file is supplied with the program, but you can use another .MTL file if you prefer.

IMPORTANT NOTE : All scripts created with this program should be saved in the same directory as the .MTL file specified in the Options dialog (normally C:\MetroModeler).

An entry in the .Obj File Reader field is required, and must be a path leading to an .EXE that will display a Wavefront .obj file when you use a startup command such as



MyObjReader.exe MyObjFile.obj

One such program is CtrlView.exe, which can be downloaded from www.ctrlview.exe for a 30-day free evaluation, and only costs $30.

The Material Groups File field is optional. It can be the name of a simple text file which organizes your .MTL file into different groups, using a format such as:

[Group1]
Material1
Material2
[Group2]
Material3
Material4


If you use specify a Material Groups File, the Materials dialog will allow you to show only the materials in a particular group. This can make it easier to find the desired material if there are many materials listed in your .MTL file.

You can edit the Material Groups File using an editor such as Notepad, or you can use the Organize Materials dialog to edit the data in this file. \li360 Note : Some people using other programs sometimes follow a practice of creating a separate .MTL file for every .obj file they create, giving both the same name except for the extension. This practice is NOT recommended with MetroModeler. It will work better to use a single .MTL file with lots of materials (or a few such .MTL files), and to have a situation where you create multiple output (.obj ) files which all depend on the materials in a single.MTL file. This way it is easier to take advantage of certain features of MetroModeler such as its materials browser.

Frequently Asked Questions

Q. How can I rotate the 3D model that appears when I press the Create and View .OBJ File, and view the model in CtrlView?

Either of these methods will work (1) Press the Animated Rotation button in the middle of the CtrlView toolbar on the left, or (2) click on the output area with the mouse, hold down the left mouse buttton, and drag the mouse.


Q. How can I get MetroModeler output into 3D Studio Max?


3D Studio Max (release 8.0 and higher) can directly read any .obj file created by MetroModeler, including all of its textures. Here is how to import such a file using 3D Studio Max, release 9.0.

First use File/Import from the 3D Studio Max menu, and choose Wavefront Material (.MTL) as the file format. Choose MetroModeler.mtl in your MetroModeler directory (which is normally at c:\MetroModeler\MetroModeler.mtl). You will see a dialog offering 3 import options: Add to Scene, Add to Library, and Create New Library. Choose Add to Library if you want to be bothered with this step only one time (or Add to Scene if you don't mind repeating this step each time you import a MetroModeler .obj file).

Then choose File/Import again from the menu, and choose Wavefront Object (.OBJ) as the import type. Choose the MetroModeler .obj file you want to import. You will see a OBJ Importer dialog showing import options. In the bottom right corner, where it says "Material Library," type MetroModeler.mtl. Be sure to type that MetroModeler.mtl in the Material Library slot each time that you import a new MetroModeler file into 3D Studio Max. If you forget to type that phrase, the textures in your model will not be imported.

Note: do not try to save a MetroModeler .obj file by using File/Save As from the CtrlView program (which MetroModeler calls to display its output). There is no need for such a save, because MetroModeler has already created the .obj file. In fact, CtrlView does not preserve texture information when you try to save an .obj file, so you will actually make the file worse by saving it in CtrlView. An .obj file produced by MetroModeler will have the texture information.


Q. How can I get MetroModeler output into a video game I am creating?


You can do this if you have a game development engine that reads .obj files or Direct X files (.x files) or 3D Studio Max files (.3ds files). There are various game engines which can do this. If you need a Direct X or .3ds version of your MetroModeler output, use the $20 AccuTrans 3D utility to convert MetroModeler's output .obj files into .x files or .3DS files.

TrueVision 3D, one of the most popular game engines, has been used to successfully load MetroModeler 3D models (in DirectX's .x format) into a video game. Some example code for this is shown below:


Private MyVar As TVMesh
Set MyVar = Scene.CreateMeshBuilder
MyVar.LoadXFile "c:\MetroModeler\BatchRand22.x", True, False



If you are using the Torque game engine, you can use the obj2dts utility to convert MetroModeler output files into the .dts format used by Torque. For more information on this utility, go to this URL:

http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=7541


Q. The List Objects menu choice shows a list of all the objects created by my script. How can I see where a particular item in that list is in my 3D model?

You can do this by putting in your script a temporary SetAllMaterials line which sets the object to use some unique material not used anywhere else in your script. Then press the Create and View .OBJ File button to display your 3D model, and look for this material. For example, suppose the list of objects includes a "B1_Part7" object. You could put in a line like this:

SetAllMaterials "B1_Part7", "HotPink"

Then display your model, and look for the part that is pink. You will see exactly where this particular object is in your model.


Q. I want to import the .obj file created by MetroModeler into my favorite 3D program, but it doesn't read Wavefront .obj files. What should I do?

If your favorite 3D program does not directly read .obj files, try using the AccuTrans 3D program (www.micromouse.ca), which only costs $20, and has a free trial download. This program can convert the Wavefront .obj files made by MetroModeler to more than 20 differerent 3D formats, including 3D Studio Max, LightWave, Maya, POV-Ray, and lots of others. It has a batch mode which makes it easy to convert more than one file at a time. You can also use File/Convert from the MetroModeler menu, and convert your MetroModeler .obj file into a VRML 1.0 or VRML 2.0 file, which can be imported into some programs that won't read .obj files.


Q. Can I do animation with a 3D model created in MetroModeler?


You certainly can use a 3D model created in MetroModeler as the basis of an animation such as we commonly see on television, movies, and video games. Just take the Wavefront .obj file created by MetroModeler, and import it into any 3D package which supports animation and gives you control over camera paths. Then create your animation by moving the camera along a path. For example, if you have used MetroModeler to create a "virtual city" with various virtual streets containing models of buildings and houses, you could create a ground-level camera path simulating the motion of a car driving down one of the streets; or you can create a high-altitude camera path simulating the motion of an airplane flying over the city. Bryce 5.5 is an example of a program which supports animation, and can directly read the Waverfont .obj files created by MetroModeler.




Q. I'm trying to get the best possible output snapshot of my 3D model created in MetroModeler. What free or inexpensive Wavefront .obj file viewers can I use other than CtrlView?


Although it cannot be used as the default .obj file viewer in MetroModeler (because it will not display an .obj file from a startup command), you might want to check out the free or inexpensive PoseRay product. See http://user.txcyber.com/~sgalls/index.htm or Google for PoseRay. If you are willing to do the extra step of going into this program and manually loading a file created in MetroModeler, you can use this product for getting additional display options not available in CtrlView, such as advanced camera and lighting controls. This program seems to handle "converging lines" perspective particularly well (if you uncheck its "No perspective" checkbox). PoseRay works with the free POV-Ray product, an advanced renderer (its site is at www.povray.org). Once you have loaded your MetroModeler .obj file into PoseRay, you will be able to convert it into a POS-Ray file and take advantage of POS-Ray's advanced rendering options such as ray-tracing.

Bryce 5.5 (available for only about $100) loads the Wavefront .obj files created by MetroModeler, and offers many advanced rendering and modeling features. It is very strong in the creation of natural terrain such as mountains, water, and skies. It is an excellent choice is you want to create an image combining urban and natural features, such as a city on a hill.




Q. How can I get started loading MetroModeler files using Bryce 5.5?


The following is an example of how to do this: (1) Choose File / New Document from the Bryce menu. (2) From the Create menu, click on Ground Plane, and add this type of object. (3) From Bryce's File menu, choose Import Object. Choose Wavefront OBJ files (*.obj) from the dropdown. Select an .obj file created in MetroModeler. (4) If your building or city object seems to be too close to the camera, choose the second icon from the Edit menu, and choose 3D Transformations from the menu. Under Size, change the 3 slots with 100% to a smaller percentage such as 30% (There may be some other way to fix the "too close to the camera" problem, but this is at least one way to do it). (5) If you do not see the streets in your city model, select the city with your mouse, and use the mouse to raise the city's position upward until you see the streets. (6) Press Bryce's Render button, and you should be able to see your MetroModeler model okay.


Q. I am trying to create an urban scene showing a city at night. While the windows of an office building look fairly uniform during the day, at night an office building will usually have a wide variation in the appearance of its windows (with some floors being lighted, and other floors unlighted). How can I simulate this using MetroModeler?


This is a tough computer graphics problem that will take a little work.

First, create some variations of existing WindowRowXXX materials such as WindowRow1 (see the "Extending MetroModeler" topic for information on how to addi new materials). The variations should have the same number and size of windows, but variations in what appears inside the windows (for example, some looking dark, and others looking lighted). To avoid getting confused, it is a good idea to name the variations with letters at the end of their names. For example, if you make 3 variations of WindowRow1, you can name them WindowRow1A, WindowRow1B, and WindowRow1C; and if you make 2 variations of WindowRow2, you can name them WindowRow2A and WindowRow2B.



Then make some scripts with functions such as BuidingCore2, BuildingCore4, BuildingCore5, BuildingCore6, BuildingCore7, BuildingCore8, and BuildingCore9 (the Random Building Generator can generate lots of these). Modify the sWindowRowMaterial argument used with such scripts, making the string into a pipe-delimited string listing more than one material. The materials should all be variations of the same material. For example, you might change a string such as "WindowRow1" to be something like this:

WindowRow1A|WindowRow1B|WindowRow1C

So, for example, your original script might start out looking like this:

LargeBuildingCore5 "L1",10,"WindowRow1","br_grey",0,0,0,60,150,60

And you might change it to look like this:

LargeBuildingCore5 "L1",10,"WindowRow1A|WindowRow1B|WindowRow1C","br_grey",0,0,0,60,150,60

When functions such as LargeBuildingCore5 encounter your pipe-delimited list of materials, they will select a random item from the list of materials whenever they create a floor of your building. The result (if you have set up the variations adequately) can be a building suitable for a nighttime visualization, with a realistic appearance of some floors being lighted, and other floors being unlighted.


Q. How can I switch back and forth between different settings for the Random Building Generator dialog, without changing all the settings manually?




You might need to do this if you want to quickly switch from generating buildings for one chronological era (say, ancient Rome) to buildings of another chronological era (say, the near future). You can quickly switch back and forth between completely different settings for the Random Building Generator dialog by using the Configuration dropdown on the Random Building Generator. That dropdown shows "default" when the dialog starts, but you can switch it to one of 10 other configurations, which have names such as config1, config2, etc. Whatever settings you have chosen under a particular configuration are saved when you exit out of the Random Building Generator, and will be retrieved again automatically when you enter into the Random Building Generator again, and change the configuration to that particular configuration. So, for example, you could store settings for generating modern buildings under the "default" configuration; you could store settings for generating ancient buildings under the "config2" configuration; and you could store settings for generating futuristic buildings under a "config3" configuration. (There are text files with an extension of .rbc that correspond to each of these configurations, so a DOS command such as "copy default.rbc config2.rbc" can be used to copy one configuration to another. )




Q. With the Random City Generator, how can I make a building span multiple city blocks?


From the Add MetroModeler Script File (.MMS File) dialog, go to the "How much of city block to use with the item(s) in this file" dropdown, and choose either 400% (which will cause your building to span 4 city blocks), or 900% (which will cause your building to span 9 city blocks). You can also use this setting for a script that contains multiple buildings such as a building complex. You might want to use this 400% choice or the 900% choice if the building or buildings in your script use a complicated geometry that is best shown off in a larger area, rather than squeezing it into a single city block. This is often a good choice for scripts that the Random Building Generator creates using the BuidingCore14 functions and the GridAdd and GridInit functions.

If you want for the building to span a larger number of blocks, you can use the City Layout button on the Random City Generator, and select a City Layout that includes a City Square. In the "Script Modeling City Square" input slot, type the name of a MetroModeler script with the building or group of buildings you want to span multiple blocks. This functionality was designed to handle some type of largely open square such as Trafalgar Square, but you can use any type of geometry with it.


Q. What workflow is recommended for making lots of high-quality 3D models?


Here is a 2-phase workflow which works very well: (1) Go to the Random Building Generator, press on the Batch button, and generate 50 or 100 3D models. (2) When prompted for whether you want to see a slideshow of these models, press Yes. (3) Keep pressing the Next button to review your models. When you see a model with a structure that you like, press the "Add to Reviewlist.txt" button (even if you don't like the materials or colors that are used with the model). (4) When you are done with this slideshow, you will be back at the Random Building Generator. Press the Batch button again. (5) This time check the "Make Only Variations of Scripts Listed in ReviewList.txt" checkbox, and press the "Begin Creating 3D Models" button.

You will now generate lots of 3D models, which will all be variations of the 3D models that you previously liked.

When you then see a 3D model that looks good enough for you in all respects, press the Add to City button to save the button to one of the cities you can use with the Random City Generator. These cities are a good way of organizing your 3D models made with MetroModeler, regardless of whether you want to use the Random City Generator.

Here is another workflow which works very well: (1) Open MetroModeler, and then open another instance of MetroModeler. (1) Go to the Random Building Generator, press on the Batch button, and generate 50 or 100 3D models. (2) When prompted for whether you want to see a slideshow of these models, press Yes. (3) Keep pressing the Next button to review your models. When you see a model that looks exactly right, add the model to a city. If the model looks almost right but needs some minor tweak, open up the corresponding .mms script in the second instance of MetroModeler. Try changing one or two of the script parameters. MetroModeler has a graphical search and replace utility that makes it very easy to change any material in the model. When the model looks just right in the second instance of MetroModeler, save the script (under a name that does not begin with "BatchRand," so that it is not overwritten the next time you run the Random Building Generator).

Troubleshooting


Q. None of my MetroModeler files look right when I view them in CtrlView. What can I do?


Try selecting Options and then Preferences from the CtrlView menu. On the General Tab, make sure "Fast Hidden Lines Removal" and "Apply Textures" are checked. On the Mouse tab, make sure Orbit is selected. On the Mode tab, make sure "Outlined shadow model" is checked. On the Lights tab, set Brightness to the maximum level. On the Animation tab, use a Rotation Angle of 3.6 degrees, and a Frame Rate of 10 frames per second.


Q. With the Random City Generator, I am trying to create city blocks with more than one building per block. It works, but the buildings end up squeezed together on a city block, without any space between them. How do I put some space between the buildings?




Below is the best technique to follow if you want to create city blocks containing more than one building per block, and also have space between the buildings on a city block:

(1) Use the Random Building Generator to create 3D models, and choose one of the options (other than "None") from the Bottom Plane dropdown, such as "150%," "200%," etc. This will cause a flat plane to be created underneath each of the buildings that the Random Building Generator creates. The percentage is the width of this plane compared to the width of the building model that will be generated. The larger the percentage you choose, the more space there will be between the buildings on a city block. In the Bottom Plane Material slot, choose an appropriate material. For office buildings, an off-white material such as FlatAlmond works welll (if you are generating 3D models of houses, a greener material would be more appropriate).

(2) Add some of the resulting scripts to the pool of scripts used by a city file (a .BFD file ) used with the Random CIty Generator.

You can do this by using the "Add to City" button that appears if you choose to see a slideshow of your randomly generated buildings, or you can do it by going into the Random City Generator, loading a city file, and adding the scripts by pressing the Add button. in the slot marked "How much of city block to use with the item(s) in this file," choose a percentage less than 100% from the dropdown.



Extending MetroModeler

MetroModeler has a partially open architecture that gives you a variety of opportunities to expand its functionality, even if you are not a programmer. Rather than patiently waiting for the next release, you can jump right in and make MetroModeler more powerful through your own efforts. Below is a discussion of 5 ways in which you can extend the functionality of MetroModeler, and give it additional power.

(1) Expand the .MTL File

The .MTL file that comes with MetroModeler (MetroModeler.mtl) uses a format which is documented in various places on the Internet (google for ".MTL file" to find out about it). You can easily add new materials to the file by simply using Notepad to add a few lines to the MetroModeler.mtl file. (Be sure to make a backup copy before trying this.) Each new material you add can have an associated .jpg file or .bmp file that will be used as a texture. Adding a new material is as simple as adding a new block to the .MTL file such as the block below:

newmtl MyNewMaterial
map_Kd MyNewMaterial.jpg


Caution: the CtrlView .obj file reader is case-senstive in regard to .MTL files, so be sure, for example, to use map_Kd rather than map_kd if you are adding a material (based on a jpg file) to the .MTL file.

You are strongly encouraged to add additional materials to your .MTL file . The more you add, the more powerful MetroModeler will become, and the more variety you will see from the output of the Random Building Generator dialog. Always put new materials at the end of the file.

If you are adding one or more materials based on .jpg files, the easiest way to add them is to use the "Add Materials to MetroModeler.mtl" menu command from the Miscellaneous menu. If you use that menu command, you won't have to directly edit the MetroModeler.mtl file.

You can get .jpg files for use in MetroModeler by walking around with a digital camera in a city, and taking lots of pictures. You will need to crop your pictures. The Seamless Texture Generator Pro by Shawn C. Swift is a low-cost tool that works great for cropping these types of images (it allows you to drag all four corners of the cropping square).

One clever technique is as follows: (1) Use MetroModeler to create a complex object with a rectangular shape. (2) Without rotating this model, save an image of it in the .jpg or .bmp format (3) Load this image in a image editor, crop the image, and save the cropped image. Crop the image so that it has only the pixels you want to save as part of your new material. (The IrfanView image editor is a free or low-cost image viewer/editor that supports cropping.) . (3) Create a new entry in your .MTL file, a new material that uses this image as the texture map. To do this, you simply add 2 lines to the .MTL file like the lines above, but with a map_Kd line referencing the new image you saved.

Now whenever you want to set a material in MetroModeler, you will see your new material (based on the image you saved ) in the Materials browser.

This technique is a great way to achieve "polygon reduction" if you are working on an application (such as video gaming) in which you are trying to minimize the number of polygons in your models.





(2) Create Extension Files

By creating extension files , you can extend the functionality of MetroModeler. An extension file is simply a MetroModeler script saved that does not use either an "#include" line or a "#use" line. When you create an extension file, you basically create a new function that you can use in your MetroModeler script, just as if if was one of the buillt-in functions.

You might want to create an extension file if you need for a particular custom-built 3D structure to be used with different sizes in different places. Custom 3D structures saved in extension files can be scaled to any size.

Here is an example of an extension file. Suppose you need to create in different sizes a shape like this:

_|---|_.

You can create this shape with the following lines of code:





Box "B1", "Gold", 0,0, 0, 30,10, 10
Box "B2", "Gold", 20,10, 0, 10,30, 10
Box "B3", "Gold", 30,20, 0, 30,10, 10
Box "B4", "Gold", 60,10, 0, 10,30, 10
Box "B5", "Gold", 60,0, 0, 30,10, 10


Now suppose you save these lines in a file called MyShape.mms. Then you can use this shape in any file by putting this line at the top of the script:

#use "MyShape.mms"

Once that line has appeared in your script, you can create this shape in any size by using lines like this:

MyShape 10,10, 10, 30, 30, 30

MyShape 110,10, 10, 90, 30, 30

When you use an extension file to evoke your custom built function, you have to supply a name that is the name of the extension file (minus the ".mms" part). For example, if you created a MySpecialColumn.mms extension file, you would evoke that using a line such as:

MySpecialColumn 20,20,30, 120,303, 202

In a line of code that evokes the extension function, the arguments must always be: (1) X Start (2) Y Start (3) Z Start (4) Width (5) Height (6) Depth

By changing the first 3 arguments, you can position your custom object in different places, and by changing the last 3 arguments, you can scale your object to different sizes. .

You can put any MetroModeler function calls in an extension file. The example above uses only the Box object, but any other function call can also be used. You cannot use an " #include" line or a "#use" line in any MetroModeler script designed to be used as an extension file . So extension files cannot be "nested."

The Random City Generator dialog in MetroModeler makes heavy use of extension files.

(3) Create Additional City Layouts

When you press the City Layout button from the Random City Generator, you get a City Layout dialog that allows you to view and choose one of several layouts for your city (such as a layout with nothing but city blocks, a layout with a river running through the middle of the city, etc.) You can easily add new layouts to this dialog, to broaden your options.

To do this you simply need to use any text editor (for example, NotePad) to create a new file called a City Layout File, which has an extension of .clf. Here is an example of such a file:

ssssssssssssssssss
ssssssssssssssssss
cccccccrrrcccccccc
cccccccbbbcccccccc
cccccccrrrcccccccc
cccccccbbbcccccccc
cccccccrrrcccccccc
cccccccrrrccccpppc
cccccccrrrccccpppc
cccccccrrrccccpppc
cccccccrrrcccccccc


A City Layout File schematically gives a bird's eye view of the city, and specifies the general characteristics of different areas of the city There are 2 possible formats, called Format A and Format B.

When Format A is used, each of the characters in the file signifies the type of output that will be produced in a unit of space equal to a city block. With Format A, you can use any of these characters in the City Layout File :

c = a city block, containing 1 or more buildings

r = a river

p = a park

s = a sea

b = a bridge

q = a city square

For example, to create a City Layout File specifying a city with a size of city 400 blocks, and with a river running through it from east to west, you would create a City Layout File looking like this:


cccccccccccccccccccc
cccccccccccccccccccc
cccccccccccccccccccc
cccccccccccccccccccc
cccccccccccccccccccc
rrrrrrrrrrrrrrrrrrrr
rrrrrrrrrrrrrrrrrrrr
cccccccccccccccccccc
cccccccccccccccccccc
cccccccccccccccccccc
cccccccccccccccccccc
cccccccccccccccccccc




To give another example, to create a City Layout File specifying a city with a size of city 100 blocks, with the city being to the south of a sea, you would create a City Layout File looking like this:


ssssssssss
ssssssssss
cccccccccc
cccccccccc
cccccccccc
cccccccccc
cccccccccc
cccccccccc
cccccccccc
cccccccccc




Follow these rules in creating a new City Layout File: (1) Rivers and seas must be rectangular in shape. You cannot have something like a diagonally winding river, or a circular sea in the middle of the city. (2) When using the p or q characters to create a park or a city square, create a rectangular region. You cannot have something like a cross-shaped park.

Besides the Format A described above, you can also create City Layout Layout files using a Format B designed for use with video gaming. Format B is designed to make it easy to create "short horizon" video game environments in which the ground-level line of sight never stretches more than 50 or 100 yards until a building blocks the line of sight. This is very useful for creating virtual environments that can be rendered in real time because no more than a few buildings need to be rendered at any time.

When Format B is used, each character in the City Layout File represents a unit of space equal to a single building (not a whole city block). With Format B you can use any of these characters in the City Layout File: x to mean one building, Y to mean a section of road stretching from from north to south, or y to mean a section of road stretching from west to east.

Here is an example of a City Layout File using Format B


xYxxxxxx
xYxxxxxx
xyyyyyyx
xxxxxxYx
xxxxxxYx
xyyyyyYx
xYxxxxxx
xYxxxxxx
xyyyyyYx
xxxxxxYx




The Y and y characters represent a road. In this layout, there is a continuous path running from one side of the city to the other, but the line of sight never stetches very long without being blocked by a building.

Once you have created your City Layout File using either the Format A or Format B described above, save it with an extension of .clf, and place it the same directory as your MetroModeler.exe file (normally c:\MetroModeler).

When you then go into MetroModeler, open the Random City Generator dialog, and press the City Layout button, you should see your new city layout as one of the choices in the City Layout dropdown. You can add as many new city layouts as you want through such a process.



(4) Create Additional Building Layout Files

The extremely versatile BuildingCore17 function works off of text files with an extension of .blc. See the documentation of that function for a description of the simple format of these files. Basically, a .blc file is a grid of numbers between 1 and 9, with each number representing the relative height of part of the building (a bird's eye perspective is used).

MetroModeler comes with more than 100 .blc files, many of which define intricate and symmetrical structures. You can extend MetroModeler by creating additional .blc files. The files can be created with any text editor such as NotePad. If you have checked the checkbox enabling the use of the BuildingCore17 function, MetroModeler will randomly select a .blc file from any of the .blc files it finds in your MetroModeler directory. So once you add a new .blc file to the C:\MetroModeler directory, it may be used the next time you use the Random Building Generator. You can get the Random Building Generator to use only your custom .blc files by creating a Temp directory off of C:\MetroModeler, copying all .blc files there, erasing all .blc files from C:\MetroModeler, and then copying to C:\MetroModeler your custom made .blc files. (If you do this, be sure to eventually copy back the .blc files from the temp directory.)

You can also: (1) add new .bl1 files to increase the variety of the structures created when the Random Building Generator uses the BuildingCore18 function; (2) add new .btl files to increase the variety of the structures created when the Random Building Generator uses the BuildingTop8 function (3) add new .bbl files to increase the variety of the structures created when the Random Building Generator uses the BuildingBase10 function. (4) add new .blz and .bly files to increase the variety of the structures created when the "Use Multi-tower Building Complexes" checkbox is checked in the Random Building Generator dialog.

See the MetroModeler File Types topic if you are interested in add any of these file types.



(5) Create a Tool for Generating Or Modifying MetroModeler Scripts


Although MetroModeler scripts by convention have an extension of .mms, they are really just ASCII text files that can be created through any programming environment capable of creating ASCII text files (for example, Perl or VB). So if you know some programming, you can create your own tool for generating or modifying MetroModeler scripts. Since the many MetroModeler functions are exhaustively documented on our web site (www.metromodeler.com) and within the program, you have all the information you need. A programmer can create a tool for generating MetroModeler scripts, which can then be opened and launched in MetroModeler. You can programmatically create scripts for creating individual buildings, or scripts for creating entire cities.

MetroModeler File Types

Below is some information that will be useful mainly for those who want to extend MetroModeler's functionality. (something that is very easy for non-programmers to do, as explained below).

(1) .MMS files

This is the basic script file used with MetroModeler, and the only type of file that can be run from the MetroModeler main screen (by using the Create and Show .Obj File button). An .mms file consists of one or more MetroModeler function calls. A function call is a line that uses one of the 200+ MetroModeler functions documented at http://www.metromodeler.com/FuncReferenceLinks.htm.

(2) .OBJ files

This is a type of 3D graphics file recognized by a wide variety of 3D programs such as Bryce 5.5. When you run a MetroModeler script (with an extension of .mms), an .obj file is produced. Information on the format of .obj files can be found at various sites on the Internet.

(3) .MTL file

A file that is used with an .obj file to list materials that may be used in the .obj file. The first line of the .obj file has a line such as "mtllib MetroModeler.mtl" that specifies that MetroModeler.mtl has materials that will be used by the .obj file. All .obj files created by MetroModeler use an .mtl file called MetroModeler.mtl. Information on the format of .mtl files can be found at various sites on the Internet.

(4) .BFD file

A .bfd file is created when you use the Random City Generator dialog. A .bfd file saves all the inputs you can make in that dialog.



(5) .BLC file

An ASCII text file that can be used with MetroModeler's BuildingCore17 function and BuildingCore18 function. The file consists of numbers between 1 and 9 that give the heights of various parts of a building, using a bird's eye perspective that looks down at the building from above. MetroModeler comes with more than 100 .blc files, each of which gives the layout of a particular type of building structure. For example, here is a simple .blc file that specifies a building with an inner core that is twice as tall as its outer part:

444
484
444

You can use a text editor to add new .blc files to increase the variety of the buildings created when the BuildingCore17 function is used by the Random Building Generator.

(6) .BL1 file

An ASCII text file that can be used with MetroModeler's BuildingCore18 function. The file consists of numbers between 1 and 9 that give the heights of various parts of a building, using a bird's eye perspective that looks down at the building from above. The file may also contain a special "insertion point" character of #, $, %, ^, &, *, or (. The meaning of these characters are as follows:

# - Relative height of 3, and insert another structure at this position
$ - Relative height of 4, and insert another structure at this position
% - Relative height of 5, and insert another structure at this position
^ - Relative height of 6, and insert another structure at this position
& - Relative height of 7, and insert another structure at this position
* - Relative height of 8, and insert another structure at this position
( - Relative height of 9, and insert another structure at this position

MetroModeler comes with more than 25 .bl1 files. You can use a text editor to add new .bl1 files to increase the variety of the buildings created when the BuildingCore18 function is used by the Random Building Generator.

(7) .BTL file

An ASCII text file that can be used with MetroModeler's BuildingTop8 function function. A .btl file gives the layout of the top part of a building. Each .btl file consists of 2 parts (separated by a line containing a "---" string): an upper part containing numbers between 1 and 9 indicating the relative heights of different parts of the building top, and a lower part consisting of alphabetic characters indicating what type of primitive is used in particular parts of the building top. The second part of the file can use any of these characters:

B - A Box object
P - A Pyramid object
A - A Pyramid object on top of a Box object, with the Pyramid having one third of the Box's height
C - A TriangularPrism object on top of a Box object, (the former 1/3 of the Box's height)
D - A Dome object on top of a Cylinder object
E - A RightAnglePrismZAxis object on top of a Box object (the former 1/3 of the Box's height). The slanted face is pointed in the northwest direction
F - A RightAnglePrismZAxis object on top of a Box object (the former 1/3 of the Box's height). The slanted face is pointed in the northeast direction
G - A RightAnglePrismZAxis object on top of a Box object (the former 1/3 of the Box's height). The slanted face is pointed in the southwest direction
H - A RightAnglePrismXAxis object on top of a Box object (the former 1/3 of the Box's height).The slanted face is pointed in the southeast direction
I - A Cone object on top of a Cylinder object (the former 1/3 of the Cylinder's height)

Here is an example of a simple .btl file.

2222
2662
2222
---
BBBB
BDDB
BBBB

This file specifies a building top in which has an inner core three times taller than its outer core. The outer core consists of a rectangular ring of Box objects. The inner core consists of 2 cylinders with domes on their tops.

MetroModeler comes with more than 70 .BTL files. You can use a text editor to add additional .BTL files to increase the variety of the output that is produced when the BuildingTop8 function is used by the Random Building Generator.

(8) .CLF file

A .clf file is a file specifying the general layout of a city. You can view these files when you press the City Layout button from the Random City Generator dialog. See the "Extending MetroModeler" topic for details on the 2 types of formats that are used with these files. You can use a text editor to add additional .CLF files to increase the number of city layouts shown when you press the City Layout button from the Random City Generator dialog.

(9) .BLZ file

A .blz file is one of 2 files used when the "Use Multi-tower Building Complexes" checkbox is checked in the Random Building Generator dialog. The file specifies a layout of a building, viewed from the front (a Z-axis perspective). The file contains alphabetic characters. If an alphabetic character is used more than once, it means there will be 2 parts of a building that repeat the same look. Here is a simple example of a .blz file:

A A
A A
ABA
CDC

This specifies a building with left and right towers that are twice as high as the building's middle.

MetroModeler comes with more than 30 .blz files. You can use a text editor to add additional .blz files to increase the variety of the output that is produced when the "Use Multi-tower Building Complexes" checkbox is checked in the Random Building Generator dialog.



(10) .BLY file

A .bly file is one of 2 files used when the "Use Multi-tower Building Complexes" checkbox is checked in the Random Building Generator dialog. The file specifies a layout of a building, viewed from above (a bird's eye perspective). The file contains alphabetic characters. If an alphabetic character is used more than once, it means there will be 2 parts of a building that repeat the same look. Here is a simple example of a .bly file:

BBB
A A
BBB


This specifies a building in which a particular part (B) is repeated 3 times in the back and front, and another part (A) is repeated twice in the middle.

MetroModeler comes with 25 .bly files. You can use a text editor to add additional .bly files to increase the variety of the output that is produced when the "Use Multi-tower Building Complexes" checkbox is checked in the Random Building Generator dialog.



(11) .BBL file

A .bbl file is used with the BuildingBase10 function. A .bbl file specifies a layout of a building base (the bottom part of a building), viewed from above (a bird's eye perspective). The file consists of alphabetic characters that can be A, B, C, or E. E specifies an entrance. Here is a simple example:

AAEAA
A   A
AAEAA


This specifies a building base with a front entrance and a back entrance, but no side entrance. The width of the front and back entrances are one fifth of the width of the building.

MetroModeler comes with 25 .bbl files. You can use a text editor to add additional .bbl files to increase the variety of the output that is produced when the BuildingBase10 function is used in the Random Building Generator dialog.

(12) .WRL File

A .wrl file is a 3D graphics file that stores data using the widely used VRML 1.0 or VRML 2.0 format. You can save your MetroModeler output in such a file by using File/Convert from the MetroModeler menu. You might want to do that if you want to import your MetroModeler output into a program that can read VRML 1.0 or VRML 2.0 files, but cannot read .obj files.

(13) .OLF File

There is one .olf file for each of the dropdown choices that you see in the Outskirts dialog which can be reached from the Random City Generator dialog. Each file specifies a particular type of layout for the city outskirts. Each of these files gives a schematic bird's eye view of the core part of a city (represented by the character c), and the outskirts that surround it. An example of such a file is shown below.


ppppppppppppppppp
ppppppppppppppppp
ppnnnnnnnnnnnnnpp
ppnnnnnnnnnnnnnpp
ppnnnnnnnnnnnnnpp
ppnnnnnnnnnnnnnpp
ppnnnnnnnnnnnnnpp
ppnnnnmmmmmnnnnpp
ppnnnnmmmmmnnnnpp
ppnnnnmmcmmnnnnpp




The meaning of the characters are as follows:


c - The core part of the city, using buildings in Script Pool 1
m - Areas using buildings in Script Pool 2
n - Areas using buidlings in Script Pool 3
p - Areas using flat planes in Material Pool 1



Script Pool 1 refers to a list that can be controlled from the Random City Generator dialog. Script Pool 2 and Material Pool 1 refer to lists that can be controlled from the Outskirts dialog which can be reached from the Random City Generator dialog.

MetroModeler comes with 15 .olf files. You can easily create additional ones using a text editor. Each time you add a new .olf file, you will see a new choice in the dropdown of the Outskirts dialog.





3D Coordinate System

3D modeling systems use 3 dimensions of space: the X axis, the Y axis, and the Z axis. Shown above is a labeled diagram of these 3 axes (derived from a model created in MetroModeler itself):

To specify an object's position in space, you need to specify a starting position on each of these three axes. In the MetroModeler dialogs, these 3 starting positions are referred to as XStart (the position along the X axis), YStart (the position along the Y axis), and ZStart (the position along the Z axis). Values for these positions should always be positive numbers.

MetroModeler (and the common Wavefront/Alias .obj file format) use what is called a right-handed coordinate system, as does OpenGL (one of the two most popular 3D graphics display technologies). This means that in MetroModeler the smaller the Z value (or ZStart), the farther the object is away from the observer. Some other 3D programs use a slightly different "left-handed" coordinate system in which the greater the Z value, the closer the object is to the observer. But that's nothing to worry about, because there are many program and tools (including CtrlView and AccuTrans) that can translate 3D files using one system to some other file format using a different system.

In MetroModeler, most functions have an XStart, YStart, and ZStart argument. These 3 inputs give the position in 3D space of the leftmost, lowest, and backmost point of the object that will be created. If you wanted to create a row of objects that are horizontally aligned, stretching from left to right, you would give them all the same ZStart value and YStart values, varying the XStart argument for each item in the row. If you want to create a vertically rising column of objects (like the floors in a skyscraper), you would give them all the same ZStart and XStart values, varying the YStart argument for each item in the column. If you wanted to create a group of objects receding toward the horizon, stretching from front to back like telephone poles you see on the highway, you would give them the same XStart and YStart values, and vary the ZStart argument for each item in the series.

If you don't have a clear grasp of 3D coordinates after this discussion, don't worry: you can use MetroModeler effectively even if you have no grasp at all of this topic. You can very productively use the 2 main utilties within MetroModeler (the Random Building Generator and the Random City Generator) even if you don't understand anything about 3D coordinates.

Below is the MetroModeler script used to create the image above:




Box "B1", "Steel1", 30, 0, 0, 300, 30, 30
RightAnglePrismZAxis "r1", "NE", "Steel1", 330,15,0,30,30,30
RightAnglePrismZAxis "r2", "SE", "Steel1", 330,-15,0,30,30,30


Box "B2", "Emerald", 30, 0, 0, 30, 300, 30
RightAnglePrismZAxis "r3", "NW", "Emerald",15,300,0,30,30,30
RightAnglePrismZAxis "r4", "NE", "Emerald", 45,300,0,30,30,30


Box "B3", "Gold", 30, 0, 30, 30, 30, 300
RightAnglePrismYAxis "r5", "SW", "Gold",15,0,330,30,30,30
RightAnglePrismYAxis "r6", "SE", "Gold", 45,0,330,30,30,30



Copyright 2005 by Global Bargains, Inc. All rights reserved. MetroModeler is 3D modeling software for making a 3D building, a 3D city, or other forms of 3D architecture. Press the Home button for details on this 3D architecture software and the 3D city models it can create with its random city generator and other 3D computer modeling tools.