Have you ever asked yourself “Why do video games always take place in cities like New York, London, or even Far, far away?”? Would you like to see a video game in your city? Perhaps commercial companies won’t do a game in your city, but you can do it using Blender. All that you need is a computer, Blender, free time and this tutorial. Let’s start!!
Modelling Basic Streets
Open Blender and delete the default cube, then add a plane [Add>>Mesh>>Plane]. Go into Edit Mode [Tab], choose the vértices 3 and 4 and delete them [X key (Erase)>>Vertices],
so we have an edge. Go to side view, [Pad1] choose the other two vértices and extrude them [E>>Only Vertices]. While extruding use a constraint to only move the edges in the Z axis [Mouse Middle Button (MMB)] Now we have something like a U.
Don’t deselect the new vértices and extrude again, but now with a constraint in X axis. Do NOT move the mouse after extruding, just clik in order not to move the vértices, then push [S>>MMB] and scale that vértices in X axis. Extrude one more time and move the new vértices in the Z axis to have something like
This is the base of our city, when you've done that select all [A>>A], go to top view [Pad7] and extrude all [E>>Only Edges] don’t forget to add a constraint to only move in Y axis [MMB]. We will have something that will seem like a street, but normals may be flipped,
so recalculate inside
[Ctrl + Shift + N].
Using this method you can do as many streets as you want, use different widths to make little streets or big avenues. Now we’re going to model the intersection.
Put 4 streets like in,
select all, go to mesh tool and give the limit a value of 0.02, now clik on remove doubles. This will join all vértices that are very near.
Now select vértices 1, 2 and 3 and push [F]. Select 2, 3, 4 and 5 and push [F] again.
Do the same in the four corners. Then select vértices 5, 6, 5a and 6a and push [F], do the same on the other side and complete selecting vértices 6, 6a, 6b, 6c and pushing [F].
Don’t forget to recalculate normals inside if it’s needed
Of course, to do more intersections you don’t have to repeat all of the process, just select the first corner using [B] and [Shift + D], put it very near to the new intersection, select all, and clik on remove doubles [W>>Remove Doubles].
Doing that, you can make the city as big as you want.
To texture streets you need images of buildings and shops.
You can look for them on the Internet or you can go out and take photos, too. Load the image in the UV Image Edit
[1-push MMB over the line in image and select split areas, 2-change the new window to UV Image Editor, 3-push N, 4-load your image, 5-choose your image in the image browser], go to edit mode [Tab] and change the select mode to faces. Push the face where you want to put the image and choose it in the UV Image Editor.
Look for a texture of pavement and put it. On the curb put a yellow texture and on the road put other texture something like a road :-D
You can use a page like www.3dxtras.com
to look for objects like traffic lights, streetlamp, containers, parking meter. You can use http://www.google.com
to look for more and more things.
If you don’t find the object you need, model it yourself using tutorials in Internet. Add some new cubes to make windows and doors.
Very Big cities
In very big cities you should split the city into some different objects. In each one you have to add a property named “mesh” and the value must be the mesh of the object, an “always sensor” with a delay of ten, a python controller with the script “city.py”.
Finally, add an actuator kind edit object / replace mesh named “m”.
import GameLogic as GL
list = GL.getCurrentScene().getObjectList()
cont = GL.getCurrentController()
own = cont.getOwner()
d = own.getDistanceTo(list["OBCube"])
m = cont.getActuator("m")
if de > 100 :
This is the easy way to make your own city and you can add as many objects as you want. When you watch the result you will be proud and you can play all you want now.
-Sergio Guevara Martínez (Alias 53R610)
-Antonio Alberto Ramos Ruiz (Alias R@MÖ$)