Generating the roads is always the first step when creating a city, because the buildings will be put along them in the next step.
To create a road network:
- model the roads or import the library
- choose which road models to use
- choose what kind of shape the network should have, and create it
For now the roads are always straight, can only be parallel or perpendicular, must be built on flat land, and must be 10 meters wide.
The number of lanes depend on your road model. The included road models have 2 lanes. You can model your own roads with more than 2 lanes, but then they wouldn’t be at the same scale as what SceneCity expects, which is 10 meters wide.
Model the roads or import the library¶
(If you’re just using the library of roads, skip this step. See Import the default library)
Two types of Blender entities can be used as roads: meshes, and groups of objects.
There are 5 block types you must create. Just like Lego blocks, the road blocks must fit together to give the illusion of continuity from a block to another. To achieve this, you must follow certain conventions when creating your models. SceneCity will then instantiate (meaning creating copies) and place the instances in the scene to form the entire network. It will assume you follow the conventions properly. If you don’t, the network will look odd.
The block types must follow a few conventions common to all of them, and some specific to each.
Here are the common conventions:
- A road model must be 10 meters wide and 10 meters long, that means 10 blender units wide and long. There is no limit on the Z axis
- The model’s bounding box must stop precisely at +5 and -5 on both X and Y. Otherwise the model may overlap with the surrounding road blocks and buildings if it’s too large, or will not connect to its surroundings if it’s too small
- Local Z=0 is the ground level. Anything below the origin of the road model (negative Z in local space) is supposed to be under the ground, so will be hidden
- Don’t put the road surface directly on the ground (local Z=0) but always slightly above. Otherwise the road surface will be exactly on the ground, which is not possible in reality, and rendering artifacts will appear (Z fighting in technical terms).
Here are the conventions specific to each road block type:
- The straight road block: portion of a straight road along the local X axis.
- The dead end road block: a straight road coming from +X and stopping at -X.
- The turn road block: a change of direction. The road turns from -Y to +X.
- The intersection with 3 directions road block: when 3 directions meet: along Y (+Y and -Y) and +X.
- The intersection with 4 directions road block: when all 4 directions meet: along X and Y.
Choose the road models to use¶
(If you’re just using the library of roads, skip this step.)
You have your road models, but SceneCity doesn’t know about them yet. You have to tell if a mesh or object group is a road, and what type of road portion it is.
If your road portion is made as a single mesh, select it, then look for the SceneCity panel, in the mesh settings. Check the box “Use this datablock as road portion”, and choose the type of road portion it is. You can also choose the placement method.
If your road portion is several objects grouped together, do the same, except you first select any object part of the group, then look for the SceneCity panel, in the object settings this time.
You can set more than one mesh/object group in the same type of road portion, say for instance 3 straight road portions, one could be with a street lamp, one without, and one with a manhole. Then all 3 will be used in the city, you can add variety to your networks this way.
In that case, the “Relative probability to appear in city” parameter can be useful. The default value is 1, meaning that all 3 (in the above example) will be put in equal proportions in the city. If you want one to appear more often than the others, increase its relative probability. A value of 2 means it will appear twice as often as a portion of the same type (eg straight) with a value of 1. A value of 0.5 will make it twice as rare.
If you imported the library of roads, the included models will be used along with your own models. If you don’t want this, disable each road group by unsetting their “Use datablock as road portion” checkbox.
Choose the shape of your network, and generate it¶
When you have your road models ready, it is time to instantiate them and to place them to form an entire network. This is done by going to the general city settings panel, located in the scene settings.
There are two shapes your road networks can have: organic and grid-like. You cannot mix both in the same city.
This type of network is called “organic” because it has no particular shape. It looks random, and tries to fill as much area as it can, given the parameter values you enter.
Maximum length of roads (in meters): with this parameter you control how long at most a straight road can be. Higher values let the network occupy more area.
Amount of crossroads (percent): how much crossroads the network will have. Higher values let the network occupy more area.
A grid network is useful when you need your city to have a regular pattern, and to occupy as much space as possible.
The only parameter is the cell size of the grid, in increments of 10 meters. It controls how long each side of a grid cell is.
A few notes about the generated objects:
- they’re always created on layers 1 and 3 as well as on all the layers active at the time the objects were created
- they will be children of the SceneCity roads object,for easier 3d transformations in the scene
- they will also be part of the SceneCity and SceneCity roads only groups. This is useful if you want to use Blender’s features related to groups, like selecting only certain groups, hiding/showing specific groups etc...