<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Vehicle placement on CityEngine-generated streets. in ArcGIS CityEngine Questions</title>
    <link>https://community.esri.com/t5/arcgis-cityengine-questions/vehicle-placement-on-cityengine-generated-streets/m-p/246148#M3245</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;ah, sorry, yes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;With Python, I can directly create the JavaScript code ( basically just a text output ) which creates the code you quoted, looping over all markers CE finds.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;when you can post 1 example that runs with the correct syntax ( e.g. vector definition ), I can make the code generic and directly feed the positions.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Aug 2012 14:02:57 GMT</pubDate>
    <dc:creator>MatthiasBuehler1</dc:creator>
    <dc:date>2012-08-17T14:02:57Z</dc:date>
    <item>
      <title>Vehicle placement on CityEngine-generated streets.</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/vehicle-placement-on-cityengine-generated-streets/m-p/246137#M3234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello again &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am beginning to create driving scenarios for a driving simulator. (For example, on a highway you are traveling at 70mph when suddenly the vehicle in front of you applies the brakes hard). I see that CE uses some mechanism for placing the cars on the roads neatly between the lines (Even on curved roads).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am hoping that I can use your algorithm for my AI-driven cars. I assume it has something to do with the street network edges as well as the particular attributes of the street?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help would be wonderful!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Josh&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Aug 2012 13:24:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/vehicle-placement-on-cityengine-generated-streets/m-p/246137#M3234</guid>
      <dc:creator>JoshWade</dc:creator>
      <dc:date>2012-08-07T13:24:19Z</dc:date>
    </item>
    <item>
      <title>Re: Vehicle placement on CityEngine-generated streets.</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/vehicle-placement-on-cityengine-generated-streets/m-p/246138#M3235</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;hi !&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;the vehicles are actually placed 'geometrically'. for this, the streets are split according to their UV coordinates. First into lanes and medians, then into smaller segments, on which the cars are inserted.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;at the current state, CityEngine has no actual lane information available to work with. Thus, all cars you see are simply placed 'randomly'.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;for a driving simulator, what you could do is 'create some metadata' which lets you recreate the curve network for use in your simulator, using Python scripting.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;but for this, I'd of course need to know what your simulator needs as input data.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Aug 2012 13:27:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/vehicle-placement-on-cityengine-generated-streets/m-p/246138#M3235</guid>
      <dc:creator>MatthiasBuehler1</dc:creator>
      <dc:date>2012-08-15T13:27:53Z</dc:date>
    </item>
    <item>
      <title>Re: Vehicle placement on CityEngine-generated streets.</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/vehicle-placement-on-cityengine-generated-streets/m-p/246139#M3236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the reply! &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have begun to incorporate the Unity plugin called iTweens into my project. It requires an array of nodes (which are just 3d vector coordinates x,y,z). I would like to dynamically create nodes along the street that are properly on and above the street so that my AI car can drive on it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;These nodes would form a path (even on curved streets) which would then be stored in an array to be used by iTweens.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Aug 2012 21:02:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/vehicle-placement-on-cityengine-generated-streets/m-p/246139#M3236</guid>
      <dc:creator>JoshWade</dc:creator>
      <dc:date>2012-08-15T21:02:20Z</dc:date>
    </item>
    <item>
      <title>Re: Vehicle placement on CityEngine-generated streets.</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/vehicle-placement-on-cityengine-generated-streets/m-p/246140#M3237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;hi !&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;so you just need the position of those nodes and the curve network is created by that iTween system ? did I understand this correctly ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;because if that's the case, your main task is 'just' to report those markers, which is not too hard in CE.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;lemme know. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Aug 2012 13:02:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/vehicle-placement-on-cityengine-generated-streets/m-p/246140#M3237</guid>
      <dc:creator>MatthiasBuehler1</dc:creator>
      <dc:date>2012-08-16T13:02:23Z</dc:date>
    </item>
    <item>
      <title>Re: Vehicle placement on CityEngine-generated streets.</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/vehicle-placement-on-cityengine-generated-streets/m-p/246141#M3238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes that is correct. I just need to know the coordinates of the nodes the street. I assume that I can create 'lanes' via displacing the nodes in the path in some direction or another.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How do I go about finding/accessing/utilizing these markers?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-josh&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Aug 2012 14:17:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/vehicle-placement-on-cityengine-generated-streets/m-p/246141#M3238</guid>
      <dc:creator>JoshWade</dc:creator>
      <dc:date>2012-08-16T14:17:57Z</dc:date>
    </item>
    <item>
      <title>Re: Vehicle placement on CityEngine-generated streets.</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/vehicle-placement-on-cityengine-generated-streets/m-p/246142#M3239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;- are you using the modern streets example for your street models ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- which version of CityEngine do you have ? Advanced ( PRO ) ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;because you need Python Scripting to write that metadata out.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;lemme know.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Aug 2012 14:20:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/vehicle-placement-on-cityengine-generated-streets/m-p/246142#M3239</guid>
      <dc:creator>MatthiasBuehler1</dc:creator>
      <dc:date>2012-08-16T14:20:58Z</dc:date>
    </item>
    <item>
      <title>Re: Vehicle placement on CityEngine-generated streets.</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/vehicle-placement-on-cityengine-generated-streets/m-p/246143#M3240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have Advanced 64 Bit (2011.2) for Windows 7 OS. The example I'm using is the Philadelphia model (4 copies to create one very large version, but with different rule file attributes to create variation). The street network has been modified slightly in the original section of the city, but the networks in the surrounding quadrants are entirely different.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Aug 2012 14:33:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/vehicle-placement-on-cityengine-generated-streets/m-p/246143#M3240</guid>
      <dc:creator>JoshWade</dc:creator>
      <dc:date>2012-08-16T14:33:46Z</dc:date>
    </item>
    <item>
      <title>Re: Vehicle placement on CityEngine-generated streets.</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/vehicle-placement-on-cityengine-generated-streets/m-p/246144#M3241</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've played a little with the Philly code to produce some visible markers on the lanes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;what you could do now is report those positions and create some script code for UNITY ( BOO / JScript ) that produces your markers in all those locations.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Though the driving direction and the precise linking of lanes over the crossroads must be done manually, or if possible within that system you use. CE cannot really help there efficiently.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Let me know what you think.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;matt&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ps. of course you can get the code, but let's first find the workflow.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Aug 2012 15:01:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/vehicle-placement-on-cityengine-generated-streets/m-p/246144#M3241</guid>
      <dc:creator>MatthiasBuehler1</dc:creator>
      <dc:date>2012-08-16T15:01:24Z</dc:date>
    </item>
    <item>
      <title>Re: Vehicle placement on CityEngine-generated streets.</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/vehicle-placement-on-cityengine-generated-streets/m-p/246145#M3242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes! &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt; This is fantastic. If I am able to successfully produce corresponding points in Unity using these markers, then this is exactly what I need. I can figure out some way to determine direction and network connectivity later on.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What shall I do in terms of Python and creating these markers?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Aug 2012 16:44:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/vehicle-placement-on-cityengine-generated-streets/m-p/246145#M3242</guid>
      <dc:creator>JoshWade</dc:creator>
      <dc:date>2012-08-16T16:44:29Z</dc:date>
    </item>
    <item>
      <title>Re: Vehicle placement on CityEngine-generated streets.</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/vehicle-placement-on-cityengine-generated-streets/m-p/246146#M3243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;cool so far then.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I guess we're faster if I quickly write the code down, then pass the stuff on for refinement.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;can you find me a line of code which creates such a marker via code ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;pseudo code :&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;putStreetMarker(x,y,z)&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;then I could create directly the text you can run which produces all markers for you.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;let me know ..&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Aug 2012 08:01:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/vehicle-placement-on-cityengine-generated-streets/m-p/246146#M3243</guid>
      <dc:creator>MatthiasBuehler1</dc:creator>
      <dc:date>2012-08-17T08:01:01Z</dc:date>
    </item>
    <item>
      <title>Re: Vehicle placement on CityEngine-generated streets.</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/vehicle-placement-on-cityengine-generated-streets/m-p/246147#M3244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;When you say to find a line of code to create the marker, do you mean on the Unity side of things? I suppose it would depend on how the street marker data was created/stored. If the markers were each individual gameObjects, then something like the following could be used to instantiate Vector3 objects at each marker: (JavaScript)&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var marker : Vector3; //vector to hold xyz points of marker
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; marker = transform.Find("marker_id#").position; //supposing that street markers each have a unique id
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Once all of the necessary markers have been instantiated, they can be used by iTween for path following.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:15:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/vehicle-placement-on-cityengine-generated-streets/m-p/246147#M3244</guid>
      <dc:creator>JoshWade</dc:creator>
      <dc:date>2021-12-11T12:15:47Z</dc:date>
    </item>
    <item>
      <title>Re: Vehicle placement on CityEngine-generated streets.</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/vehicle-placement-on-cityengine-generated-streets/m-p/246148#M3245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;ah, sorry, yes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;With Python, I can directly create the JavaScript code ( basically just a text output ) which creates the code you quoted, looping over all markers CE finds.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;when you can post 1 example that runs with the correct syntax ( e.g. vector definition ), I can make the code generic and directly feed the positions.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Aug 2012 14:02:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/vehicle-placement-on-cityengine-generated-streets/m-p/246148#M3245</guid>
      <dc:creator>MatthiasBuehler1</dc:creator>
      <dc:date>2012-08-17T14:02:57Z</dc:date>
    </item>
    <item>
      <title>Re: Vehicle placement on CityEngine-generated streets.</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/vehicle-placement-on-cityengine-generated-streets/m-p/246149#M3246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for all your help so far, by the way!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is a potential class definition for a Marker object:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
public class Marker {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* MEMBER DATA */
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public var m_vector : Vector3; //coordinates
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public var m_id : int; //unique id for each marker

}
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then this function (effectively a constructor) might be applicable:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
function instantiateMarker ( x : float, y : float, z : float, id : int) {

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var markerObj : Marker;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; markerObj = new Marker();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; markerObj.m_vector = new Vector3(x,y,z);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; markerObj.m_id = id;

}
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:15:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/vehicle-placement-on-cityengine-generated-streets/m-p/246149#M3246</guid>
      <dc:creator>JoshWade</dc:creator>
      <dc:date>2021-12-11T12:15:50Z</dc:date>
    </item>
    <item>
      <title>Re: Vehicle placement on CityEngine-generated streets.</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/vehicle-placement-on-cityengine-generated-streets/m-p/246150#M3247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;so that'd be the result of what CE produces for the markers :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1 street segment with 3 lanes, 4 marker points per lane ( 12 in total )&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;instantiateMarker ( 820207.073822,9.48134291172,-72516.0204315,0);
instantiateMarker ( 820207.073822,9.48134291172,-72516.0204315,1);
instantiateMarker ( 820207.073822,9.48134291172,-72516.0204315,2);
instantiateMarker ( 820207.073822,9.48134291172,-72516.0204315,3);
instantiateMarker ( 820207.073822,9.48134291172,-72516.0204315,4);
instantiateMarker ( 820207.073822,9.48134291172,-72516.0204315,5);
instantiateMarker ( 820207.073822,9.48134291172,-72516.0204315,6);
instantiateMarker ( 820207.073822,9.48134291172,-72516.0204315,7);
instantiateMarker ( 820207.073822,9.48134291172,-72516.0204315,8);
instantiateMarker ( 820207.073822,9.48134291172,-72516.0204315,9);
instantiateMarker ( 820207.073822,9.48134291172,-72516.0204315,10);
instantiateMarker ( 820207.073822,9.48134291172,-72516.0204315,11);&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;now I assume you run your general CE exports with the offset correction to center the dataset around the cartesian origin in Unity. Once you know that XZ offset, this could be subtracted from the results which you get by the reports.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;of course you could run this twice, once just for the right lanes, once just for the left lanes. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;let me know what you think so far.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:15:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/vehicle-placement-on-cityengine-generated-streets/m-p/246150#M3247</guid>
      <dc:creator>MatthiasBuehler1</dc:creator>
      <dc:date>2021-12-11T12:15:53Z</dc:date>
    </item>
    <item>
      <title>Re: Vehicle placement on CityEngine-generated streets.</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/vehicle-placement-on-cityengine-generated-streets/m-p/246151#M3248</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;&lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt; Excellent! Thank you, this seems exactly what I need. And I will be able to run this Python script on my street network (maybe twice for differentiation between left and right lanes) to generate the appropriate points, correct? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I will be centering the points according to Unity's origin. This probably will not be an problem: I can write a script to modify the values according to the level of displacement that occurs.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The example that you have shown me produces 4 points per lane. Will I be able to modify that value if necessary to something higher or lower?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Aug 2012 17:43:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/vehicle-placement-on-cityengine-generated-streets/m-p/246151#M3248</guid>
      <dc:creator>JoshWade</dc:creator>
      <dc:date>2012-08-17T17:43:15Z</dc:date>
    </item>
    <item>
      <title>Re: Vehicle placement on CityEngine-generated streets.</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/vehicle-placement-on-cityengine-generated-streets/m-p/246152#M3249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;hi !&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;it uses a distance attribute, thus places markers approximately that distance apart from each other. this example just produced 4.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'll wrap up the code and post here.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Aug 2012 07:19:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/vehicle-placement-on-cityengine-generated-streets/m-p/246152#M3249</guid>
      <dc:creator>MatthiasBuehler1</dc:creator>
      <dc:date>2012-08-20T07:19:40Z</dc:date>
    </item>
    <item>
      <title>Re: Vehicle placement on CityEngine-generated streets.</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/vehicle-placement-on-cityengine-generated-streets/m-p/246153#M3250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;edit the code around line 240 :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1] note the MakeLaneMarkers shape copy after the Vehicles().&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2] add the code for the marker creation and position reports&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;Streetsides --&amp;gt;&amp;nbsp; case calcNbrOfLanes &amp;lt; 1.1 : Asphalt&amp;nbsp; case Nbr_of_left_lanes == 0 &amp;amp;&amp;amp; Nbr_of_right_lanes == 0: &amp;nbsp; split(v,unitSpace,0){ ~calcLanesLeft&amp;nbsp;&amp;nbsp;&amp;nbsp; : Lanes(calcNbrOfLanes,connectionEnd,0) Vehicles(0) MarkerCreation("left") &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | Median_width&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : Median &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | ~calcLanesRight&amp;nbsp;&amp;nbsp; : scaleUV(0,-1,-1) Lanes(calcNbrOfLanes,connectionStart,2) Vehicles(2) MarkerCreation("right") }&amp;nbsp; else: &amp;nbsp; split(v,unitSpace,0){ ~Nbr_of_left_lanes : Lanes(Nbr_of_left_lanes,connectionEnd,0) Vehicles(0) MarkerCreation("left") &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | Median_width&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : Median &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | ~Nbr_of_right_lanes : scaleUV(0,-1,-1) Lanes(Nbr_of_right_lanes,connectionStart,2) Vehicles(2) MarkerCreation("right")}&amp;nbsp; @Range ( "all", "left", "right") @Group("MARKERS") attr markerOutput = "all"&amp;nbsp; MarkerCreation(side) --&amp;gt;&amp;nbsp; case markerOutput == "all" : &amp;nbsp; MakeLaneMarkers&amp;nbsp; case markerOutput == side : &amp;nbsp; MakeLaneMarkers&amp;nbsp; else : &amp;nbsp; NIL&amp;nbsp; MakeLaneMarkers --&amp;gt;&amp;nbsp; color(1,0,0)&amp;nbsp; t (0,.1,0)&amp;nbsp; split(v,unitSpace,0) { ~Lane_width : LaneShape }*&amp;nbsp; LaneShape --&amp;gt;&amp;nbsp; split(v,unitSpace,0) { ~1 : NIL | markerDim : LaneCenterLine | ~1 : NIL }&amp;nbsp; markerDim = 0.25 markerDist = 15&amp;nbsp; LaneCenterLine --&amp;gt;&amp;nbsp; split(u,unitSpace,0) {{ markerDim : LaneMarker | ~ markerDist : NIL }* | markerDim : LaneMarker }&amp;nbsp; LaneMarker --&amp;gt;&amp;nbsp; report("markerPosX", convert(x, scope, world, pos, 0.5 * scope.sx, 0.5 * scope.sy, 0.5 * scope.sz))&amp;nbsp; report("markerPosY", convert(y, scope, world, pos, 0.5 * scope.sx, 0.5 * scope.sy, 0.5 * scope.sz))&amp;nbsp; report("markerPosZ", convert(z, scope, world, pos, 0.5 * scope.sx, 0.5 * scope.sy, 0.5 * scope.sz))&amp;nbsp; X. # NIL&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now once you generate a street, you should get the reports in the Inspector's Reports tab.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To grab those and produce your java script code :&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1] copy the attached .py script to your scripts folder&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2] run the Script Based Exporter ( Python ), where you select the new script under the Misc options, then run it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3] open the console ( Python output ) and get your code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To adapt the offset, just copy paste your export offset values and edit the Python script accordingly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I also just added the lane direction switch called (markerOutput).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Note also that now, the markers are produced as geometry, thus you may want to NIL it as commented out in the last line after the reports ( X. # NIL )&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;let me know if it works on your machine too. &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Aug 2012 07:38:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/vehicle-placement-on-cityengine-generated-streets/m-p/246153#M3250</guid>
      <dc:creator>MatthiasBuehler1</dc:creator>
      <dc:date>2012-08-20T07:38:51Z</dc:date>
    </item>
    <item>
      <title>Re: Vehicle placement on CityEngine-generated streets.</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/vehicle-placement-on-cityengine-generated-streets/m-p/246154#M3251</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Okay, It seems to be working now! Thank you for your help with this. I will let you know if I have any problems.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Aug 2012 18:52:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/vehicle-placement-on-cityengine-generated-streets/m-p/246154#M3251</guid>
      <dc:creator>JoshWade</dc:creator>
      <dc:date>2012-08-20T18:52:36Z</dc:date>
    </item>
    <item>
      <title>Re: Vehicle placement on CityEngine-generated streets.</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/vehicle-placement-on-cityengine-generated-streets/m-p/246155#M3252</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Matthias,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm looking at the output more closely now and I'm confused about something. Why are there several markers with the same coordinates, but with different id's? In the example that you posted above, the same thing occurs.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What does it mean?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Aug 2012 19:51:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/vehicle-placement-on-cityengine-generated-streets/m-p/246155#M3252</guid>
      <dc:creator>JoshWade</dc:creator>
      <dc:date>2012-08-20T19:51:49Z</dc:date>
    </item>
    <item>
      <title>Re: Vehicle placement on CityEngine-generated streets.</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/vehicle-placement-on-cityengine-generated-streets/m-p/246156#M3253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;hmm. I did not test it that thoroughly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;but I assume there's a little issue with the indices in the loop which grabs the corresponding coordinates.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I guess I'd be faster debugging this than you, so I'll try to find the issue.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;sry for that .. I'm not a developer .. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2012 07:36:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/vehicle-placement-on-cityengine-generated-streets/m-p/246156#M3253</guid>
      <dc:creator>MatthiasBuehler1</dc:creator>
      <dc:date>2012-08-21T07:36:46Z</dc:date>
    </item>
  </channel>
</rss>

