Afternoon fellow blenders I just recently downloaded blended cities 0.445 and on the official website http://jerome.le.chat.free.fr/index.php/en/ the latest article is about using real map data as a basis for the street mesh. However at this time there isn’t a definitive way to import the data from within the generator. There is a script in the parser sub folder that will read osm data but I’m not sure how to invoke it (and no alt+p does not work). After some Google searches, software downloads and a little experimentation I think I have the solution.
These are the applications I used
Maperitive http://maperitive.net/ /osm viewer and editor
Wintopo Freeware http://wintopo.com/ /WinTopo is a high quality software application for converting TIF, JPG, PNG, GIF, BMP files and scanned images into useful vector files suitable for CAD, GIS and CNC applications. “borrowed from the softsoft website”
Blender Wintopo import script http://jerome.le.chat.free.fr/index.php/en/blender/scripts/wintopo-importer.html
Here are the steps I followed.
-
Export the desired area from http://www.openstreetmap.org/
-
Open exported area in Maperitive
2a. Set the map to wireframe view // In wireframe view some elements i.e buildings etc may appear as green shapes with a green outline.
console command to apply wireframe ignore quotes
“use-ruleset alias=wireframe
apply-ruleset”
- Export to bitmap //it should be named output.png and it will appear in the directory where you installed Mapertive.
3a. Make sure that you DO NOT save changes in maperitive when you are done exporting as they will be uploaded to the server and we do not want to do that.
4.I used Photoshop to select just the green areas and make them black then saved the changes keeping the file name
5.Open Output.png in Wintopo. There is a button in the menu bar called “vectorize image” click that or use the one touch vector button after the (processing time which may vary based on the size of your output file)
5a. file\save vector as… navigate to the drop down menu and select Ascii X,Y,Z Format the click save. You now have a vector of your map ready to be imported into blender.
- Open Blender 2.49b and open the blended cities file then run the import script then navigate to where your output.asc file is located and bang you now have a street mesh
Hopefully this was helpful I will post my progress with things cleaning the imported mesh etc. If anyone has a better method to import .osm data please share. Maperitve can be a bit frustrating if you arent used to running apps via console so I’ll provide the link to the official documentationhttp://maperitive.net/docs/manual/default.html