Search Unity

  1. Calling all beginners! Join the FPS Beginners Mods Challenge until December 13.
    Dismiss Notice
  2. It's Cyber Week at the Asset Store!
    Dismiss Notice

EasyRoads3D v3 - the upcoming new road system

Discussion in 'Works In Progress' started by raoul, Feb 19, 2014.

  1. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,721
    Hi Kevin,

    I just tested the system in the latest 2012.2 version we have installed, 2019.2.11f1 and also in Unity 2019.3. It works fine. So I would think the problem is not related to 2019.2.12f1.

    Your prefab is quite complex. The Custom Connection Prefab system is more intended for smaller single flat connections but there is no polygon count limit.

    One thing that may need attention is that it appears that the motorway section remains at the same height still being higher on the outer sides is then then the smaller road that crosses below the bridge. The final Custom Connection prefab is setup in a way that y = 0 represents the terrain height. The terrain will be flattened relative to that position. This means that the motorway start / end will probably end up floating above the terrain.

    Could you send the prefab to us so we can test it also regarding the error?

    Thanks,
    Raoul
     
  2. RitteK

    RitteK

    Joined:
    May 31, 2016
    Posts:
    6
    Hi Raoul,

    Yes, of course I can do this, but this is only a simple version without material, a UV hi t it but the rest is not yet ready. I will finish it in the course of the day and send it to you, in distress I build the section differently that I once have the lower part and the upper part. Because I also noticed if I have 2 connection points side by side so there is also an error at terrain adjust, if I turn this off abed it goes.

    How are you right to load the files as zip or rar. About a private server or more public?
     
  3. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,721
    Hi Kevin,

    The material is not so important, it is more about the model / prefab. Regarding the upload, what you prefer. You could for example start a Private Conversation and upload the file. That should work well if no materials are involved.

    Yes, parallel roads are tricky. Between the two roads at least two terrain points must exist in order to flatten the terrain correctly.

    Auto generated workarounds for that will soon be available in the upcoming new v3.2 beta with also support for tunnels in Unity 2019.3.

    Thanks,
    Raoul
     
  4. Andreas12345

    Andreas12345

    Joined:
    Oct 17, 2013
    Posts:
    395
    I try this first today!
    Code (CSharp):
    1. The folder /Assets/EasyRoads3D/Shaders/ contains 6 different depth offset shaders to make sure the road is rendered on top of the terrain. When using a low Field of View on the camera you may still encounter some z-fighting. In this case open the respective shader and tweak the two Offset factor and unit parameters (just below LOD) further downwards.
    ^^ I read this on yours site :)


    Thats weird, with the new Version i have more Z-fighting issues than before.
    Especially when i build my road network (50 Km), i got at much area Z-fighting where the terrain blends through.
    I use GAIA-Pro with CTS Shader. I set the network height "Raise 0.05") But still it is popping through the roads.

    Smaller road examples are working...

    I use a Terrain 4096x4096 and a resolution of 2048 and camera near is 0,3

    Any ideas?

    I can export the terrain and reimport as a mesh, have anybody experience with that?
     
    Last edited: Nov 28, 2019
  5. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,721
    Hi Andreas,

    Which shader do you use? Most shaders have this Offset option now directly available in the Inspector.

    But I am not sure if that is related. Do you mean the new v3.1.9 version or the new Unity version? There are no changes to the terrain deformation process in 3.1.9

    Is 50km covered by a single 4096x4096 terrain or about 12x12 terrains size 4096x4096? You do have a large road network. Is this noticeable everywhere or generally more further away from the origin (0,0,0)?

    Thanks,
    Raoul
     
    Andreas12345 likes this.
  6. Andreas12345

    Andreas12345

    Joined:
    Oct 17, 2013
    Posts:
    395
    I mean the the new v3.1.9 of EasyRoads3D

    My Terrain a single 4096x4096 and it is noticable everywhere.
    I test tonigh the depthValues of the shader. ( I have not tried it yet)
    I report back :)
     
  7. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,721
    4096x2049.jpg

    This is a quick test on a 4096x4096 terrain size and 2049x2049 heightmap resolution, road network Raise level 0.02, Shader Offset values -1, -1. The purpose of the Offset is more for road sections further away from the cam where the terrain LOD system is active. It has almost no affect on the road when close to the cam.

    There is no visible z-fighting in the above example, nearby and further away.

    If you want you can send your scene to us so we can look at it.

    Thanks,
    Raoul
     
    Andreas12345 likes this.
  8. Andreas12345

    Andreas12345

    Joined:
    Oct 17, 2013
    Posts:
    395
    I will take a look first when i am @ home.
    I use your software for years :) I am sure its my fault.
     
  9. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,721
    It seems it is just not easily reproducible with the details currently known hence why I mentioned sending the scene, stripped to road network and terrain only if you want. :)
     
    Andreas12345 likes this.
  10. Andreas12345

    Andreas12345

    Joined:
    Oct 17, 2013
    Posts:
    395
    I was the wrong shader that was assigned!
    I created a new Material and just pushed it in the slot :)

    I said it, my fault :)
    Thanks for the good Documentation
     
    raoul likes this.
  11. RitteK

    RitteK

    Joined:
    May 31, 2016
    Posts:
    6
    Hi,

    Here I've made my freeway driveway different and although I have only taken a piece and created this in all 4 direction so that it also fits with the terrain, it is probably easier than what I had before, now I just have matching textures and such continue to create.

    because of the error I've already written in the email, if it is only up to me, I'll probably have to clean up something.

    here's the screen
     
    Andreas12345 likes this.
  12. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,721
    Hi Kevin,

    Splitting the initial model in pieces does give more control over terrain adjustments and indeed one section can be used in different directions. Let me know if there are still problems with this approach.

    Thanks,
    Raoul
     
  13. RitteK

    RitteK

    Joined:
    May 31, 2016
    Posts:
    6
    Hi Raoul, I will do as soon as there are any mistakes, I will then recreate some highway sections and then show them. If desired, I make the individual drive available for other users.
     
    raoul likes this.
  14. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,721
    The v3.2 beta with support for tunnels will be available next week.

    There are issue with the current Unity 2019.3 beta in OnDestroy() and when updating assets in the project folder. This does affect EasyRoads3D. Unity will crash after updating road type or side object settings and after deselecting the road network object.

    Hopefully this will be fixed. The v3.2 beta does include a temporary workaround.

    Here is a screen with auto generated rock tunnels blended with the terrain object.

    EasyRoads3D-Rock-Tunnel.jpg

    Thanks,
    Raoul
     
    Noa3, Rowlan and Andreas12345 like this.
  15. Andreas12345

    Andreas12345

    Joined:
    Oct 17, 2013
    Posts:
    395
    That are the holes we are waiting for :)
     
    raoul and Noa3 like this.
  16. donkey0t

    donkey0t

    Joined:
    Oct 23, 2016
    Posts:
    8
    Newbie road builder :) I'm using Easy Roads (v3.1.9.f1 release date: 22-11-2019) together with Vegetation Studio Pro (1.2.1.0) and I've turned on ER's Build Settings 'Remove Trees' but I've still got trees in the middle of the road. When I look at the road game object I don't see anything that looks like a Veg'Pro mask. What dumb mistake am I making? (I've pressed Build Terrain but not pressed Finalize).
     
  17. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,721
    Hi donkey0t,

    For Vegetation Studio the trees will already be removed in Edit Mode by Vegetation Studio based on the by EasyRoads3D generated masks.

    When Vegetation Studio is available in the project there will be Vegetation Studio specific perimeter controls for these masks in General Settings > Terrain Management.

    The same perimeter options can be adjusted afterwards per road type in General Settings > Road Types and for individual roads further below in the Inspector in the “Terrain Options” section.

    Thanks,
    Raoul
     
  18. noobynobody

    noobynobody

    Joined:
    May 9, 2019
    Posts:
    74
    How can I make cracked roads for an apocalyptic setting? Do I use Probuilder to edit the mesh?
     
  19. jbaujb

    jbaujb

    Joined:
    Oct 17, 2019
    Posts:
    3
    Can I use this with URP? I tried converting the materials but it doesn't seem to work.
     
  20. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,721
    Hi noobynobody,

    Are you lookig for truly cracked roads as part of the road mesh? For that indeed the generated meshes can be edited in a modelling app, like perhaps Probuilder.

    The HD Roads package, https://assetstore.unity.com/detail.../roads/easyroads3d-pro-add-on-hd-roads-118774 , does include cracked roads materials where the crack level can be customized.

    Thanks,
    Raoul
     
  21. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,721
    Hi jbaujb,

    Which materials did you try to convert? The Unity conversion tool only works with built-in shaders.

    The main difference is the Offset that is added, a single line that looks like Offset X, X where X is a negative value. The demo package does include some examples of more complex shaders. Are you referring to these shaders?

    The HD Roads package, also mentioned in my previous post above, does include HD RP and LW RP (URP in Unity 2019.3) versions. We are also looking into converting the demo package shaders shaders to HD RP and URP.

    Thanks,
    Raoul
     
  22. jbaujb

    jbaujb

    Joined:
    Oct 17, 2019
    Posts:
    3
    How do I create a Y section split? Like the drive way in the post above (#7661) by RitteK.

    Thanks.
     
  23. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,721
    Hi jbaujb,

    Y sections, flexible crossings, is being worked on. Betas are available on our website.

    The post by RitteK is Custom Prefab Editor related and involves motorway on / off ramps which require a different implementation. This too is being worked on. The Custom Prefab Editor system can be used to import your own crossing / connection meshes. Currently on / off ramps can be created that way.

    Unless both sides are part of the same road object, motorways are complex. They usually run parallel next to each other. This can easily result in terrain deformation issues if not enough terrain points are available. The current schedule is to first take care of these situations in an automated way. This also includes various other new features like support for tunnels in Unity 2019.3. A first beta will be available this week. After that the update with the new crossing options will follow.

    Thanks,
    Raoul
     
  24. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    366
    Odd situation regarding lane data

    I have a scene with 50+ roads and associated connections. I have some code to get the lane data (for ECS, as you know) and for 5 roads the following code returns zero lanes

    Code (CSharp):
    1.  
    2. foreach (ERRoad road in roads)
    3. {
    4.  
    5.     int lanes = road.GetLaneCount();
    6.  
    7.     for (int lane = 0; lane < lanes; lane++)
    8.     {
    9.            ERLaneData erLaneData = road.GetLaneData(lane);
    10.            Vector3[] roadLanePoints = erLaneData.points;
    11.            var erConnectionEnd = road.GetConnectionAtEnd(out connectionIndexEnd);
    12.            ERLaneConnector[] laneConnectors = erConnectionEnd.GetLaneData(connectionIndexStart, erLaneData.laneIndex);
    13.  
    14.            if (laneConnectors.Length == 0)
    15.            {
    16.                Debug.Log("no connection on: " + road.GetName());
    17.            }
    18.     }
    19. }
    20.  
    So this works most of the time, cool. And I look at the connections on the specific roads and they SEEM to have all connections. I have "Reset Lane Connectors" on all affected roads, and that had no affect.

    Any thoughts?

    EDIT: Just noticed that one, just one, of the roads is having the "ERLaneConnector[] laneConnectors = erConnectionEnd.GetLaneData(connectionIndexStart, erLaneData.laneIndex);" coming back as null. That road is the only one that has a 3 point connection. See image here: https://imgur.com/a/KKCmFqD
     
    Last edited: Dec 3, 2019 at 3:12 PM
  25. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,721
    Hi James,

    It is hard to comment on this only by looking at code.
    Do you mean that when selecting this connection the generated lane data is clearly visible on the connection? The image only shows a small section of a road network where a single road section is selected. Have you tried selecting that specific connection through the road network. When "Display Lane Data" in General Settings > Scene Settings is active, the lane data will be visible. And if there are indeed outgoing lanes visible at the connection where the specific road is attached, then this line:

    ERLaneConnector[] laneConnectors = erConnectionEnd.GetLaneData(connectionIndexStart, erLaneData.laneIndex);

    Should return that data. Would it be possible to look at this if that is not the case?

    Thanks,
    Raoul
     
  26. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    366
    Raoul,

    Here are a couple images of one of the roads and it's connections. https://imgur.com/a/havX60C

    Specifically it is showing that lane 2 has no lanes (Debug.Log("road with no lanes " + road.GetName() + " lane" + erLaneData.laneIndex);)

    So yea, I can see the Connection's lanes in the Scene view, but when I run my code on one specific lane it comes back with no lane data.

    I'm starting to think it has to do with when I am getting the road's Start and End connection, and then always using "connectionIndexStart" when I get "laneConnectors"


    if (erLaneData.direction == ERLaneDirection.Left)
    {
    erConnectionEnd = road.GetConnectionAtStart(out connectionIndexStart);
    erConnectionStart = road.GetConnectionAtEnd(out connectionIndexEnd);
    }
    else
    {
    erConnectionEnd = road.GetConnectionAtEnd(out connectionIndexEnd);
    erConnectionStart = road.GetConnectionAtStart(out connectionIndexStart);
    }

    ERLaneConnector[] laneConnectors = erConnectionEnd.GetLaneData(connectionIndexStart, erLaneData.laneIndex);
     
  27. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,721
    I can see your code but I have no frame of reference I can compare it with.

    First thoughts, sorry for asking, the image shows one connection. Since the previous code returned "No Lanes" specifically for the end connection, is there potentially a crossing on the other end of that road with no lane data?

    Is this a consistent issue that can be replicated? In that case, what are the steps?

    Otherwise, would it be possible to have a look at this?

    Thanks,
    Raoul
     
  28. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    366
    Yes this is reproducible.

    I will compress the project and upload it to my site for your review. I'll send you a DM when it's upload is completed.
     
    raoul likes this.
  29. Andreas12345

    Andreas12345

    Joined:
    Oct 17, 2013
    Posts:
    395
    Hmm after an upgrade of an old Project i get an: upload_2019-12-4_13-8-43.png

    It is v3.1.9.f1 and unity Version is 2019.2.12f1
     
  30. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,721
    Hi Andreas12345,

    How old is the project? What was the previous version in this project?

    CreateEasyRoads3Dv3Object() in the error message does not exist in the current version.

    Thanks,
    Raoul
     
  31. Andreas12345

    Andreas12345

    Joined:
    Oct 17, 2013
    Posts:
    395
    I think the old one was 3.1, not sure anymore :)
    But what working was that i copy an existing roadNetwork in my new scene.
    The Project i update is from 2018.4.5 to 2019.2.12f1
    I need to investigate more.

    The upgrade ReadMe was saying, "do the update with an open ER Scene"
    I did it :)
     
  32. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,721
    At what stage do you get the error message? Does the package work well in a new scene? If you want you can send the project to us so we can look at it. Or only the EasyRoads3D folder so we can see the current status of which assets are imported.

    Where did you see that?

    This is from the Release Install Notes:

    ----------------------------------------------------------------------------

    IMPORTANT:

    To install this update in an existing EasyRoads3D project it is recommended to follow the next steps:

    1. Open a new scene if there is an EasyRoads3D Road Network object present in the currently open scene
    2. Simply import package updates over the existing install without first removing the previous package
    3. Open your scene

    ----------------------------------------------------------------------------

    This is more related to older Unity versions when an open scene could get corrupted after an upgrade. But I think it still is good practise, just like always backing up the project before an upgrade.

    Which version is displayed in the most right tab in The Inspector toolbar?

    Thanks,
    Raoul
     
    Last edited: Dec 4, 2019 at 1:24 PM
  33. Andreas12345

    Andreas12345

    Joined:
    Oct 17, 2013
    Posts:
    395
    upload_2019-12-4_14-29-10.png

    Are you on Discord?
     
  34. colin_young

    colin_young

    Joined:
    Jun 1, 2017
    Posts:
    74
    I have also been running into some interesting issues with lanes and connectors in my project (IIRC, ~400 roads, ECS). In my case it seems to manifest as what I'm going to call a connection loop, where e.g. Entity 352 is connected to Entity 353 which is connected to Entity 352... It might be an error in my code that creates the ECS graph structure, but I haven't had a chance to fully investigate, but I strongly suspect it has something to do with attempting to extract connection information.

    It might be helpful to create a custom inspector that can display the ERLaneConnector[] data in the editor. I may see if I have time tonight to do that
     
  35. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    366
    If you'd like I'm more than happy to share the code I have. I am planning to release it anyway. Just let me know.
     
  36. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,721
    I am not, but generally being able to look at it is the quickest way to solve a problem like this which appears to be package assets related. Could you create a package of the EasyRoads3D folder and email it to us? That way we can test your current setup after the upgrade from the older project.

    Thanks,
    Raoul
     
    Andreas12345 likes this.
  37. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,721
    @colin_young and @JamesWjRose I am currently looking at the project James kindly sent. I will report back.

    Thanks,
    Raoul
     
    colin_young and JamesWjRose like this.
  38. Andreas12345

    Andreas12345

    Joined:
    Oct 17, 2013
    Posts:
    395
    I will do later, because i can work right now.
     
  39. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,721
    Ok, also, what do you mean with copy an exisiting road network. What are the exact steps that result in the error?

    Thanks,
    Raoul
     
  40. colin_young

    colin_young

    Joined:
    Jun 1, 2017
    Posts:
    74
    Thanks! I still need to take a close look at the last bit of code you sent me. As I mentioned I think I'm taking a different approach to some of the data structures, so I don't know how comparable it will be, but I'm mostly using the same pattern as the AI traffic sample provided with ER3D (I'm pretty sure at least). I'm going to do a bit more digging tonight to see if I can figure out exactly what is going on in my code. I found a couple errors last night that eliminated some issues but not all. I was handling the opposite connecting lanes on I-connectors incorrectly, which was something I had to add because the original did not handle them. I would not be surprised if I've introduced additional issues, and trying to map from generated entities back to the original game objects is less simple than I'd like it to be.

    I too plan on releasing my code once it's complete-ish, and I'm also very interested to compare it with your final code to see what's similar and what's different and if one approach performs better than the other.
     
  41. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    366
    Yea, I hear that. After showing some other errors to Raoul he enlightened me to some items that might make my world easier. I'm going on vacation at the end of next week, so I am attempting to get this done by then. (fingers crossed)
     
    raoul likes this.
  42. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,721
    Hi Colin,

    Let me know if you still see any issues or if something is not clear.

    Thanks,
    Raoul
     
  43. colin_young

    colin_young

    Joined:
    Jun 1, 2017
    Posts:
    74
    I sorted out one of my issues: it was a basic vector math error (when calculating the direction using destination - current you need to normalize your vector before multiplying it by your distance scalar if you want the distance to be correct) compounded by a child offset (my spawners are all collected under an empty game object which was positioned at ~500,0, 54 which meant when I was calculating distance to lane points they were all about 500 units away from my vehicle). After fixing that, the next problem became immediately apparent which is I am not getting connector lane data for some of my roads. At least 2 of those roads only have connectors on one end. I did a regeneration of the road network, but the issue persists (for at least the same 2 roads).

    I'm including my code that gets the connector lane data:

    Code (CSharp):
    1. private static LaneInfo[] GetConnectorLaneData(ERRoad fromRoad, ERConnection conn, ERLaneConnector[] laneConnectors, ERLaneDirection laneDirection, int laneIndex)
    2.         {
    3.             var laneEdges = new LaneInfo[laneConnectors.Length];
    4.             var index = 0;
    5.  
    6.             foreach (var laneConnector in laneConnectors)
    7.             {
    8.                 // get the next road object attached to the end of this connection
    9.                 var road = conn.GetConnectedRoad(laneConnector.endConnectionIndex, out ConnectedTo connectedTo);
    10.  
    11.                 // Get lane points from this lane connector
    12.                 var points = laneConnector.points;
    13.  
    14.                 var targetSpeed = laneConnector.speedLimit;
    15.  
    16.                 // we're duplicating the road points for every connection to simplify the lane-following code
    17.                 LaneInfo laneInfo = ScriptableObject.CreateInstance<LaneInfo>();
    18.                 laneInfo.FromNode = GetRoadIndexName(laneDirection, fromRoad);
    19.                 laneInfo.ToNode = GetRoadIndexName(laneDirection, road);
    20.                 laneInfo.RoadPoints = fromRoad.GetLanePoints(laneIndex, laneDirection);
    21.                 laneInfo.RoadSpeed = fromRoad.GetSpeedLimit();
    22.                 laneInfo.ConnectorPoints = points;
    23.                 laneInfo.ConnectorSpeed = laneConnector.speedLimit;
    24.  
    25.                 laneEdges[index] = laneInfo;
    26.                 index++;
    27.             }
    28.  
    29.             return laneEdges;
    30.         }
    In that code I am assuming that endConnectionIndex always returns the correct end depending on traffic direction. That's how the points ordering appears to behave with road lane data.
     
  44. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,721
    Hi Colin,

    From the code it is not entirely clear which road connector lane data is missing. What exactly do you mean with "connector lane data" in this repect? ERLaneConnector data is crossing connection related.

    The only line that gets road lane points is:

    laneInfo.RoadPoints = fromRoad.GetLanePoints(laneIndex, laneDirection);

    But that is not ERLaneConnector related it is actually the road passed to the function. Or is this actually relkated to the connection, not to roads, the line:

    var points = laneConnector.points;

    In that case, just like with the code James posted, it would really help being able to look at specific situations where this happens although in your code the laneConnector does exist and should therefore have points.

    endConnectionIndex returns the crossing connection index at the end of the lane points. The crossing connection that this lane connects to. It is unrelated to traffic direction. ERLaneConnectorData for a connection index holds the outgoing lanes. Depending on the traffic direction (left- or right-hand driving) these are lanes on the left or right side of the road. But the endConnectionIndex is always the crossing connection index where the last lane point connects to.

    This is all beta, the scripting API traffic implementation is not yet documented. So please ask if something is unclear.

    Thanks,
    Raoul
     
    Last edited: Dec 5, 2019 at 7:40 AM
  45. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,721
  46. ibearjp

    ibearjp

    Joined:
    Sep 24, 2014
    Posts:
    11
    Sorry if this is a noob question, tried searching but can't find any result.
    Was wondering why i get the marker for side object sometimes and not at others? How do you get the markers to appears?
    Is there maker for end of side object too?

    Thanks a bunch!

    2019-12-05 21_17_20-Window.png
     
  47. colin_young

    colin_young

    Joined:
    Jun 1, 2017
    Posts:
    74
    Now that I'm reading that while not tired and about to go to sleep, I realize I selected the wrong function to paste. I will post the correct one later today. I think what is happening is, as you state, this method only gets called if the laneConnector exists, and the actual problem is farther up the call stack where I'm actually getting those connections. Also, I'm kind of using connection/connector/crossing interchangeably. To me it just means a change from one road to another, either an I-connector or a crossing.

    The bit that confuses me about the direction is that right now when I get the lane points for a road they are given to me in the correct order, but I am using right-hand driving. I don't know if that is the case if I set the traffic direction to left-hand driving; i.e. would I need to reverse the order of the point array in that case?

    I will also send you an export of my scene tonight. I am still hitting the occasional error when editing roads, although I've been concentrating on this traffic project for the last couple weeks so I haven't done a lot of road editing. I think there is still a bit of corruption happening.
     
  48. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,721
    Hi ibearjp,

    These are handles to tweak the start / end offsets of side objects similar to how this can be changed in the Inspector.

    Display of these handles is triggered by Ctrl + H. IThe specific side object should also be selected as the active side object in the Side Object dropdown of the selected marker in the Inspector.

    The slider will only appear for the start marker and the end marker. Regarding the end marker, when the side object is active on a marker it will be generated from the start of that marker until the end of that section. So to control the end offset please select the marker where that section starts.

    For the situation in the screenshot you could also set default start / end offsets in the Side Object Manager of this side object to avoid the overlap of your guardrail.

    Thanks,
    Raoul
     
    ibearjp likes this.
  49. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,721
    Hi Colin,

    Do you mean reverse points returned by ERLaneConnectors? That is not necessary, ERLaneConnectors are only build for outgoing lanes with a start point and an end point. For right-hand driving these will be the right lanes at the end of the road and the left lanes at the start of the road. For left-hand driving vice versa. The ERLaneConnector points for the specific lane index will always start where the road points end.

    That is always very much appreciated, thank you

    Raoul
     
  50. colin_young

    colin_young

    Joined:
    Jun 1, 2017
    Posts:
    74
    I mean for the road lane points. I know there was some code in the sample traffic script that checked the current lane left/right and the traffic direction left/right to determine if the connector was at the end or the start of the road. But do I need to worry about traffic direction when getting the lane points for a road? Or, are those automatically returned in the correct sequence depending on the direction of traffic?