{"id":13,"date":"2014-10-27T04:15:38","date_gmt":"2014-10-27T04:15:38","guid":{"rendered":"http:\/\/www.streetmkr.com\/?page_id=13"},"modified":"2014-11-10T00:20:37","modified_gmt":"2014-11-10T00:20:37","slug":"how-to-use","status":"publish","type":"page","link":"http:\/\/www.streetmkr.com\/?page_id=13","title":{"rendered":"How To Use"},"content":{"rendered":"<div id=\"contents\">\n<div class=\"wrapper\">\n<div class=\"page\">\n<div class=\"pageContents\">\n<h2>StreetMkr For Unity<\/h2>\n<h3>About<\/h3>\n<p>StreetMkr is designed to provide an easy what-you-see-is-what-you-get interface for laying out city streets and sidewalks, while allowing for a great deal of customizability and modifiability. StreetMkr also helps to bootstrap the design process by allowing the import of OpenStreetMap data, making it easy to import entire towns.<\/p>\n<h3>Basic Concepts<\/h3>\n<p>StreetMkr consists of a few primitives:<\/p>\n<p>\u2013 The terrain (a standard unity terrain)<br \/>\n\u2013 The \u201cstreet network\u201d (a container object for streets and intersections)<br \/>\n\u2013 Street \u201cthemes\u201d (A collection of street and intersection prefabs)<br \/>\n\u2013 Intersections<br \/>\n\u2013 Streets<br \/>\n\u2013 Sidewalks<\/p>\n<p>Generally, you place intersections on the terrain, and then connect those intersections via streets. Each intersection has a customizable number of connection points (known as intersection edges), which can be moved and resized. So you can have a 3 way intersection, 4 way intersection, and so on. Think of intersections more as \u201cplaces where streets meet up\u201d than \u201cplaces where cars would stop\u201d. For instance, in StreetMkr the place where a highway onramp\/offramp meets the highway itself would be considered an intersection, even though cars aren\u2019t stopping there (hopefully!).<\/p>\n<p>Streets are defined as curves connecting intersection edges, with however many control points are desired.<\/p>\n<p>You can also specify that streets have sidewalks, which are automatically generated, and the various properties of the sidewalk (width, height, etc.). Connecting sidewalks between streets is done automatically.<\/p>\n<p>That\u2019s all pretty jargony. Basically, you put down intersections and then connect them via streets, and customize things as you go along. Almost everything is changable, so StreetMkr can easily be used to prototype how you want a city layout to look, along with also giving you a usable set of meshes for the final product.<\/p>\n<p>While I won\u2019t make a direct comparison, imagine if you could play certain well-known city building games within your Unity editor. It\u2019s not quite like that, but that level of ease-of-use is the intent. The idea is to be able to layout a city very easily by thinking about how your city connects.<\/p>\n<h3>Getting Started<\/h3>\n<p>Right. So let\u2019s make a city.<\/p>\n<p>First thing we need to do is make a Terrain. Street networks are always attached to terrains. In the future we\u2019ll allow for arbitrary meshes, or groups of terrains, but we\u2019re not quite there yet.<\/p>\n<p>After you create a terrain that you\u2019re satisfied with, we need create a \u201cStreet Network\u201d. This can simply be done by going to the menu: \u201cGameObject-&gt;Create Other-&gt;Street Network\u201d.<\/p>\n<p>Now that you have a Street Network object in your scene, you need to attach it to the terrain. Go to the \u201cHiearchy\u201d window, and drag the \u201cStreet Network\u201d on top of the Terrain, making the Street Network a child. It should now recognize that it\u2019s attached to the Terrain.<\/p>\n<p>The next step is you need to give the Street Network a \u201ctheme\u201d. Currently, there\u2019s only one theme bundled, although there\u2019s no reason you can\u2019t make more! Each theme is a single prefab. In the project window, navigate to \u201cStreetMkr\/Themes\/Default Theme\u201d. Drag the Default Theme into the appropriate receiver in the inspector for the Street Network.<\/p>\n<p>The theme object essentially defines what street and intersection objects are available in your street network, so if you want to make a new street type available in your scene you\u2019ll want to add it to the theme you\u2019re using.<\/p>\n<p>Now that you have a theme attached, a toolbar should appear in the inspector window when the street network is selected. At the moment it consists of four tools:<\/p>\n<p>[ Hand (Select\/Move) ] [ Add Intersection ] [ Add Street ] [ Add Street Node ]<\/p>\n<p>The hand tool allows you to select and drag around intersections. The Add Intersection tool does about what you\u2019d expect it to do, adding an intersection wherever you click. Add Street will connect two intersections, by clicking on one edge node, and then clicking on another. Keep in mind that a street *cannot exist independent of intersections*. A street always exists between two intersections. You can indeed use a street to connect an intersection to itself, although this is rarely useful. (But not entirely useless either.) Add Intersection and Add Street both work off what prefab is selected below them when the tool is active (you\u2019ll see a modal toolbar with the various intersection\/street options).<\/p>\n<p>\u201cAdd Street Node\u201d allows you to customize a street further. By default a street is a simple curve, although you can add nodes in the middle to further define it\u2019s shape. Although you can place nodes anywhere, you should keep in mind that sharp curves tend to result in funky geometry. (Not to mention dangerous roads!) It\u2019s better to keep your streets smooth and relaxed. If you want a really sharp turn, it\u2019s generally better to create an intersection than it is to pinch a road at a sharp angle.<\/p>\n<p>Selecting any of the streets or intersections in this mode will update the inspector to allow you to change general properties about each selected thing.<\/p>\n<p>The street network is the \u201chigh level\u201d editor, which generally lets you edit anything, although if you were to select each street or intersection individually in the scene hiearchy, they have editors that are scoped to that particular object which act similar (but not exactly the same) as the high level street editor. For instance, if you have an intersection object selected, you can drag around its intersection edges, along with adding or removing new edges.<\/p>\n<p>All intersections can be moved and rotated, but not scaled. Streets themselves cannot be moved or rotated, as their location is defined in terms of their connecting intersections (however, the nodes within the street can be moved, though not rotated.) It\u2019s generally easiest to think of movement as being 2D along the heightmap. This isn\u2019t exactly true, but it\u2019s \u201ctrue enough\u201d to be a useful mental model.<\/p>\n<p>All streets and intersections will try their best to conform to the terrain they\u2019re on. Occasionally, you\u2019ll see z-fighting or geometry clipping through. There are a few things you can do to help address this:<br \/>\n* Adjust the \u201cheight offset\u201d on the connecting intersections upwards. You want to be careful here not to get carried away, but this generally helps quite a bit.<br \/>\n* Adjust the \u201cDetail Bias\u201d on the road itself. This helps more with clipping than with z-fighting. Essentially this creates more geometry, which samples the terrain more frequently.<br \/>\n* Use a material shader with a higher z-offset or delayed rendering.<\/p>\n<\/div>\n<div class=\"postComments\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"lowerfooterbg\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>StreetMkr For Unity About StreetMkr is designed to provide an easy what-you-see-is-what-you-get interface for laying out city streets and sidewalks, while allowing for a great deal of customizability and modifiability. StreetMkr also helps to bootstrap the design process by allowing the import of OpenStreetMap data, making it easy to import entire towns. Basic Concepts StreetMkr<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-13","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"http:\/\/www.streetmkr.com\/index.php?rest_route=\/wp\/v2\/pages\/13","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.streetmkr.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/www.streetmkr.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/www.streetmkr.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.streetmkr.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=13"}],"version-history":[{"count":3,"href":"http:\/\/www.streetmkr.com\/index.php?rest_route=\/wp\/v2\/pages\/13\/revisions"}],"predecessor-version":[{"id":23,"href":"http:\/\/www.streetmkr.com\/index.php?rest_route=\/wp\/v2\/pages\/13\/revisions\/23"}],"wp:attachment":[{"href":"http:\/\/www.streetmkr.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=13"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}