Home > Documentation > data source types

Data Source Types

the datas for the inputs are extracted from different types of data. a type is selected for each input from the corresponding highlighted drop down menu :
here the elevations of the buildings and the zoning inputs use an Image type, and the city map uses a Librairy type.

for now there's 6 different types :

  • Image
  • Image (UV editor)
  • Material
  • Last Render
  • Mesh
  • Library

..and also None, that disable the corresponding input.

depending on the input the buttons differ because each input it interprets datas. (see Inputs tab). but the source type management runs the same way whatever the input.



use the little L button to load an image.
or fill in the text field with the path and the file name.
if a city set is saved with that type, it can be reused from another .blend file.
at creation time, the image is copied in the Blended Cities /tmp folder.


Image (UV editor)

a drop-down menu displays the different elligible images from the UV editor, (most of the images previously loaded in Blender).
the R button allows to reload the images from the UV editor.
if a city set is saved with that type, it cannot be reused in another .blend file. the image needs to be saved and the input type needs to be set to image with the corresponding path.
you can edit the image between two creations in the UV editor.
at creation time, the image is copied in the Blended Cities /tmp folder.



a drop-down menu display the different elligible materials.
materials will only appear here if their name begins with maps_
this type is very flexible of use : it takes advantage of the numerous Blender material options, one can blend several textures, use procedural textures, apply masks, use nodes etc...
when Material is selected, the script will convert the selected material to an image that is saved in the Blended Cities /tmp folder, then it uses it as  the image source. the snapshot of the material is taken in layer 20 by a camera created for this purppose (the PopCamOb camera).

size or sizeX and sizeY allow to define the image resolution : it can be useful to create a big image for an higher accuracy, depending on the input. a 64x64 image for building elevations can be applied on very large cities as the image is logically stretched to the city : it will then create several squares of building lots with the same heights ( but you can cheat with the var parameter in Buildings /properties ). most of the time it's useless to define an image size greater than 512x512.
random offset allows to offset the material textures before to render and seed allows to use the Replay mode (pseudo-random) if enabled.

if a city set is saved with that type, it cannot be reused in another .blend file. you can copy the image generated in /tmp and reuse it as an image type.

by default the provided maps_ materials are shadeless : the generated image does not take into account the lights or the shades of the scene.
to use light effects on a maps_xxx material you created, you need to add a lamp in the layer 20. the  Z position of the lamp must be lower than zero, since the layer 20 is also used for library object importation. the snapshot is taken at (0,0,-50)

for more info about Blender materials and textures :

the procedural texture plugins of the Blender plugin repositery :


for the Image, Image (UV editor) and Material types, the source is copied or created in the Blended Cities /tmp folder. the image name depends on the input :
Building Elevations : popMap.png
Zoning : zoning.png


Last Render

this type allows to edit the source image without alter the original source.
it reuses the last image in the Blended Cities /tmp folder.

it needs at least one run with another type in order the image to exist.
these temporary images are not listed in the Image (UV editor) list to avoid issues.
if you modify this image in the UV editor save it to update the image file before to create.
this type can be useful for a work in progress city. once you're done don't forget to save the image and change the type to image else your risk to  overwrite the image by mistake.



this type is used for city map.
blocks20x20 is the object name used as a map. it must exists in the current .blend file.
to use another object you can press the S button, select an object in the 3d view or the outliner then confirm.
you can also type in the object name in the text field.
if a city set is saved with that type, it cannot be reused in another .blend file, you need to append it to the other files.



the object is loaded from the Blended Cities library.
a drop-down menu allows to choose the object.
here the default city map object is used. this name is not always the blender object name and can correspond to several objects. for city map objects there's only one object per map.
this type has potentially less options, as it is not editable.
import allows to create a local mesh copy of the source object and to work on the copy.
if a city set is saved with that type, it can be reused in another .blend file

Last Updated on Sunday, 16 May 2010 14:52