New in 1.0
Procedural buildings are very useful for quick prototyping of a city, and for cities seen from far away.
In addition to using the included library of buildings (you can easily modifiy them if you want), and those you made yourself from scratch, you can also let SceneCity generate one or more buildings for you. You’re then free to use them unmodified, or work further on them.
You can even have unique variations of a procedural building in the city, and control their height depending on their final position in the city.
Create the building¶
Procedural buildings are meshes, so you first have to select an existing mesh, or create a new mesh and select it.
Go to the mesh settings, in the SceneCity panel, check “Use this datablock as building”, then at the bottom change the building type from “Use mesh as it is” to Procedural cube. A lot of options will then appear, they’re described below.
At the bottom of all these options, there is the Generate building button. Clicking it will generate the building in the currently selected mesh. The mesh will be cleared first every time you click this button, so make sure you’re using a mesh dedicated to becoming a building.
You now have a procedural building. It will be placed in the city just like any other regular building the next time you mass-place them.
Parts of the building and their options¶
(note: what I call the “height” is the size on the Z axis. I use these two terms interchangeably)
A procedural building is made of several parts, some you can activate or not, and control with parameters.
- a ground you can enable it or not, and control its min/max height. It always covers to the whole surface available to the building.
- a ground floor you can control its min/max height. It’s supposed to be where the street shops are.
- a body the main part above the ground floor, where the windows are. You can control its min/max size (x,y,z). This will affect in turn the size of the ground floor on x and y. We call the body the first recursion, because a building can have several recursions (see below), and thus bodies.
- a pedestrian “roof” you can enable it or not, and control its min/max height, as well as its depth from the walls. It always appears between the ground floor and the body. The pedestrian roof can also serve as a way to ensure there’s some space reserved for pedestrians around a building, even if you don’t make it visible by disabling it.
- roof cubes these add some detail on the roof. You can control their min/max size. Make sure they’re not larger than the body itself, or they will just extend it vertically. Also they’re supposed to be short, 2 or 3 meters high max. You might consider increasing the number of recursions if you need tall parts on the roof.
The other options are
- seed if zero, you’ll have a different building each time you click the generate button. Any other value will give you the same building. Useful to test the effect of a parameter in particular, or to retrieve a building you like, given the same generation parameters.
- nb of buildings instead of generating a single building, you can have several unique buildings on the same area. They’re placed randomly on the available surface, so they may collide, which can be useful to add visual complexity easily.
- recursions per building each building can be repeated on its roof recursively, to have more complex shapes. Usually no more than 2 or 3 recursions are necessary. Above that your building will look kind of sci-fi.
- size reduction per recursion XY for recursions above 1, you can make them wider or thinner using this percentage.
- size reduction per recursion Z same as above, but make the higher recursions shorter or taller.
Assign materials to the building¶
When you generate the building, several material slots are created, and assigned to specific faces of the building mesh. From top to bottom, the slots are used for:
- the ground material
- the ground floor / stores material
- the pedestrian roof material
- the body material
- the roof material
- the sides of the roof cubes material
A known issue is with the ground floor material: the UVs of this part of the mesh need improvement. The V axis is not clamped between 0 and 1. Therefore if you apply a texture of a store front, it won’t be displayed correctly. This will be fixed, but in the meantime, you can easily do it manually. Even if you have unique variations enabled, simply select the faces (in the final mesh once you have mass-placed this procedural building) by material from the correct slot, then edit their UVs.
Use this feature if you need a city in which some or all of the buildings have a unique shape.
From a procedural building, you can have as many variations as needed in the city: each time a building must be placed, and this procedural building is chosen, if it has the unique variations enabled, then a new variation is generated on the fly, and placed. All the variations will still follow the generation parameters of your procedural building, so you keep some control on the variations.
To enable the unique variations, you first have to set the placement method to “single merged mesh”, then enable the unique variations checkbox.
If you need to make your unique variations taller or shorter in some parts of the city, for instance taller in the central district, then create a Blender Internal texture, and enter its name in the Size control texture field. This texture must be a grayscale “map” of the city seen from above, with dark pixels for short buildings, and light pixels for tall buildings. The size control texture is just a hint to the generator about how tall you want your unique variations in each part of the city, it does not say where the buildings will be placed in the city.
You should make the procedural building quite tall in the first place, like 100m tall or more, to better see the height variations in the city. Then refine the building height and size control texture for your needs.