Search Unity

  1. Unity 2019.1 beta is now available.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. We're looking for insight from anyone who has experience with game testing to help us better Unity. Take our survey here. If chosen to participate you'll be entered into a sweepstake to win an Amazon gift card.
    Dismiss Notice
  4. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  5. Unity 2018.3 is now released.
    Dismiss Notice
  6. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview 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:
    4,096
    Hello CFrosty,

    Yes, this is an 3.1.4 issue. 3.1.5 with a fix will be available later this week. If you need it urgently I can send an update.

    Thanks,
    Raoul
     
  2. CFrosty

    CFrosty

    Joined:
    May 9, 2018
    Posts:
    4
    No worries I can wait till later this week. Keep up the great work, thanks!
     
  3. Jbs_GameZone

    Jbs_GameZone

    Joined:
    Dec 14, 2018
    Posts:
    69
    I'm having an issue with T Crossings texture if the Connection width is > 12

    Here is with width 12 :

    ROADS_New_!.png

    Here is with width 18, the one that I need :

    Roads_New_2.png

    Any ideas how to fix this ?
     
  4. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,096
    Hi Jbs_GameZone,

    That is indeed related to the "Inner Segment Distance" control value. Usually this is for controlling possible line marking shapes on the edge of the road, that is why the max value is 2 at the moment. I will increase this value, it will be part of the 3.1.5 update available later this week.

    In v3.2 these exact texture specific offsets (required on crossings) can be defined in the road type settings. This will be used automatically on any crossing type using the new Flex Connector.

    Thanks,
    Raoul
     
    hopeful likes this.
  5. Jbs_GameZone

    Jbs_GameZone

    Joined:
    Dec 14, 2018
    Posts:
    69
    Great, had a hunch inner segment distance may solve it, that's why I marked it in the printscreen. I'll look fwd for the next update. Thanks
     
  6. Bogat

    Bogat

    Joined:
    May 26, 2017
    Posts:
    16
    Hello! When you try to create a prefab, two errors come out!

    Parent directory must exist before creating asset at prefab meshes/roadZap2_ER.asset.
    UnityEditor.AssetDatabase:CreateAsset(Object, String)
    EasyRoads3Dv3Editor.QDOQSQDOOQDDD:OCDQDOCCOC(GameObject, Int32, Material&, List`1&, Boolean, Boolean)
    QDDOOQOOQDDD:DoGUI()
    QDDOOQOOQDDD:OnGUI()

    UnityException: Creating asset at path prefab meshes/roadZap2_ER.asset failed.
    EasyRoads3Dv3Editor.QDOQSQDOOQDDD.OCDQDOCCOC (UnityEngine.GameObject sourceObject, Int32 connectionNum, UnityEngine.Material& mat, System.Collections.Generic.List`1& materials, Boolean recalculateNormals, Boolean recalculateTangents)
    QDDOOQOOQDDD.DoGUI ()
    QDDOOQOOQDDD.OnGUI ()
    System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)


    MODEL ROADS
    https://cloud.mail.ru/public/7i63/DEQjcZQWR
     
  7. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,096
    Hello Bogat,

    I had no issues importing the fbx in the system and it works well in the scene (no material was included in the download), two roads attached.

    bogat.jpg

    Which version of Unity do you use and which EasyRoads3D version? And when exactly do you get the error?

    In a previous update during Unity 2018.3 beta, I belief it was v3.1.2 or perhaps v3.1.3 changes were made to deal with 2018.3 changes. These could result in the error you posted. This should be fixed in the latest v3.1.4

    Thanks,
    Raoul
     
    Last edited: Feb 7, 2019
  8. Bogat

    Bogat

    Joined:
    May 26, 2017
    Posts:
    16
    It was necessary to make the mode of editing roads and everything became normal! I did not know that it works that way. Thank!
     
  9. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,096
    Glad to hear you got that working! Do you mean the road network was in Build mode when you created the new custom connection prefab in the Custom Prefab editor? I will check that.

    Thanks,
    Raoul
     
    Last edited: Feb 7, 2019
  10. Leniaal

    Leniaal

    Joined:
    Nov 7, 2012
    Posts:
    31
    Hello Raoul,

    I'm trying this workflow and it seems to work like I want. But I have an issue. I'm raising my road network by 0.07 to decrease z-fighting. This works great, but now that I go back to edit mode without restoring the terrain my road network drops back down into the terrain again. Is there a way I can keep my road network raised when going back to edit mode so it will look completely finished?
    upload_2019-2-7_17-56-46.png

    Regards,

    Lenne
     
  11. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,096
    Hello lenne,

    But that is Edit mode only. Terrain deformation is done relative to the road height that is why the Raise level is ignored in Edit mode.

    Although the road will not affect the terrain anymore with this setup, it will still raise in Build Mode to the specific offset, is that right? And is that not what you need for a finished road network?

    Thanks,
    Raoul
     
    Last edited: Feb 8, 2019
  12. Leniaal

    Leniaal

    Joined:
    Nov 7, 2012
    Posts:
    31
    Hi Raoul,

    I'm not sure I understand you correctly. But maybe I'm doing this all wrong, so I'll show you my issue.

    I have this road which is suffering from z-fighting. This is a road I want to finish, but maybe attach new roads to later on.
    upload_2019-2-8_13-46-10.png

    So I click Build Terrain.

    upload_2019-2-8_13-47-25.png

    The z-fighting issue is resolved by raising the road with 0.07. I am satisfied with the road, so I click back to edit mode without terrain restore.

    upload_2019-2-8_13-50-38.png

    And I'm back at square one.

    upload_2019-2-8_13-51-55.png

    I understand that raise road network only works in "Build Terrain" mode, but is there a way for me to keep it rissen after I go back to edit mode or is this impossible and will this only happen when I completely "Finalize" the road?

    EDIT: It's not that this is really an issue I guess, but it would just be nicer for level design purposes to have the road look finished even though it's not Finalized. If this is not possible, don't put too much effort in it.

    Regards,

    Lenne
     
  13. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,096
    Hi Lenne,

    Like discussed on the previous page, the workflow you are using is not the recommended workflow. It was added upon request and I mentioned it because you were asking for something that has a similar result. Making it possible to preserve terrain changes done in Build Mode when switching back to Edit Mode.

    Indeed, this will put the road back at raise level 0, but Edit mode is the state in which you add new roads, change the road network. After switching back to Build mode, the "finished" road will be put back at the current "Raise" level as well.

    Is keeping the road network in Build Mode not an option and switch back to Edit mode when you want to make changes? What exactly is interfering in the current situation? Or is this indeed more a request for "visual" reasons in Edit mode when working on other road sections? Perhaps this can be done in another way, adding or raising the offset on the road shader a little bit?

    Obviously, what you ask for, preserve the Raise level in Edit mode for a road that currently no longer affects the terrain can be added, but all this is something that is not really following the recommended workflow, if that makes sense. It will require changes to the code that generates the roads, the "Raise" level itself is controlled by the Y position of the parent object.

    "Finalize" is one step further after switching to Build Mode, it removes all script components. This part is not involved in this specific topic, all this is related to Edit Mode vs Build Mode.

    Thanks,
    Raoul
     
  14. Leniaal

    Leniaal

    Joined:
    Nov 7, 2012
    Posts:
    31
    Hi Raoul,

    Thanks for your quick answer. Indeed this is all purely visual, it's not very important.. more like a nice to have. The reason I have to go back to edit mode is for other roads in the scene that's why I can't stay in build mode. When finishing the scene or working with level design around this road I will just put it in build mode so it will look finished.

    I don't think it's worth altering shaders or code for, I'm satisfied with how I can work with it but I was wondering if I was missing something.

    Thanks again.

    Regards,

    Lenne
     
  15. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,096
    Ok, in that case and if you do want to improve this in Edit mode, depending on how many materials are involved, altering the shaders will probably be the easiest way here. This is a matter of changing the offset value in the Inspector. If that option is not available, it can probably be added. Let me know if you need help with that. The EasyRoads3D shaders (apart from the Standard version) can be used as an example to test this. I belief the HD Roads shaders have this option too. If not, it can be added..

    Thanks,
    Raoul
     
  16. Bogat

    Bogat

    Joined:
    May 26, 2017
    Posts:
    16
    Yes exactly!
    Another question is whether your roads work with a simple terrain mesh?
     
  17. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,096
    Hi Bogat,

    Thank you, I will check that situation.

    Roads can be created on a mesh terrain by dropping this mesh in the "Mesh Terrain" slot in "General Settings > Scene Settings". But adjusting the terrain to the shape of the roads will not work on a mesh terrain.

    Thanks,
    Raoul
     
  18. Jbs_GameZone

    Jbs_GameZone

    Joined:
    Dec 14, 2018
    Posts:
    69
    Hello,

    I'm pushing the envelope with mobile optimizations so every (extra) polygon counts. I think we're missing (or I couldn't find it) an extra setting that would allow to reduce the resolution of secondary straight sides of a T intersection. Perhaps this is a corner case since you'll only need it when the sidewalk is wide ( > 6 ) like in my case.
    Below picture should clarify exactly what I'm interested in (also wrote the settings that helped reduce polygons in other areas, it may be helpful for others) :

    Roads_Opt_1.png
     
  19. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,096
    Hello Jbs_GameZone,

    T crossings are based on X crossings. "Rounding Segments" controls the resolution of the corners.

    In the General Settings there is the option "Resolution Straight Side" below the "T Crossing" checkbox. Is that what you are looking for?

    Thanks,
    Raoul
     
  20. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,096
    V3.1.5 is available on our website

    This is a small update with recent requests and fixes for reported issues.

    https://www.unityterraintools.com/releaseNotes.php

    As always, please backup your project first before importing.

    The asset store update is being uploaded at the moment.

    Next week an update of v3.2 beta will be available as well.

    Thanks,
    Raoul
     
    Last edited: Feb 9, 2019
    JamesWjRose likes this.
  21. Jbs_GameZone

    Jbs_GameZone

    Joined:
    Dec 14, 2018
    Posts:
    69
    Hi Raoul,

    "Resolution Straight Side" below the "T Crossing" checkbox. Is that what you are looking for?
    Nope, already used that, but it doesn't affect the marked areas.
    I'll try to illustrate again :
    Below is a default T intersection before and after updating both resolution straight side and rounding segments, and it works perfectly (both corners and straight line vertices are drastically reduced) :

    EasyRoads3d_New_0.png

    The issue comes when I try to widen the sidewalk, there appear these straight areas (due to sidewalk padding), marked below with yellow, that cointain a high degree of polygons, and those areas are not affected by the resolution straight side setting :

    EasyRoads3d_New_1.png

    I was wondering if there is anything than can be done to reduce them as well.

    Thanks
     
  22. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,096
    Ok, the straight area after rounded corner. That could very well indeed be a fixed distance depending on the sidewalk width. I will make a note of that.

    You probably are aware of that and prefer the current corner radius, but just in case, increasing the radius will make the straight section smaller.

    Thanks,
    Raoul
     
  23. Jbs_GameZone

    Jbs_GameZone

    Joined:
    Dec 14, 2018
    Posts:
    69
    I will make a note of that.
    Awesome.

    increasing the radius will make the straight section smaller.
    Yes, knew that, it was already maxed out at value 5.

    Thanks
     
  24. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,096
    That must be a wide road then :)

    If you like to increase this further, the Min/Max radius slider values are controlled by minCornerRadius and maxCornerRadius in the main ERModularBase script attached to the main road network object.

    Thanks,
    Raoul
     
    Jbs_GameZone likes this.
  25. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    4,572
    In regard to very wide roads ... is it possible to make a single wide road out of two ER roads ... with one direction being one ER road, and the other direction being a second ER road?
     
  26. Izanamya

    Izanamya

    Joined:
    Apr 9, 2015
    Posts:
    5
    Hi Raoul !

    I have a "non flat" intersection, with a branch going up, no problem to create the custom prefab, but when I drag a road from the highest branch, as you can see it snaps to 0 and I couldn't find a control somewhere to tweak this height.
    Is it possible ?

    Thanks ER_HeightIssue.png
     
  27. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,096
    Hi hopeful,

    This is not yet possible out of the box.

    Just thinking of it, a possible workaround for now might be the snap connector introduced in v3.1.4.

    General Settings > Road Types > Create Snap Connector. This will create a new prefab in the project folder that works similar as the green connection handles for crossings. Roads can be attached and new roads can be started.

    These snap connectors can be added to a new prefab, the wide road snap connector at (0,0,0) the other two on the x axis halfway of each side of the wide road. This prefab will not be integrated in the road system, but could be added manually when required.

    In general for parallel roads, Terrain deformation for the two roads will overlap, so they must be aligned at the same height as long as they are parallel and close to each other.

    Thanks,
    Raoul
     
    hopeful likes this.
  28. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,096
    Hi Izanamya,

    "Non flat", crossing connections should be flat regarding terrain deformation which is relative to the local y=0

    Is this not the case for this mesh? That may cause issues. If you want you can send it to us and we will look at it.

    Thanks,
    Raoul
     
  29. Izanamya

    Izanamya

    Joined:
    Apr 9, 2015
    Posts:
    5
    No, it's not flat and we need it not to be flat, there will be a bunch of crossing like this one, connection going up or down.

    Is it not possible in easyroads and should I look for a workaround ?
     
  30. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,096
    crossings can be rotated on any if the 3 axis, in that regard the positioning of the intersection in the scene doesn't have to be flat, Roads will connect well to rotated intersections, the shape will gradually adjust

    But having the terrain flattened accurately according the exact shape of any arbitrary mesh is not possible due to the nature of the unity terrain object, grid based with a specific heightmapscale. That is why the system does this based on the local y = 0 value.

    What is on the list for custom prefabs is allow connections at different y values, that will fix the glitch in your screenshot. This will come with more control over terrain deformation per connection. But having any unity terrain object adjust according to the exact intersection shape is technically not possible

    Thanks,
    Raoul
     
  31. studentvz

    studentvz

    Joined:
    Dec 14, 2014
    Posts:
    28
    Hi,

    I'm using v3.1.5. Created simple road, added one T crossing and I get errors, also I can't move with wasd and I got scene view problems (view goes black or gray) when I select a road.

    https://imgur.com/a/5UfBfjK
     
  32. raoul

    raoul

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

    I see a T crossing with 3 roads connected. The T crossing indeed doesn't look right. How was this created? By instantiating it in the scene through Shift + click or by attaching it directly to one of the 3 roads?

    Which version of Unity do you use? And is only v3.1.5 imported or also the free demo package?

    I did two quick v3.1.5 tests in Unity 2018.3.0f2.

    1) Added a T crossing to the scene by selecting it in the Inspector and Shift + click in the scene. Then I pulled out new roads from the green connection handles. This worked well, no errors and the crossing position can be changed. It is fully responsive.

    2) Added a new road using the "Default Road" type with two markers. With marker 2 selected I attached a T Crossing from the Connections tab in the Inspector. Then I pulled out two more roads from the other two green connection handles. This too worked well, nor errors, the crossing is fully responsive.

    Thanks,
    Raoul
     
  33. studentvz

    studentvz

    Joined:
    Dec 14, 2014
    Posts:
    28
    Unity restart fixed the problems. I'm using Unity 2017.4.19f1. without a free demo package.

    I added a new road using My Custom Road type with few markers. With a marker in the middle selected I attached a T crossing from the Connections tab. After that, I created the third road and attached it manually to T crossing.

    I couldn't reproduce this issue again, maybe there was some setting in my custom road that produced this issue.

    Thanks for fast response, great support.
     
  34. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,096
    This too seems to work fine. Perhaps it is related to your custom road type, I will check that. With the current X and T Crossings you usually want to create new road type specific X and T crossings. This can be done quickly in General Settings > Road Types >Create New Connection Prefab

    Thanks,
    Raoul
     
  35. Modimage

    Modimage

    Joined:
    May 18, 2017
    Posts:
    3
    Hi,

    I got a problem with easy roads, sometimes Unity reimport prefabs in
    "Assets/EasyRoads3D/Ressources/custom prefabs"
    and
    "Assets/EasyRoads3D/Ressources/dynamic prefabs"
    and takes severals minutes to do so it's quite annoying, do someone know why this is happening?

    Thanks!
     
  36. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,096
    Hi Modimage,

    Which version of Unity do you use and which version of EasyRoads3D?

    What exactly happends, what is being displayed? Or is this connections tab / thumbnail preview related? This is updated in v3.1.5 released this week

    Thanks,
    Raoul
     
  37. Modimage

    Modimage

    Joined:
    May 18, 2017
    Posts:
    3
    I'm on unity 2018.3.0f2 and the v3.1.4 for EasyRoads3D.

    Sometimes, i think is when i made a modification on my roadnetwork or something with easyroads assets, my unity freeze, like is working on something, and after some time there is a loading screen like unity reimport my assets.


    I moved all the prefabs in the "unused prefabs" and it's look like that resolve the problem ^^'

    thanks for your reply =)
     
  38. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,096
    Did you import v3.1.4 from Unity 2018.3.0f2 or was the project upgraded to 2018.3.0f2 with v3.1.4 already imported? In that case, can you reimport 3.1.4 from the asset store to make sure the correct version is imported.

    Thanks,
    Raoul