Search Unity

  1. Get the latest news, tutorials and offers directly to your inbox with our newsletters. Sign up now.
    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:
    5,553
    Hi konsordo,

    Which version of Unity do you use? And which HDRP package do you have imported?

    Does this happen on all materials?

    Thanks,
    Raoul
     
  2. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,553

    Hi koraybirand.

    In the first image the bridge pillars are visible. That is because the road moves downwards. To solve this please move the pilars a little bit more below the pivot point.

    Regarding tunnels. Hole creation is tricky. The tunnel in the images is tested on default Unity terrain settings, size 500x500 or 1000x1000 heightmap resolution 513.

    What are the terrain specs in your scene.

    Tunnels / hole create is v3.2 beta and is in Preview state. Reporting issues like this is very much appreciated.

    Thanks,
    Raoul
     
  3. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,553
    This tunnel preset is based on a Procedural side object type. This means a mesh in the project folder is used. This mesh is repeated. The resolution of the sidewalks cannot follow the road shape.

    This tunnel example is more intended for less curvy road / runnel shapes.

    And michealcaj asked for the road width, this is also relevant. The road width must match the tunnel otherwise there can be gaps. The tunnel can be scaled to match the road width.

    Thanks,
    Raoul
     
  4. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,553
    Hi kloogens,

    Were you able to resolve this meanwhile?

    I am not sure what happened but if all road network handles for crossings and roads are still displayed then it sounds as if the road network itself is functional.

    The next step would be to look at the status of actual road meshes. This can be done by selecting a road in the hierarchy.

    Have you tried:

    General Settings > Scene Settings > Refresh Road Network

    This button option is available near the bottom.

    Thanks,
    Raoul
     
  5. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,553
    Hi James,

    In what way have we discussed this, what is exact issue. Or do you mean more working with road networks in different scenes, terrain tiles?

    That has been brought up now and then. Usually this is done by splitting roads on borders between terrain tiles by inserting I Connectors. That way the road network can be split per terrain tile.

    Adding built-in support for this is on the list, but it can also be done through the scripting API.

    Thanks,
    Raoul
     
  6. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    504
    Raoul, don't apologize, everyone should aim to be as good at responding as you do.
     
    hopeful and marcell123455 like this.
  7. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,553
    I guess you know what I mean, coming back to check after 3 or 4 days, not receiving notifications, and then seeing a bunch of unanswered posts :)
     
    JamesWjRose likes this.
  8. kloogens

    kloogens

    Joined:
    Jul 1, 2015
    Posts:
    91
    That worked, awesome!

    Thank you.
     
    raoul likes this.
  9. JasDeVon1995

    JasDeVon1995

    Joined:
    Nov 4, 2014
    Posts:
    8
    Hi, may i ask how soon can this be implemented? It doesn't seem to be in the v3.1.9f6 (Current) - released on February 16, 2021.

    I also have another question: when i create a new road with side objects such as wooden poles for bridge, it doesn't seem be parented to the road, is there anyway i can collect all the side objects and parent them under the road object?

    Thanks again!
     
  10. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,553
    Hi JasDeVon1995,

    The focus is on releasing v3.2 at the moment. I will do some quick tests to see if this is simple to add.

    Regarding side objects, when adding side objects in the Unity editor they are parented to the road.

    Is this related to runtime road network creation also involving side objects? Because at runtime side objects are indeed not parented to the road. This is a known situation that does not have a quick solution. It is on the list to look into but since it is runtime related it should not really affect the workflow that is why this has less priority. These side objects will still be removed when necessary.

    Thanks,
    Raoul
     
  11. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    504
    Sorry for the delay in response (my turn)

    I am attempting to create a large world, that would use multiple terrains, each loaded as needed. Maybe I am overthinking this, can I simple make a series of terrains, one Road Network and then hide/show terrains and roads as necessary?
     
  12. kloogens

    kloogens

    Joined:
    Jul 1, 2015
    Posts:
    91
    I am having tons of problems right now.

    When I build my road network I get about 80 errors in the console.

    Failed extracting collision mesh because vertex at index 0 contains a non-finite value (-2589.194092, -nan(ind), -282.960175). Mesh asset path "" Mesh name ""

    When I build the road network, my terrain gets completely mangled.
    fbs.jpg

    This is what it looks like before I build the road network.
    beforefbs.jpg


    As you can see the changes to the terrain do not appear to be related to the road network.

    Furthermore, I am having issues with the "Terrain Deformation" option which is confusing the heck out of me.
    If I select that option I can no longer move the node up or down. It locks into place and again mangles my terrain. As seen here. Notice it physically moving the road and create this ditch in the terrain. This road is actually above the terrain not below, yet it is moving the road down. Creating the cliff on the left.
    gdfbs.jpg
    This is what it looks like before selecting "Terrain Deformation"
    gdmfbs.jpg


    I've spent days on this road network and about 6 hours trying to figure this out.

    I am completely dead in the water.
     
    Last edited: Mar 15, 2021
  13. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,553
    Hi James,

    How are terrains loaded? Do you mean there will be multiple scenes, each with a terrain tile?

    In that case, it depends on the complexity of the road network and how large the world will be.

    It could be created in one scene. Then for the final build the terrain tiles and matching road network objects can be saved in separate scenes.

    Or create the road network object in one scene and also load the other scenes in the hierarchy, the scenes you are working on. Then for the final builds the same approach can be followed as above, this could be coded. Per terrain get the terrain bounds and move all road network objects in that terrain tile to the specific scene.

    v3.3 will have more built-in options for this covering different approaches. The one described above. But also creating the road network in separate scenes while road objects part of scene A will still connect to scene B when both scene are loaded.

    Thanks,
    Raoul
     
  14. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,553
    Hi @kloogens,

    Is this perhaps still related to your other post last week?

    General Settings > Scene Settings > Hide White Surfaces

    This will show white surfaces surrounding all roads and crossing objects in the scene. These surfaces represent how the terrain will be adjusted.

    Can you see anything that explains the terrain deformation results?

    Also, EasyRoads3D uses Layer 31 by default. Do you have other objects in the scene on this layer? The default layer can be changed in General Settings > Scene Settings.

    This option does not lock the road markers position regardless the state. When toggled off the road will not affect the terrain. That is all it should do. Are you saying that the second last image is a direct result of toggling on "Terrain Deformation"? What happens when the road is disconnected from the crossing connection on the left?

    Thanks,
    Raoul
     
  15. bobadi

    bobadi

    Joined:
    Jan 3, 2019
    Posts:
    160
    hi. wanted to download the latest, but seems like it doesn't let me, since I downloaded it in January and this new one has the same version number (shows as if I already downloaded current, only import option)
    easyroads.jpg
     
  16. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,553
    Hi bobadi,

    I am not sure what the status is, but there are known issues in general downloading new versions of an asset from the asset store.

    To force the download you could remove EasyRoads3D Pro from:

    C:/Users/(your user name)/AppData/Roaming/Unity/Asset Store-5.x/

    In any case, the current version is still v3.1.9f6. The latest update was v3.2 beta related, the additional package in /Assets/EasyRoads3D/Beta Release/

    This package is also available on our website. v3.2 will be released very soon. Cleaning up the new demo scene project at the moment.

    Thanks,
    Raoul
     
    bobadi likes this.
  17. kloogens

    kloogens

    Joined:
    Jul 1, 2015
    Posts:
    91

    Hey Raoul.

    I've spent two days trying to figure this out and I have no idea how to isolate this down any further.

    >>Is this perhaps still related to your other post last week?

    I have no idea. Refreshing the road network did fix the terrain deformation issues though.

    >>Also, EasyRoads3D uses Layer 31 by default. Do you have other objects in the scene on this layer? The default layer can be changed in General Settings > Scene Settings.

    no problem, I don't have many layers defined, right now I'm just trying to build the world.

    Perhaps part of the problem was the Nature Manufacturer Roads pack has the T crossing prefab is scaled to 1.3.
    I created my own by adjusting the import scale settings so the prefab has a scale of 1 to see if that helps.
    I now use that T crossing instead.

    That didn't seem to fix much because I still get about 100+ exceptions

    Failed extracting collision mesh because vertex at index 0 contains a non-finite value (1631.458984, -nan(ind), 1236.605225). Mesh asset path "" Mesh name ""

    I don't get the asset name or path for 99% of the exceptions. Sometimes it says "surface" but I don't have any object or meshes of that name.

    While the terrain isn't going crazy like the images I showed above, it is still not deforming the terrain around the road properly. My guess the numerous exceptions are to blame.

    So for now I'm reduced to backing up the whole project and removing objects one at a time to see if I can get some errors to go away which will take me forever.

    Any suggestions?
     
  18. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,553
    Hi kloogens,

    In your previous post I saw two things in the images. 1) large areas of the terrain being deformed 2) roads snapping to a point far below the terrain.

    In my previous post I mentioned:

    It is not clear from your last post if you tried that? What does this look like? Do you see large surfaces covering the area of the terrain that is adjusted unwantedly?

    I also do not see what happens when disconnecting a marker from the crossing. I asked that at the end in my previous post. Are these roads still far below the terrain?

    Regarding the T Crossing, it is not recommended to scale the prefabs in the import settings. It is better to scale it in the transform settings. That is how all these prefabs are setup. But any issues with that will become visible when the white surfaces are visible.

    In general, there are no known issues of roads snapping to y = 0 (?) in the scene. Is that what is visible in your previous post? Can you email this scene so we can see on our end what exactly happens? This is the easiest way to solve this when no clear steps can be provided to reproduce the problem. If you want, the scene can be stripped to terrain heightmap only and the road network.

    Thanks,
    Raoul
     
    Last edited: Mar 19, 2021
  19. TrueProger

    TrueProger

    Joined:
    May 26, 2017
    Posts:
    40

    Attached Files:

  20. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,553
    Hi TrueProger,

    Do you mean the normals between the repeating segments?

    The model itself looks similar to the provided guardrail example. Have you compared the models, in what way is your model different?

    Thanks,
    Raoul
     
  21. TrueProger

    TrueProger

    Joined:
    May 26, 2017
    Posts:
    40
    My model is there! And the normals are not smoothly connected to each other! This is not the first time I have encountered this, and all the time I have problems with it.
     
  22. kloogens

    kloogens

    Joined:
    Jul 1, 2015
    Posts:
    91

    When I click the Hide White I would see a bunch of pink that did accurately represent the terrain distortion (mangling).
    I have an HDRP project so my guess is that is why it was pink, so no big deal.


    I isolated the issue down to the Nature Manufacturer HD Roads T Cross section.
    As soon as I removed all of them the everything worked as expected. None of my custom connectors had any issues.
    After I loaded the said model into blender and scaled it so the import, prefab, and custom prefab connector all had a value of 1 everything worked as expected.

    So everything is good.
     
  23. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,553
    Hi TrueProger,

    I know your model is there. I was just asking for further feedback because it looks very similar. The idea of these demo assets is to get familiar with the system. It looks like you used the example as a reference. So my question was very simple, what are the differences. Also with regard to the side object settings?

    Which version are you using? Do you have the Smooth Normals option in the Mesh Editor Window?

    Thanks,
    Raoul
     
  24. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,553
    Hi Kloogens,

    In case you like to fix the pink material for HDRP, it is located here: /Assets/EasyRoads3D/Resources/Materials/surfaceMaterial

    There are no known terrain deformation issues regarding the HD Roads T Crossing prefabs. Which HD Roads Crossing is that? Or is this the one you customized regarding the scaling?

    It sounds like you fully rebuild these prefabs in EasyRoads3D after changing them in Blender. That may have fixed the issue.

    Anyway, glad to hear all is good now.

    Thanks,
    Raoul
     
  25. TrueProger

    TrueProger

    Joined:
    May 26, 2017
    Posts:
    40
    version 3.1.9.f4 pro smoothness included. The picture of the settings is attached, you can at least change something, but there is little sense from this.
     

    Attached Files:

  26. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,553
    This is what I see.

    guardrail.jpg

    That is without a texture assigned to the material because there was no texture in the download.

    Thanks,
    Raoul
     
  27. TrueProger

    TrueProger

    Joined:
    May 26, 2017
    Posts:
    40
    Do it in a circle and you will see. This defect with smoothness is not always visible in a straight line.
     
  28. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,553
    It is not a straight line and I have tested sharper corners. You can cleary see different results in general. Here is another image.

    guardrail.jpg


    The version you are using 3.1.9f4 may use and older method to calculate the normals although the smoothing part is the same. Have you tried the v3.2 betas? I belief the current v3.1.9f6 also uses the newer normals caluclation which is based on the original mesh normals. If you want I can also send you the final v3.2.0f1 which will be available this week. It is already available on our website.

    Thanks,
    Raoul
     
  29. TrueProger

    TrueProger

    Joined:
    May 26, 2017
    Posts:
    40
    I will compare with the new version v3.2.0f1 how the results will be, I will write here! thank!
     
    raoul likes this.
  30. marcell123455

    marcell123455

    Joined:
    Jun 18, 2014
    Posts:
    135
    Hi Raoul,
    I found a small bug: When you duplicate a road type, then all active sideobjects of that duplicated road are set to "Default Marker", even if they were set to "Auto Generate" before. I´m using the lastest beta 10

    Thank´s
     
  31. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,553
    Hi Marcell,

    Thank you for reporting this! It is fixed in the final v3.2 release.

    Raoul
     
    hopeful and marcell123455 like this.
  32. marcell123455

    marcell123455

    Joined:
    Jun 18, 2014
    Posts:
    135
    Hi @raoul,

    I have a other small problem. I am using the "NatureManufacture Shaders/Standard Metallic Road Material" shader for my road materials. Now it want to blend two roads and used the "Easyroads3D/ED Dual Blend UV1" as transition material.
    The problem is that the blend shader does not support all the options/settings of the NatureManufacture shader. This makes the blend look wierd:

    https://imgur.com/a/F9BqizQ

    So I guess this would require creating a new shader.
    Do you think you can do that? or should I talk to the NatureManufacture support?

    Thanks!
     
  33. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,553
    Hi Marcell,

    New shaders are made for v3.2, also supporting URP and HDRP. So this will be available anyway, but a shader that truly blends the HD Roads road types might be complicated as you can only add so many textures and the HD Roads shaders are already close to this limit.

    Thanks,
    Raoul
     
  34. marcell123455

    marcell123455

    Joined:
    Jun 18, 2014
    Posts:
    135
    Oh right, totally forgot about that limit. Heh... well I guess in my case I could use a other shader aswell:
    https://imgur.com/cwhSjzh

    The only thing I am missing is a option for puddels which can reflect a cubemap from a reflection probe or something,
    but I assume something will come in 3.2.

    Thanks
     
  35. marcell123455

    marcell123455

    Joined:
    Jun 18, 2014
    Posts:
    135
    And, by the way, when I click on "Create new Blend Preset" it does nothing but gives me a error:
    ArgumentNullException: Value cannot be null.
    Parameter name: shader
    UnityEngine.Material..ctor (UnityEngine.Shader shader) (at <9674024ab0e74d27bbe9eaa30dab34d1>:0)
    EasyRoads3Dv3.ERMaterial.ODDQQDCQCC (EasyRoads3Dv3.ERModularBase scr, EasyRoads3Dv3.ERIConnector prefab) (at <f8fa30b60be34852aec434ff852afaf2>:0)
    EasyRoads3Dv3Editor.OQQOQQDDCQ.OQCCCOCCCO (EasyRoads3Dv3.ERIConnector target) (at <0ec1f17c80044660bc2039f760ca741a>:0)
    EasyRoads3Dv3Editor.OQQOQQDDCQ.OnInspectorGUI () (at <0ec1f17c80044660bc2039f760ca741a>:0)
    UnityEditor.UIElements.InspectorElement+<>c__DisplayClass58_0.<CreateIMGUIInspectorFromEditor>b__0 () (at <68af50843d0a45398c92799647332ec2>:0)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
     
  36. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,553
    It entirely depends on the HD Roads road type. For example this blend option will work well for those road types that are based on one texture, like the one in your latest image. I made a note to also add this I Connector shader. That will be in the next v3.2 demo package update. V3.2 and the new demo package is about to bve submitted to the Asset Store. The new shader package will follow next week.

    Puddles is on the list but for later.

    About creating the blend preset. I will check where this can possibly throw this error, but in order for this button to work a blend material must already be assigned using the blend shader. The textures of the involved road types will be assigned to this material.

    Thanks,
    Raoul
     
  37. marcell123455

    marcell123455

    Joined:
    Jun 18, 2014
    Posts:
    135
    Hi raoul,

    This is the blend material appied in the I connector:

    https://imgur.com/cFvpZOA

    Thanks
     
  38. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,553
    Similar examples in the demo scene use the "ER Dual Road Blend" shader. Have you tried that shader?

    In any case, I am not saying that will work. The material "Build" option uses the materials on the two involved road types and the target material. This option will not fully work when these shaders use different property names then those used in the EasyRoads3D shaders. In that case the textures can be assigned manually. I guess that is what you did.

    Thanks,
    Raoul
     
  39. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,322
    Anyone got this to work with URP?
    My road is a EasyRoads3D/Transparent/Diffuse shader and it fails when I switch to URP. Any ideas?
     
  40. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,553
    Hi creat327,

    Which package do you have imported and what is the history? "/EasyRoads3D/Transparent/Diffuse shader/" that is an older shader and it will certainly not work in an URP project.

    The HD Roads package includes HDRP and URP packages. And, as mentioned above in the converstaion with Marcell, HDRP and URP shaders will be available very soon. If you want I can already send the shaders we currently have. You can also try the built-in URP Lit shader.

    Thanks,
    Raoul
     
  41. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,322
    I've tried the URP Lit shader but it doesn't render fully on top of the terrain because it's a "transparent" shader. It seems the priority doesn't work as well as the old render queue. Any ideas?
    As for which package, I have easyroads 3d version 3 i believe.
     
  42. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,553
    It appears this is a project that also had an older version of EasyRoads3D imported, because the "/EasyRoads3D/Transparent/Diffuse shader" was removed quite a while ago.

    Yes, that is the only thing missing when using the built-in URP Lit shader, the z-fighting offset. Tomorrow I will send you the URP version of the ER Road Transparency shader.

    Thanks,
    Raoul
     
  43. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,322
    Thank you. How do you create them? Shadergraph? I´ve just switched from built in to URP today and it´s a nightmare with all the shaders not working.
     
  44. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,553
    I just sent the package in a private conversation. Hope this helps for now. As mentioned v3.2 will be submitted today or tomorrow to the Asset Store. Next week the URP and HDRP packages will be completed for both the EasyRoads3D Pro and the demo package. They will auto import in an URP or HDRP project.

    Thanks,
    Raoul
     
    creat327 likes this.
  45. marcell123455

    marcell123455

    Joined:
    Jun 18, 2014
    Posts:
    135
    Hi raoul,

    changing to that shader did not made a difference. However, let´s see what the new shaders will bring.

    Thank´s
     
  46. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,553
    Hi Marcell,

    Which road types are involved? Which shaders are assigned to these materials?

    Thanks,
    Raoul
     
  47. marcell123455

    marcell123455

    Joined:
    Jun 18, 2014
    Posts:
    135
    Hi raoul,

    in case you still have my project I used my "4L_Road" with this shader: (same image from above)
    https://imgur.com/cwhSjzh

    Then I just made a duplicate of this roadtype, made a duplicate of the material and changed the texture to a snow version. So my snowy road uses the same shader.
     
  48. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,553
    Hi Marcell,

    That also is an HD Roads Add On package material. It will not work as mentioned yesterday. This "Build" option is based on Unity standard shaders and the EasyRoads3D shaders in the main package. It will look for specific property names. I tested it yesterday with the EasyRoads3d main package materials / shaders, it worked worked well. So at the moment in your situation, where another shader is used on the roads, it is a matter of assigning the road textures manually.

    Thanks,
    Raoul
     
  49. marcell123455

    marcell123455

    Joined:
    Jun 18, 2014
    Posts:
    135
    Hi Raoul,

    I tried now switching my road materials shader to the Easyroads3D/Unity 2018 shader, but i still get this error when clicking on creat build preset:
    ArgumentNullException: Value cannot be null.
    Parameter name: shader
    UnityEngine.Material..ctor (UnityEngine.Shader shader) (at <9674024ab0e74d27bbe9eaa30dab34d1>:0)
    EasyRoads3Dv3.ERMaterial.ODDQQDCQCC (EasyRoads3Dv3.ERModularBase scr, EasyRoads3Dv3.ERIConnector prefab) (at <f8fa30b60be34852aec434ff852afaf2>:0)
    EasyRoads3Dv3Editor.OQQOQQDDCQ.OQCCCOCCCO (EasyRoads3Dv3.ERIConnector target) (at <0ec1f17c80044660bc2039f760ca741a>:0)
    EasyRoads3Dv3Editor.OQQOQQDDCQ.OnInspectorGUI () (at <0ec1f17c80044660bc2039f760ca741a>:0)
    UnityEditor.UIElements.InspectorElement+<>c__DisplayClass58_0.<CreateIMGUIInspectorFromEditor>b__0 () (at <68af50843d0a45398c92799647332ec2>:0)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    This is how my both road mat look now:
    https://imgur.com/RM9ZZUq
     
  50. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,553
    I will do further tests to see if the error can be reproduced. Or, can you please send me a package with the two road materials that are used for the blend material?

    Have you tried assigned the textures manually to the blend material?

    Thanks,
    Raoul
     
unityunity