Search Unity

World Building EasyRoads3D v3 - the upcoming new road system

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

  1. johnny77lee

    johnny77lee

    Joined:
    Jan 5, 2019
    Posts:
    10
    Hi Raoul ,

    I have a question about the Lane Line blink issue (Like the video "LaneLineBlink_in_Ubuntu").
    It seems just occurred when I build a execute package with ubuntu 14.04 and run it .

    Below is the Detail About the Lane Line Blink issue ,
    1. As my last question , I create a simulation environment(10 x 11 km) with easyroad v3.16 .
    2. When I run it with windows 10 , it seems work normally even I build it to an execute package
    3. When I build it to an execute package with ubuntu 14.04.5 , the Lane Line seems blink in the scrren

    Would you have any idea about how to fixed it ?

    Thanks
     

    Attached Files:

  2. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi johnny77lee,

    It is hard to see, the video seems like a still image, no camera movement at all, but there is indeed some blinking visible. It is hard to comment on this by only looking at a video.

    What is the setup of these decals? Does the same happen with the similar line markings in the HD Roads package in your specific project / scene? If not, then something must be different in the setup of these line marking decals.

    Thanks,
    Raoul
     
  3. Sound_Priest

    Sound_Priest

    Joined:
    Nov 7, 2013
    Posts:
    8
    In scene I already have old road network (not editable). I add HD addon -> create new road network-> it ask two question about add side objects and road types-> go to endless refresh...

    In case without HD pack i can add new road network in scene without this problem.

    AND can I add multiple road networks in scene or once only?
     
    Last edited: May 20, 2019
  4. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi Sound_Priest,

    The older road network must be the problem if it is not finalized. Currently only one road network object can.exist in a scene. It should give a warning when adding a new road network. Is this older road network fully functional?

    The HD Roads package requires the road types and side objects being imported first. Both the video and the manual mentions the steps to do this. "General Settings > Road Types > Import Road Types" and "Side Object Manager > Import Side Objects". Drop the HD Roads presets folder from the HD Roads root directory in the import window.

    Can you try that either through the road network that already exists in this scene or in a new scene with a new road network object.

    Thanks,
    Raoul
     
  5. imDanOush

    imDanOush

    Joined:
    Oct 12, 2013
    Posts:
    368
    This sounds great!! Keep up the good work.
     
  6. Kvazimado

    Kvazimado

    Joined:
    Oct 27, 2018
    Posts:
    5
    @raoul Hi!
    Please tell me what I'm doing wrong. When I place a road on my terrain, it can be either under it or above it. I bring the camera as close as possible, and still, the road is laid as you like, but as it should be. To generate a terrain using another asset - TerraLand
     
  7. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi Kvazimado,

    What are the steps you take?

    Creating the road network, adding roads etc., is done in Edit Mode. Unless the terrain is flat, the terrain will pop through the roads in some areas.

    In Build Mode (middle mountain tab in the Inspector > "Build terrain(s)" button) the terrain will be adjusted to the road network. You can switch back and forth between Edit Mode and Build Mode to see the final results.

    Thanks,
    Raoul
     
  8. Sound_Priest

    Sound_Priest

    Joined:
    Nov 7, 2013
    Posts:
    8
    1) Yep, looks like problem was in old road network in scene.

    2) In HD addon how can i change width of crossing prefabs?

    3) What means this white sphere on crossing prefabs?
     
    Last edited: May 21, 2019
  9. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi Sound_Priest,

    2) Do you mean the scale of the crossing prefab? The HD Roads crossing prefabs have a specific vertex layout with vertex colors which is used in the HD Roads shaders. These are crossing models imported in the system through the Custom Prefab system. So connection widths do not automatically adjust to road type widths like with built-in crossings. Instead this works like with ordinary unity prefabs, the source prefab in the project folder in /Assets/EasyRoads3D/Resources/custom prefabs/ can be scaled up or down.

    3) These handles are by default grey, they can be toggled on (white) and off by pressing the handle. When white the crossing prefab will rotate according the road angle of the road attached to this connection.

    Thanks,
    Raoul
     
  10. johnny77lee

    johnny77lee

    Joined:
    Jan 5, 2019
    Posts:
    10
    Hi Raoul ,

    I record a new video about the Lane Line Blink
    and the Settings of the Lane Line Mark is like "LaneLineSettings.jpg"
    It's duplicate from side object " Line Left Dotted " and change the x , y offset .
    In my Scene , I used the same settings for all roads (just different with x offset) .

    The lane line blink just occurred with the execute package build from unity editor with Ubuntu .
    If I used the Unity with Win10 build the execute package , the lane line never blink in the screen .
    (See the Video "LaneLine_win10")

    It just different with the execute package build from win10 & Ubuntu14.04 .

    So.....Would you have any idea about the lane line blink in the screen ?

    Thanks

    ps. I used the unity 2018.2.4f1 with win10 & Ubuntu14.04.5 , and create the scene in windows side .
    But I need to run execute package with ubuntu14.04.5 .
    So.....I copy the project with my scene to ubuntu side to build the execute package & run it .
     

    Attached Files:

  11. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi johnny77lee,

    This has a moving cam and what you see is most likely z-fighting, not in the Win video though. So this indeed appears to be Ubuntu related.

    The settings image shows the main settings in the Side Object Manager. This is a Procedural Mesh side object with Y Position set to 0.01. I can only assume the source mesh has a setup similar to, for example, the line markings in the HD Roads package?

    Important here is the setup of the material. Is it similar to the one in the HD Roads package or the line marking in the EasyRoads3D demo scene? I asked this before, what do these line markings look like in Ubuntu?

    Is this indeed more material / ubuntu related? And if this is a limitation related to Ubuntu, there are two things to try.

    1) Raise the line marking slightly more, "Y Position" in the side object manager
    2) Make the offset on the decal shader slightly stronger, a stronger negative Offset value in the Inspector of the material

    Thanks,
    Raoul
     
  12. Binary42

    Binary42

    Joined:
    Aug 15, 2013
    Posts:
    207
    Hi Raoul,

    im still struggling with OSM import. The problem i have is that i dont exactly get the dimensions of the area that gets exportet from the OSM site or another usecase maybe, i dont know anything about the OSM data at all. Thus the OSM data does not fit exactly to the terrain, gets skewed and scaled while it is mapped to whatever terrain dimensions are present. If i diddnt miss anything on how the import is supposed to work, could there be an option included to match the terrain dimensions to the OSM data? Or another way could be, if you import OSM data and there is no terrain present, instead of the error dialog it could ask to create a matching terrain.

    Thanks for your great Support!

    Maybe this comes in handy to calulate distances based on long/lat:
    http://www.movable-type.co.uk/scripts/latlong.html
     
    Last edited: May 22, 2019
  13. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi Binary42,

    Usually osm data is used together with terrains based on DEM data, that is at least how we use it. The coordinates are known and usually they are the same as the bounds of the osm data.

    With that setup and when using the default settings, the Global terrain Coordinate fields are set to 0, the osm data will be parsed correctly relative to the terrain bounds.

    Alternatively, when the bounds of the terrain does not match the osm data, the terrain long/lat:coordinates can be entered. In that case the osm data will be parsed relative to these bounds.

    It seems you are asking for a different way to handle this, but how? If the terrain is flat, then in theory the terrain size (width / length) can be adjusted to the width / length ratio of the osm data file. But what to do when the terrain is not flat? This will not accurately represent the area in the real world.

    Thanks,
    Raoul
     
  14. NotoMuteki

    NotoMuteki

    Joined:
    Feb 8, 2018
    Posts:
    42
    Hi Raoul,

    Could you tell me when will left-hand traffic be available? Next beta?
    I'm really satisfied with ER3Pro, which includes lane & crossing information can be used for car AI system,
    but only drawback is left-hand traffic in my case.

    Thanks
     
  15. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi tex5564,

    Left-hand traffic wasn't planned for the next beta yet, currently motorway exits is being worked. I will make a note to look into this and see if it can be added to the next beta.

    Thanks,
    Raoul
     
    NotoMuteki likes this.
  16. Raw777

    Raw777

    Joined:
    Oct 3, 2018
    Posts:
    3
    Hi Raoul,

    Thank you for the great plugin. I've got some problems with KML file import. At first I couldn't import anything. Finally I'm able to import only 3 points from this file:
    Code (JavaScript):
    1. <?xml version="1.0" encoding="UTF-8"?><kml xmlns="http://www.opengis.net/kml/2.2">         <Document>
    2. <Placemark><name>test</name>
    3. <description>test Desc</description>
    4. <LineString>
    5. <coordinates>
    6. -80.54400115,43.4250264
    7. -80.52674314,43.43127701
    8. -80.5274517,43.43458707
    9. -80.53223781,43.43876923
    10. -80.54385782,43.44993036
    11. -80.53949137,43.45723788
    12. -80.53950793,43.46780893
    13. -80.53352615,43.4730443
    14. -80.53491389,43.47816267
    15. -80.54136061,43.48417145
    16. -80.54163034,43.48439869
    17. </coordinates>
    18. </LineString>
    19. </Placemark></Document>
    20. </kml>
    I got the following errors in the console:

    upload_2019-5-22_14-57-16.png

    I'm using Unity 2018.4.0f1. Empty project, only imported the plugin.

    Do you have maybe an example KML file which would work without errors? Which Unity version you currently recommend for your plugin ?

    Any help or tips would be greatly appreciated
     
  17. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi Raw777,

    Glad to hear you like the plugin,

    For KML import it is recommended to use the latest release v3.1.7, it will throw for example a warning if no terrain object is available in the scene. In previous versions this resulted in errors. Which version do you use?

    Because I cannot reproduce the errors. The file does extract well but 0 objects are parsed. This is due to the set of coordinates in your example not including height data which usually is the case for kml files. If you add ",0" without the quotes after each set of coordinates it should extract well.

    This is updated for the next release, the kml file as it is now will extract well.

    Thanks,
    Raoul .
     
  18. Raw777

    Raw777

    Joined:
    Oct 3, 2018
    Posts:
    3
    Hi Raoul,

    I'm using the latest plugin version 3.1.7. In the meantime I've got better results when I've added the height parameter.

    The results look like this:

    upload_2019-5-22_16-29-13.png

    I'm trying to import such sqare:
    upload_2019-5-22_16-30-10.png

    Using the following KML:


    Code (JavaScript):
    1. <?xml version="1.0" encoding="utf-8" ?>
    2. <kml xmlns="http://www.opengis.net/kml/2.2">
    3. <Document id="root_doc">
    4. <Schema name="droga_przycieta" id="droga_przycieta">
    5.     <SimpleField name="id" type="float"></SimpleField>
    6. </Schema>
    7. <Folder><name>droga_przycieta</name>
    8.   <Placemark>
    9.     <Style><LineStyle><color>ff0000ff</color></LineStyle><PolyStyle><fill>0</fill></PolyStyle></Style>
    10.     <ExtendedData><SchemaData schemaUrl="#droga_przycieta">
    11.         <SimpleData name="id">1</SimpleData>
    12.         <Data name="highway">
    13.         <value>tertiary</value>
    14.         </Data>
    15.     </SchemaData></ExtendedData>
    16.       <MultiGeometry><LineString><coordinates>21.0811078007812,51.9688029733146,2357 21.0816905659101,51.9691575181673,2357 21.081951526092,51.9692723766208,2357 21.0830418051036,51.969656996058,2357 21.0837779736624,51.9699095621122,2357 21.0848354503852,51.9700800710035,2357</coordinates></LineString></MultiGeometry>
    17.   </Placemark>
    18.   <Placemark>
    19.     <Style><LineStyle><color>ff0000ff</color></LineStyle><PolyStyle><fill>0</fill></PolyStyle></Style>
    20.     <ExtendedData><SchemaData schemaUrl="#droga_przycieta">
    21.         <SimpleData name="id">2</SimpleData>
    22.         <Data name="highway">
    23.         <value>tertiary</value>
    24.         </Data>
    25.     </SchemaData></ExtendedData>
    26.       <MultiGeometry><LineString><coordinates>21.0811091786917,51.9695662480483,2357 21.0811791260175,51.9695720149534,2357 21.0816631720292,51.969456640541,2357 21.081951526092,51.9692723766208,2357</coordinates></LineString></MultiGeometry>
    27.   </Placemark>
    28.   <Placemark>
    29.     <Style><LineStyle><color>ff0000ff</color></LineStyle><PolyStyle><fill>0</fill></PolyStyle></Style>
    30.     <ExtendedData><SchemaData schemaUrl="#droga_przycieta">
    31.         <SimpleData name="id">3</SimpleData>
    32.         <Data name="highway">
    33.         <value>tertiary</value>
    34.         </Data>
    35.     </SchemaData></ExtendedData>
    36.       <MultiGeometry><LineString><coordinates>21.0830418051036,51.969656996058,2357 21.0834641098405,51.9679112374123,2357</coordinates></LineString></MultiGeometry>
    37.   </Placemark>
    38. </Folder>
    39. </Document></kml>
    40.  
    ( I've added the height as 2357 for test purposes, but I choose to import without height).

    Thank you for your help.
     
  19. NotoMuteki

    NotoMuteki

    Joined:
    Feb 8, 2018
    Posts:
    42
    Thank you very much!
     
  20. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Good to hear you have better results now!

    Are you asking a specific question regarding the new file?

    What happens is that one road only has 2 nodes. One of these nodes is on the terrain edge, this node is not added resulting in a single node road which is there for ignored. That is why only two roads are parsed. I guess in the case of a two node road this edge node should also be included. I will make a note of that.

    Thanks,
    Raoul
     
  21. Raw777

    Raw777

    Joined:
    Oct 3, 2018
    Posts:
    3
    Yes I'd like to ask you what could I do in order to have the road imported exactly like on the picture with the square ?

    How can I prevent the errors in the console from hapening?

    Do you have maybe a sample KML file which I could import without any errors ?
     
  22. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Does the square in the picture represent the terrain bounds? I would think generally the roads will not reach to exactly the terrain edge, meaning the bounds of all terrains for a multi terrain tile setup. That is what is causing the issue with the two nodes. I have updated the scripts so nodes exactly on this outer terrain edge are included as well.

    There are no errors on our end when parsing the file as I copied it from your post. It is zipped because it didn't allow me to attach a kml file.

    Thanks,
    Raoul
     

    Attached Files:

  23. vpamidi

    vpamidi

    Joined:
    Apr 18, 2019
    Posts:
    11
    New:

    - Vegetation Studio Pro support for Biome Masks

    - Indent and Surrounding presets for road types

    - OSM road data: textfield for an additional custom osm road type input


    Improved:

    - EasyRoads3D uses layer 31 for internal operations. This is now customizable in General Settings > Scene Settings > EasyRoads3D Layer

    - The full road network can now be moved or rotated by selecting both the "Connection Objects" and "Road Objects" in the hierarchy. After moving and / or rotating these two objects please press the "Apply Transform Changes" to make the changes permanent.

    - Side Objects: "Distance between objects", this is now also editable per road object.


    Fixed:

    - Possible NullReferenceExceptions after attaching roads to a T crossings and moving over one of the roads afterwards

    - Side objects not clamping to road edges when the road shape itself is raised further above y = 0

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

    As always please backup your project first before importing the update

    The asset store update is pending approval by the asset store team

    Thanks,
    Raoul[/QUOTE]

    Hi Raoul,

    I am trying to move full road network by selecting both the "Connection Objects" and "Road Objects" in the hierarchy. But I couldn't see "Apply Transform Changes" button to make the changes permanent. Could you let me know where can I see "Apply Transform Changes" button.

    Thanks,
    Vijayalakshmi
     
  24. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi Vijayalakshmi,

    Indeed in v3.1.7 the road network can be moved by selecting these two objects "Connection Objects" and "Road Objects".

    First of all, can you select these objects and check if the new script component "ER Road Network Object" is added?

    In that case all should work well. Initially The "Apply Transform Changes" button will not be visible but as soon as these two objects are moved and / or rotated it should appear.

    Thanks,
    Raoul
     
    vpamidi likes this.
  25. mattes3

    mattes3

    Joined:
    Apr 23, 2019
    Posts:
    15
    Screenshot 2019-05-23 at 16.19.30.png Hi,

    today, I got the EasyRoads3D FREE asset from the asset store to try it out. I used it in a scene with a terrain generated by Gaia, in Unity version 2019.1.2f1

    I created a Road Network object and two road objects. On the first road, I tried to use shift-click to create a few markers. Sometimes it works, sometimes it does not (shift-click simply selects the terrain, not the road). The console shows some error messages (see screenshot above).

    What can I do to get it working?
     
  26. Sound_Priest

    Sound_Priest

    Joined:
    Nov 7, 2013
    Posts:
    8
    Thanks for the answers, Raoul!

    Now I want to make sideobject (curb) with custom mesh collider:



    BUT custom mesh collider don't work... Original mesh collider work fine.
     
  27. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735

    Hi mattes3,

    I just double check the free version in Unity 2019.1.3.f1. It works as expected. Roads can be added, markers are always added and there are no errors.

    Did you follow the steps in the Quick Start section of the manual?

    Does the same happen in the small demo scene when using the road network that is already in the scene?

    Just in case, double click will select the terrain. A single click should not select the terrain.

    Thanks,
    Raoul
     
  28. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi Sound_Priest,

    For the Procedural Mesh side object a custom mesh collider is indeed currently not supported. This can either be a box collider or the generated mesh itself.

    Custom colliders have never been requested before. I can make a note of this, in v3.3 the side object system will get an upgrade.

    Meanwhile this could be done by building the mesh collider on a second side object. First get all the settings right for the curb side object itself, then duplicate this side object and assign the mesh collider as the source object for the duplicate. If this is a side object that should be created along the full road, both side objects can be activated for that road type. Using a callback, introduced in v3.1.7, and a custom scripts the meshrender component can be auto removed after changes to the road.

    Thanks,
    Raoul
     
  29. JoseITCL

    JoseITCL

    Joined:
    Nov 10, 2017
    Posts:
    3
    Hi, I´m getting this error every time i tried to open a prefab in the new prefab editor system. It seems that is the ER Crossing Prefab script the origin of all of this because prefabs without it have no problems at all.
    https://gyazo.com/ae95af0143bf01ad0bb60149aa066130

     
  30. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi JoseITCL,

    What type of prefab is this? A dynamic built-in connection prefab or a custom prefab based on a mesh?
    [EDIT] I now see this is a dynamic prefab

    Which version of Unity and EasyRoads3D are you using? If this is an older project upgraded to Unity 2018.3 or newer, was the EasyRoads3D version also updated from the asset store?

    When exactly does the error appear? Immediately after opening the prefab editor or after selection changes in the new prefab editor window?

    Thanks,
    Raoul
     
  31. JoseITCL

    JoseITCL

    Joined:
    Nov 10, 2017
    Posts:
    3
    Hi,
    this happen when i try to open a prefab with the ER Cross prefab in it, it doesnt matter if its a dynamic or a custom one.
    I´m using Unity 2019.1.3f1 in a fresh project. The ER version is 3.1.1 updated from asset store.
    It appears inmediately after opening the prefab editor, i cant do anything in that window.
    Thanks in advance
     
  32. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    3.1.1 does not support Unity 2018.3 and newer. Is this the version that is imported when downloading EasyRoads3D Pro from the asset store in Unity 2019.1.3f1? It should download v3.1.7

    All recent versions starting from v3.1.3 include a special version for Unity 2018.3 and newer. This version is uploaded using Unity 2018.3.0f2. One of the main differences is support for the new prefab editor system introduced in Unity 2018.3

    Thanks,
    Raoul
     
  33. Sound_Priest

    Sound_Priest

    Joined:
    Nov 7, 2013
    Posts:
    8
    "Custom colliders have never been requested before. I can make a note of this, in v3.3 the side object system will get an upgrade." - it would be nice.

    Now I dublicate mesh in sidewalk prefab -> switch rendermesh for correct collider -> uncheck rendermesh -> add mesh collider.

    It is a crutch but it works :)
     
    raoul likes this.
  34. JoseITCL

    JoseITCL

    Joined:
    Nov 10, 2017
    Posts:
    3
    Hi, thats the problem for sure. We download the package from a project opened in 2018.2 so we´ll download again in the project itself instead of importing the package.
    Many thanks for the fast response and sorry for the incovenience.
     
    raoul likes this.
  35. Bomshi

    Bomshi

    Joined:
    Jan 17, 2014
    Posts:
    14
    Hello-
    I have a issue with a shader that was created in the HD Roads package:
    Code (CSharp):
    1. Shader error in 'NatureManufacture Shaders/Standard Metalic Cross Road Material Parallax': maximum ps_4_0 sampler register index (16) exceeded at line 131 (on d3d11)
    2.  
    3. Compiling Fragment program with UNITY_PASS_FORWARDADD SPOT SHADOWS_DEPTH SHADOWS_SOFT _IGNORESECONDROADALPHA_ON
    4. Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_LIGHTMAP_RGBM_ENCODING
    5.  
    It happens, when I try to build my game.
    I have already setup shader variants...
     
  36. vpamidi

    vpamidi

    Joined:
    Apr 18, 2019
    Posts:
    11
    Hi Raoul,

    I selected "Connection Objects" and "Road Objects" , but I don't see new script component "ER Road Network Object" added. I am using Unity Version 2018.3.14.f1 and EasyRoads3dD v3.2.b2

    Thanks,
    Vijayalakshmi
     
  37. vpamidi

    vpamidi

    Joined:
    Apr 18, 2019
    Posts:
    11
    Hi,

    I am using easyroads3d v3.2b2 version. I created new road type(2LanePrimaryRoad) and defined lane info in road shape editor. Then I created road network with the road(2LanePrimaryRoad 001) of road type (2LanePrimaryRoad). I am trying to get lanedata and lane points in script using below methods.

    icount = curr_road.GetLaneCount(); // I am getting value 2
    for (int k = 1; k <= icount; k++)
    {
    Debug.Log(curr_road.GetName());
    laneDir = curr_road.GetLaneData(k).direction;
    Debug.Log(laneDir);
    }
    I am getting error "NullReferenceException: Object reference not set to an instance of an object." whenever I use any of the below methods.
    curr_road.GetLanePoints(k, laneDir)
    curr_road.GetLaneData(k).direction
    curr_road.GetLaneData(k)


    Thanks,
    Vijayalakshmi
     
  38. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi Bomshi,

    What exactly do you mean with "a shader that was created in the HD Roads package"? Do you mean a shader in the HD Roads package as it is imported?

    There are no known build issues with these shaders so it is hard to give feedback on this. Can you give full details. Unity version, target, project type 3d, srp, etc.

    Thanks,
    Raoul
     
  39. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi Vijayalakshmi,

    V3.1.7. was released after the current v3.2 beta. This feature was one of the last things added, it is not part of the v3.2 beta yet.

    Thanks,
    Raoul
     
    vpamidi likes this.
  40. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi Vijayalakshmi,

    Does the same happen with the current beta 5 and after refreshing the roads?

    Thanks,
    Raoul
     
  41. Bomshi

    Bomshi

    Joined:
    Jan 17, 2014
    Posts:
    14
    Hi,

    I wrote in the NM Discord and they said it was created for the HD Roads Package.
    I don't know why this is coming...
    I have Unity 2018.3.13f1
    I have Dx11 active and the Standard Pipeline - no LW or HD Pipeline
    I can't give more than this - I don't have any idea...
     
  42. AngelBeatsZzz

    AngelBeatsZzz

    Joined:
    Nov 24, 2017
    Posts:
    239
    Hello, I have a straight road, I want to add a sidewalk to it, how can I do it? I didn't find the place to set it up.
     
  43. vpamidi

    vpamidi

    Joined:
    Apr 18, 2019
    Posts:
    11

    Hi,

    I installed beta 5 and ran the code. I am facing same error(NullReferenceException: Object reference not set to an instance of an object) still.
    lanedata is null from curr_road.GetLaneData(k);

    Below is my code:
    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    using EasyRoads3Dv3;
    using System.IO;
    using System.Linq;
    using Newtonsoft.Json;

    public class spline_point_road_network : MonoBehaviour
    {
    int id,road_temp, icount;
    string file_name;
    public StreamWriter sw;
    ERRoadNetwork road_network;
    ERLaneData lanedata;
    public ERRoad[] roads;
    ERConnection[] connection;
    Dictionary<string, List<double[]>> temp_dict1, temp_dict2;
    Dictionary<string, List<double[]>>[] temp_dict3;
    List<double[]> temp4, temp5, temp6;
    Dictionary<int, string> id_to_road_name;
    float mphtomps;
    List<string> road_descriptions;

    // Start is called before the first frame update
    void Start()
    {
    id = 0;
    road_network = new ERRoadNetwork();
    roads = road_network.GetRoads();
    connection = road_network.GetConnections();
    id_to_road_name = new Dictionary<int, string>();
    mphtomps = 0.44704f;
    road_descriptions = new List<string>();
    Debug.Log("inside start");
    foreach (ERRoad curr_road in roads)
    {
    Debug.Log("inside foreach");
    string road_name = curr_road.GetName();
    id++;
    icount = 0;
    road_temp = id;
    Vector3[] left_spline_point = curr_road.GetSplinePointsLeftSide();
    Vector3[] right_spline_point = curr_road.GetSplinePointsRightSide();
    Vector3[] centre_spline_point = curr_road.GetSplinePointsCenter();
    id_to_road_name.Add(id, road_name);
    icount = curr_road.GetLaneCount();
    Debug.Log("icount " + icount);
    for (int k = 1; k<= icount; k++)
    {
    Debug.Log("1 ");
    lanedata = curr_road.GetLaneData(k);
    Vector3[] lanepoints = lanedata.points;
    Debug.Log("2 ");


    }
    }
    }
    }
     
  44. vpamidi

    vpamidi

    Joined:
    Apr 18, 2019
    Posts:
    11
    Hi,

    Hi,

    It is working in v3.1.7. when will this feature be added to v3.2 beta.

    Thanks,
    Vijayalakshmi
     
  45. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi Bomshi,

    That sounds like a standard setup, what is the build target?

    Have you tried importing the package in a new project and build the demo scene for target platform "Windows"? Does that complete without errors?

    Thanks,
    Raoul
     
    Last edited: May 24, 2019
  46. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi AngelBeatsZzz,

    Are you using crossings?

    In v3.1 built-in sidewalks on roads are handled through the sidewalk settings on the attached crossings. The sidewalk shape can be set in the crossing settings.

    After selecting the crossing in the scene each corner will show 3 clickable handles. Green means, sidewalks are active for that corner and specific road connection, grey means inactive. The attached roads will inherit these settings.

    In v3.2 sidewalks can be managed separately from crossings and can be activated directly on roads.

    Thanks,
    Raoul
     
    AngelBeatsZzz likes this.
  47. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi vpamidi,

    Do you see the lane lines in scene view? Make sure that General Settings > Scene Settings > Display Lane data is active.

    Are these errors also thrown when using the default road type example in the beta package on the roads in the scene? Is this debugged on a single road only?

    I will see if I can replicate the problem on a new road type using your code.

    Thanks,
    Raoul
     
    Last edited: May 24, 2019
  48. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    It will automatically be part of the next beta, there is no release date set as it will include the first the new motorway exits option which is currently being worked on. But if there are issues with the current beta, a small update can be released sooner.

    Thanks,
    Raoul
     
  49. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    @vpamidi

    I just tested your code:

    Line 47:
    icount = curr_road.GetLaneCount();

    Line 49:
    for (int k = 1; k<= icount; k++)

    <= will result in a NullReferenceException

    Is that the NullReferenceException you get or is that a typo in the script example you posted?

    Because when quickly testing your script in the dev project, the below does work fine:

    for (int k = 0; k < icount; k++)

    the lanePoints arrays are accurate.

    Thanks,
    Raoul
     
    Last edited: May 24, 2019
  50. Bomshi

    Bomshi

    Joined:
    Jan 17, 2014
    Posts:
    14
    Hi Raoul -
    I tested it... I have a blank new project with Easy Roads only. It compiles
    With the HD Roads it fails. No objects in scene and no road added it fails with the same error ...

    Same settings DX11 and 2018.3.13f1
    It should be the shader. Build Target to Windows