procedural_city_generation.visualization package

Submodules

procedural_city_generation.visualization.blenderize module

procedural_city_generation.visualization.blenderize.createmesh(verts, faces, texture)

Creates a Blender mesh from a list of vertices and faces while assigning a texture object

verts : iterable<iterable<float(shape(3, ))>>
Iterable of 3D-Coordinates of vertices
faces : iterable<iterable<int>>
Iterable of Iterables of the indices of the verts which make up each face

texture : Blender texture object

procedural_city_generation.visualization.blenderize.createobject(verts, faces, texname, texscale, shrinkwrap)

Creates a Blender object for each mesh. Each mesh is (after the building_generation submodule) a list of all vertices and faces which share the same texture (in order to make blender start up in reasonable time). Shrinkwrapped textures will be blender-shrinkwrapped (projected on to) the surface mesh.

verts : iterable<iterable<float(shape(3, ))>>
Iterable of 3D-Coordinates of vertices
faces : iterable<iterable<int>>
Iterable of Iterables of the indices of the verts which make up each face
texturename : String
Must be identical with the name of the image in /visualization/Textures
shrinkwrap: boolean
If true, then this mesh will be triangulated and then shrinkwrapped. It makes sense to have this attribute set as true for Roads and Floortypes.
procedural_city_generation.visualization.blenderize.createtexture(name, scale, texturetype='REPEAT')

Creates a Blender Texture Object. Only Tested with Cycles Engine.

name : String
Name of this Texture
scale : int
How many times this Texture is to be scaled down. This Parameter still needs work. In the future, when 0 is passed, it is supposed to scale a Texture exactly on each polygon, meant to be useful e.g. when creating windows.
texturetype : String (optional)
currently unused
procedural_city_generation.visualization.blenderize.main(points, triangles, polygons)

Intended to run in Blender. This means that this script must be written in Python 3 conformity. Works by reading and unpickling /outputs/buildings.txt and /outputs/<correct-heightmap-name>.txt and creating Blender Polygons for each of these.

Run from console (from parent direcotry) with blender --python /procedural_city_generation/visualization/blenderize.py

procedural_city_generation.visualization.blenderize.setupscenery()

Sets up the lighting and render engine. In the future could provide options like “time of day”, “weather”, “renderengine”.

procedural_city_generation.visualization.visualization_params module

Module which contains all input parameters for this submodule, along with: - The default (recommmended) value from the developers - A short description of what the parameter changes - All values that the parameter accepts without causing this program to break.

This information can also be viewed when calling the GUI and clicking the “options” button for that specific module.

procedural_city_generation.visualization.window module

Module contents