Search Unity

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,753
    Hi econt,

    Do you mean a ground texture on the left and right of the road that you do not want to be part of the road texture / mesh? There are two ways to do that:

    1) Create a new side object, a Shape type of side object will work fine for this. Assign the ground material to the material slot and position it relative to the left and right of the road sides.

    2) If the ground material / texture is also used on the terrain object, then this texture can be used to bake the roiad shape in the terrain. The "Add Shape to Terrain Splatmap" option near the bottom in the Inspector.

    Both options can be set to the road type in General Settings > Road Types. That way this will be done automatically for new roads of that type.

    Are these single parking slots? The HD Roads Add On package do have similar parking slots examples. This too can be done using the side object system.This time you can create a prefab of a single parking slot. Create a new Procedural side object type and assign the prefab to the Source slot. And just like with the ground side object align it with the left and / or rightside of the road. This will auto create parking slots alongside the road.

    If you have more questions about side objects in general, please ask. The free demo project (if you have the Pro version) includes a range of examples with tutorials on our website.

    The HD Roads package does have tar only road types and also line marking presets as side objects. More will be available in the future. There are also various texture resources with good quality road textures.

    Thanks,
    Raoul
     
  2. Idrissdiop

    Idrissdiop

    Joined:
    Apr 12, 2018
    Posts:
    3
    Hi Raoul,

    I am trying to add some bumps/humps from my own prefab models to my road network.
    what is the best way to add it to a road ?
    -as a side object (how?)
    -as a connection object (how?)
    -directly to the terrain shape (how to do it with precision?)
    I want to print some road_decals to those curvy shapes
    Regards.
     
  3. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,753
    Hi Idrissdiop,

    If these bumps / humps should be added at (random) intervals then a Mesh type of side object can be used for this. That only involves adding the prefab to the Source Object slot and setting "Distance Between Objects" and probably "Alignment" to "Path Normal"

    If these are single instances then at the moment the best way is to add them manually. Side Objects will get an update in v3.2 with built-in options for this.

    If you are referring to speed bumps / humps then these are usually reasonably smalll. It will probably be hard to get the desired shape done directly in the terrain object / road shape.

    Larger bumps with a specific pattern or randomness can be done directly on the road shape, the Road Smoothness fold out in the main Road Settings.

    Thanks,
    Raoul
     
  4. volfase

    volfase

    Joined:
    Nov 15, 2016
    Posts:
    27
    What are system recommends for Easyroads?
    i have OS: Ubuntu 19.10 CPU: Intel Core i3-7100 GPU: NVIDIA GeForce GTX 960 RAM: 12 GB and Unity 2019.2.9f1
    and the performance is terrible/unusable when editing the roads.
     
  5. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,753
    Hello volfase,

    What do your roads look like? What is the length, resolution? Does this happen for every road, right from the start after creating it? Are side objects involved?

    And is this also the case in the provided demo scene?

    Thanks,
    Raoul
     
  6. volfase

    volfase

    Joined:
    Nov 15, 2016
    Posts:
    27
    What do your roads look like? just small line
    What is the length? 95
    resolution? 2
    Are side objects involved? not added side objects
    this also the case in the provided demo scene? no
    I have huge map size with one terrain how much it affect?
    would it be better with multiple small terrains?
    and why when i add connection prefab to road i cant adjust road width?
     
  7. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,753
    What is the map size and the size of the terrain and also the heightmap resolution of the terrain?

    Depending on the map size generally it is recommended to use mulitple smaller terrain tiles. But this also depends on the nature of your terrain, fairly flat or hilly. For roads in an hilly environment you probably want more detail in the terrain otherwise it will be hard to match the terrain with the road shape.

    But this is more related to having a terrain setup that will work well with the road shapes, it is not necessarily related to the editor being slow. Since all is good in the demo scene, are other assets involved in your scene perhaps doing something in the background?

    Is "Auto Generate" switched on in the Lighting window (Window > Rendering > Lighting Settings)? If so, does this work better with Auto Generate switched off?

    Thanks,
    Raoul
     
  8. volfase

    volfase

    Joined:
    Nov 15, 2016
    Posts:
    27
    Is "Auto Generate" switched on in the Lighting window (Window > Rendering > Lighting Settings)? its off
    my terrain is Really big 10000 10000 1000 and no trees and more flat than hilly.
     
  9. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,753
    The size of the terrain and the heightmap resolution should not slow down the road creation process in Edit mode, I just double checked this on a 10000 x 10000 terrain, heightmap resolution 4097. Have you tried a smaller terrain meanwhile? And are the terrain and EasyRoads3D indeed the only assets in the scene?

    Thanks,
    Raoul
     
  10. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    4,963
    @volfase - FWIW, I read about a user experiencing a editor slow down with a somewhat similar asset (Curvy) and he's using 2019.2.9. He's seeing the slow down if vsync is off. When it's on, the slow down is less evident.

    I don't know if that gives you and @raoul any leads or if it is a red herring, but a question I'd be asking is, "is this a Unity editor bug related to splines that shows up in 2019.2.9+?" It seems like testing with vsync off and on would be a way to compare the symptoms.

    UPDATE: Turns out this error is specific to that other plugin. Sorry for any trouble.
     
    Last edited: Nov 7, 2019
  11. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,753
    @hopeful, also after installing the latest 2019.2.11f on our end there is no noticeable loss of performance in the editor using the default VSynch setting or another value.

    @volfase, have you tried switching VSynch off in Project Settings > Quality?

    Thanks,
    Raoul
     
  12. combatsheep

    combatsheep

    Joined:
    Jan 30, 2015
    Posts:
    88
    Hi, raoul.

    Can I import to overwirte from ER3D v3.1.8f2 to 3.1.8f4?

    Thanks.
     
  13. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,753
    Hi combatsheep,

    Yes that will work fine, please do not remove assets, simply import the update over the current version.

    It is recommended to always backup a project before importing updates.

    Thanks,
    Raoul
     
    combatsheep likes this.
  14. volfase

    volfase

    Joined:
    Nov 15, 2016
    Posts:
    27
    have you tried switching VSynch off in Project Settings > Quality? no affect
     
  15. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,753
    Although this should not make a difference, have you tried a smaller terrain? Are EasyRoads3D and the terrain indeed the only assets in the scene?

    Since you mention all works well in the demo scene, could you email or PM us a link to the project / scene so we can look at it.

    Thanks,
    Raoul
     
  16. swnc

    swnc

    Joined:
    Aug 3, 2018
    Posts:
    35
    Hi Raoul,

    I have a small network that consists of 2 x-crossing that are connected to 3 roads on flat terrain. I want to be able to snap the whole road network to the terrain so that there is no terrain deformation and the height of the road network is the same everywhere. With SnapToTerrain function I can achieve this only for roads, so the crossings would have a different height than connected roads. Is there a way to snap whole road network to the terrain? I am using the scripting API.

    Best,
    swnc
     
  17. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,753
    Hi swnc,

    The road meshes are generated from the splines, crossings are based on prefabs. Snapping roads to the terrain is already delicate, that is why it currently is only possiblke througfh the scripting API. Snapping crossing vertices to the terrain is even more delicate.

    But the crossing position (no vertex snapping) can be set to the terrain height through the scripting API. If your terrains are flat, and the height of the roads and crossings should be the same everywhere in what way does this not work well?

    Thanks,
    Raoul
     
  18. swnc

    swnc

    Joined:
    Aug 3, 2018
    Posts:
    35
    HI Raoul,

    indeed it works. However, when I create the road network close to the terrain then I observe these outcomes below Z-fighting. That is why I always start with an offset when I create the roads then want to snap to the terrain. Maybe you have an idea of why am I observing z-fighting and how to solve it?

    Best,
    swnc
     

    Attached Files:

    Last edited: Nov 7, 2019
  19. volfase

    volfase

    Joined:
    Nov 15, 2016
    Posts:
    27
    i make terrain to use default settings and now it works good.
    and this is last question why when i add connection prefab (like t crossing) to road i cant adjust road width?
     
  20. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,753
    Hi swnc,

    It is hard to comment on the images. Which shader do you use? Z fighting will happen when the road network is exactly at the terrain height. The EasyRoads3D shaders use an offset to deal with Z fighting.

    Furthermore, in Build mode there is a "Raise" option to move the road network slightly above the terrain, the API equivalent is SetRaiseOffset(float value).

    It seems your situations is more related to this then to "snap" crossings to the terrain in a similar way as SnapToTerrain(bool value) does for roads?

    Thanks,
    Raoul
     
  21. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,753
    @volfase

    Glad to hear you got that sorted out but I still wonder what the problem with the previous terrain was. Do you perhaps use a terrain tool to generate the terrains?

    Do you want to adjust the width of one specific road or in general? It is very much recommended to workj with road types "General Settings > Road Types". For each road type matching crossings can be generated, the "Create new Connection Prefab" button below the Material slots in the Main Settings. The advantage of using road types is that the road network will be much better manageable. At anyitme the road width can be changed. After pressing "Update Scene Instances" near the bottom in the Road Type settings, all matching roads and crossings in the scene will update.

    Thanks,
    Raoul
     
  22. combatsheep

    combatsheep

    Joined:
    Jan 30, 2015
    Posts:
    88
    Thanks raoul!
    I have done importing updates and it works fine.;)
     
    raoul likes this.
  23. nmbileg

    nmbileg

    Joined:
    Sep 29, 2017
    Posts:
    16
    Hello again, Raoul!

    Is it possible to get a road's certain marker's corresponding distance as float? For example ERRoad.GetDistance(int markerIndex)?

    Thanks in advance!
     
  24. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,753
    Hello nmbileg,

    That is currently not possible but I just added it and will be available in the next update.

    Thanks,
    Raoul
     
  25. nmbileg

    nmbileg

    Joined:
    Sep 29, 2017
    Posts:
    16
    Fantastic, Thanks!
     
  26. studentvz

    studentvz

    Joined:
    Dec 14, 2014
    Posts:
    50
    This was probably discussed before. Is there any way to fix this?
     

    Attached Files:

  27. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,753
    Hi studentvz,

    Apologies for the late reply, I didn't get an email notification.

    That is caused by the width differences. This can be copntrolled with the UV Slider in the crossing settings.

    Select the Crossing in the hierarchy, then in the Inspector go to:

    Connection Settings > Connection Setup, select "Unique Opposite Connections" or "Unique Connections"

    And, depending on the T Crossing side and the above selection, use the Left or Right UV Slider to fine tune the tiling.

    Thanks,
    Raoul
     
    studentvz likes this.
  28. studentvz

    studentvz

    Joined:
    Dec 14, 2014
    Posts:
    50
    Thank you!
     
  29. DiscoFever

    DiscoFever

    Joined:
    Nov 16, 2014
    Posts:
    285
    Pre-purchase question here: would it be possible to use this asset to create like 'snow tracks' like so on Unity Terrain ?

    Thanks
    D1089_163_409_1200.jpg
     
  30. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,753
    Hi DiscoFever,

    Are crossings involved?

    The snow tracks could be created in a similar way as the swamp track in the demo package.

    The first example in this tutorial

    http://unityterraintools.com/tutorials/adjusting_road_shapes.php

    In v3.2, available in betas, it is possible to create this type of road shape profiles directly inside General Settings > Road Types. The difference with the track in the tutorial is that the top part of the track should be at the terrain height at that point. That can currently be done with custom terrain deformation objects through side objects pushing down the terrain to below the bottom of the "snow tracks".

    Thanks,
    Raoul
     
  31. DiscoFever

    DiscoFever

    Joined:
    Nov 16, 2014
    Posts:
    285
    Hi Raoul, thanks for the quicky reply. Nope no crossings involved. Cool so i will git it a go and get report back.
     
  32. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,753
    Ok, please sent a pm or email with your email address and the invoice number. I will prepare access to our website downloads for the beta, this new feature is stable. It will be easier to create the shape.

    And let us know if you have questions anyway. We can help with the setup for this if you want.

    Thanks,
    Raoul
     
    DiscoFever likes this.
  33. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    913
  34. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,753
    Hi Rowlan,

    That is done with the current version. These tutorials are all based on the demo package https://assetstore.unity.com/detail/tools/terrain/easyroads3d-demo-project-105045 . This swamp track is located in the centre of the scene on the right of the lake.

    As mentioned in the tutorial, the road shape was done using a model with that shape. The Custom Connection system was used to extract the road shape.

    This can be done easier now, custom road shapes are supported in the v3.2 beta. The shape profile can be set in the new Road Shape Editor section in General Settings > Road Types.

    Thanks,
    Raoul
     
    Rowlan likes this.
  35. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    913
    Awesome, very exciting. I totally have to try that. Thank you very much for the info :)
     
    raoul likes this.
  36. Idrissdiop

    Idrissdiop

    Joined:
    Apr 12, 2018
    Posts:
    3
    CaptureER-Unity.PNG Hi Raoul.

    I have a problem when I build my road network.
    I have some raised road created from raised connection (not with shift+click). each of these roads have only 2 markers (start & end) derived from the connections. The roads also contain side objects(barriers) from my own models.
    The problem is that when I build the road network, the terrain shape is adjusted only for the connections, not for the roads objects (leaving them floating in the air).
    I want the terrain to be adjusted both for roads & the connections. Is there a specific configuration to do for this ?
     
    Last edited: Nov 22, 2019
  37. Idrissdiop

    Idrissdiop

    Joined:
    Apr 12, 2018
    Posts:
    3
    My problem is solved by checking the "terrain deformation" box in Settings>RoadType.
    Thanks.
     
  38. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,753
    Hi Idrissdiop,

    Glad to hear you already managed to get that working. It is strange though, "Terrain Deformation" is switched on by default. It can be toggled off both in the road type settings and for individual roads, for example for road types used as overpasses where the terrain should not be updated.

    Thanks,
    Raoul
     
  39. RitteK

    RitteK

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

    I have an idea for your AI script in the beta, how about setting the speed of the vehicles from account point to junction, so that you can create for example 30 zones or even highways etc.

    In addition, I have an idea regarding the crossing for the AI, when the vehicles turn that there is a value in the vehicle script whether right left or straight out so that you can control for example direction display.

    At the moment I control the speed with triggers that I have attached to the describe but it would be better I think if you can integrate it right away in the street

    Is it possible to extend the dynamic intersection to 3 lanes without problems so that you have a turn lane or also on 3 lanes for 2 turn feel one right one left and a straight


    Otherwise I find the beta good.
     
    Last edited: Nov 24, 2019
  40. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,753
    Hi RitteK,
    The beta AI script is not the main focus. The focus is more on providing access to required AI data so users can also create their own scripts. But the script itself will also expand.

    Currentlly the Max Speed Limit can be set for road types, this should probably also include a Min Speed limit.

    How would you like to see speed control from account point to junction being implemented?

    Speed zones could be done by adding a Speed Limit control option per marker.

    This info is available but currently not used in the AI script itself. I will make a note to clearly expose that info in the script.

    Otherwise I find the beta good.[/QUOTE]

    That is in the current setup more material related, a 3 lane texture is required The material can be set per road type and per road. As an alternative to lane specific materials, the new road shape options in the beta will be expanded further in a way that multi lane roads will be supported with a single material.

    Glad to hear you like the beta and thank you very much for the feedback

    Raoul
     
  41. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,753
    v3.1.9.f1 is available on our website

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

    This update includes some small bug fixes for non road related objects such as rivers or fences. Furthermore it includes recent requests, also API related, and some small side object updates.

    For instance, "Default active state per marker" can now also be set in the side object settings for the specific road. And a new "Ratio" option is available for Connection objects for Procedural side object types. This can be used to control the distance between connection instances and is useful for example for bridge pillars. No need anymore to create a separate side object for these additional elements.

    http://unityterraintools.com/releaseNotes.php

    Next will be the first beta with more new side object features such as support for auto generated tunnels for the Unity 2019.3 beta.

    https://forum.unity.com/threads/eas...-new-road-system.229327/page-152#post-5052119

    This update will be available later this week.

    Thanks,
    Raoul
     
  42. RitteK

    RitteK

    Joined:
    May 31, 2016
    Posts:
    6
    Hello Raoul, thank you for your answer.


    I haven't seen that at all that you can set it at any marker.


    That sounds good I will continue to test and report what I find. I see error that can be seen in your video, but this will certainly be fixed
     
  43. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,753
    The speed limit per marker is currently not possible, I mentioned it as a possible way to control this in future updates. I will make a note.

    I also added some notes for the next update regarding lane specific left, right turn options at junstions per lane in General Settings > Road Types > Lane Info. This can be used to auto create for example only left or right turn lane data instead of in all directions like it does now.

    Thanks,
    Raoul
     
  44. NCKU_Asrlab

    NCKU_Asrlab

    Joined:
    Nov 21, 2019
    Posts:
    3
    Hi, great asset tool!
    We are trying to make some kind of urban scene with real world roads.
    So we had purchased assets: pro and Addon HD roads ,
    From manual I learned we can import openstreetmap road data,
    Here are what I had tried.
    Select region and export OSM file from openstreetmap site.
    https://imgur.com/gallery/DJMzL9A
    In Unity import osm file to generate road network automatically
    https://imgur.com/gallery/gNXNWur

    1. What I observed is there seems to be missing several roads (at highway interchange region)
    Is this a known issue or can be fixed?

    2. And some roads actually have height information, (highway parts are consist of viaduct/bridge/roads).
    Is that possible to generate roads with height information from osm file automatically?

    3. We may need to generate 3-lane/4-lane/2x3-lane/2x4-lane roads, is there some already known method/assets/prefabs to create these kind of roads?

    Thank for your great work!
     
  45. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,753
    Hi NCKU_Asrlab,

    Yes, it seems a "highway" type is missing. "trunk" and "motorway_link" are included though, perhaps it is "trunk_link". We will look into that. Would it be possible to send us this osm file? Meanwhile, there is an option "Custom" at the bottom in the import settings to add an additional "highway" type.

    This is something to look into as well, how is the height info defined? From a Unity point of view best results are when getting the terrain height at a specific node. Ideally the relative height info for bridges and viaducts would be useful

    To some extend this is possible with the HD Roads package. Most materials are two lane roads with the line markings part of the road texture. But the package also includes asphalt only materials and line markings created as side objects.

    The second video on the asset store page shows this type of road setup starting at 2.00, https://assetstore.unity.com/detail.../roads/easyroads3d-pro-add-on-hd-roads-118774. By duplicating these line markings in the Side Object manager and changing the X Position multi lane roads can be created. These lane specific side objects can be auto activated for road types. New roads of that type will automatically include the line markings. More complicated for wider roads are the scrossings, it depends on what you need. The crossings in the package are scalable. Auto creating crossings based on road types is WIP at the moment.

    In the posts above RitteK had a similar question. See the last part of our reply https://forum.unity.com/threads/eas...-new-road-system.229327/page-153#post-5209760

    Thank you, glad to hear you like the tool!

    Raoul
     
  46. NCKU_Asrlab

    NCKU_Asrlab

    Joined:
    Nov 21, 2019
    Posts:
    3
    Now we have a problem.
    Yesterday we just imported newest version, v3.1.9
    But we also had imported Demo Project asset ,
    however there is another v3.1.8 version EasyRoads3D inside Demo Project package.
    Therefore we met trouble/exceptions sometimes when using it.

    Could you also upgrade Demo project asset?
    Or shoud we better download old version (v3.1.8) package to work first?
    If we must download v3.1.8 version, where can we get it.
     
  47. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,753
    The demo package will be updated as well, but the Pro version can be imported afterwards over the demo package. That way always the latest version is imported.

    Thanks,
    Raoul
     
  48. NCKU_Asrlab

    NCKU_Asrlab

    Joined:
    Nov 21, 2019
    Posts:
    3
    Initially I exported OSM file from selected region in openstreetmap website directly.
    Then I googled a free tool to convert this OSM file to KML file.
    Now I can import corresponding KML file for EasyRoads3D to work on roads for me.
    And the generated road network seems complete the same as from openstreetmap.
    Here are the osm file and kml file Im currently working with.
    https://drive.google.com/open?id=1hpdoUBTWSunyL7VDqIUhkW53nO1GQJ0x
    https://drive.google.com/open?id=1jqg0CERgG0wDTtVqzCWuSxWfsE0Pd-JH

    Currently I can have the following result
    upload_2019-11-27_23-15-23.png

    But these roads still have no "height" data received, maybe that KML file doesn't contain height information.
    upload_2019-11-27_23-19-37.png

    For now we still have a lot to learn with EasyRoads3D tool.
    I will try your suggestions with HD Roads asphalt and line marking customization for multi-lane road.
    Now I don't know how to extract correct height data of road into KML file (from openstreetmap or google map).
    Is there any suggestion about this?
    Anyway we are trying to manually pull the "highway" part to reasonable height currently.
     
    Last edited: Nov 27, 2019
  49. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,753
    Thank you for the data files, we will look at the osm file for the missing road types and also for height data if that is included. The height option is only available for KML imports so I would think this is not available for OSM. But I will double check.

    I had a quick look at the kml file. The comma seperated coordinates seem to have only 2 values, there is no height data in this specific file.

    Thanks,
    Raoul
     
  50. RitteK

    RitteK

    Joined:
    May 31, 2016
    Posts:
    6
    Hello Raoul,
    I built a motorway exit in Blender and wanted to edit it in the Connection Editor, unfortunately I get an error there, see screenshot.

    Easyroad version current Pro
    Unity3d version 2019.2.12f1 PLUS

    Error (picture):

    The model from Blender (picture):



    Please do not say my model has too many poligone. then I have to change my mind.

    greeting kevin