Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. We are looking for your feedback about Templates! Tell us about your experiences by taking our survey.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    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,446
    Hi BriBill,

    Brief Vegetation Studio notes are are in General Settings > Terrain Management, https://www.easyroads3d.com/v3/html/general_settings.html#terrain

    Looking at the settings in your screenshot, that should all that needs to be done. "Active" is checked. Have you tried the "Reset All Road Types and Objects" button?

    Otherwise, the same options are available in the road type settings for each road type and also for the selected road. So when no vegetation is removed, the next step is to check these settings for the specific road type and for a road object. When these settings are indeed the same then you could select the road object in the hierarchy and see if the specific Vegetation Studio component was added. Can you pass this information?

    Thanks,
    Raoul
     
  2. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    1,751
    Check around 03:00 here and verify the marker distance:

     
  3. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,446
    Hi Rowlan,

    What exactly do you mean with verify the marker distance?

    When the Vegetation Studio component is generated as expected and still no vegetation is removed then, if that is what you mean, the next step would indeed be veryfing the Vegetation Studio component values. This part should work well, I just double checked in the latest version. It should not be necessary to make changes in the Vegetation Studio component itself (visible in the video), but this can be done optionally.

    Just in case, EasyRoads3D perimeter values of 0 means vegetation will be removed up to the left and right edge of the road.

    Thanks,
    Raoul
     
  4. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    1,751
    I just tried with the latest version of ER again to verify this. I even created a brand new project with only VSP and ER in it.

    At first I activated the settings:

    settings.png
    But the VS Mask Line didn't have the default settings above applied, all was 0:

    vsmaskline.png

    I tried to get what is displayed in the video:

    ap.png

    ie those Additional perimeter with a range slider from 4 to 0 doesn't make any sense at all.

    Then I deleted the road network and created another one for reproduction, but now the VSP settings are gone:

    vsp gone.png

    No idea what happened, but it doesn't work.
     
  5. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    1,751
    I restarted Unity and VS turned up again, there's clearly a bug somewhere.

    Interestingly now also the default values were applied. But like this:

    er2.png

    Which is wrong for a range slider. If you change it manually, the values can be corrected like this:

    fix2.png

    And then everything looks okay:

    fix1.png
     
  6. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,446
    Yes, VS options not being visible was recently reported. But more scene related, after starting or opening a new scene these options no longer appear. Restarting Unity indeed fixes that.

    This issue is solved in the current v3.2 beta. What is not solved is what you mentioned in your earlier post, deleting a road network and starting a new road network in the same scene. That will be fixed in the next update.

    Regarding the range values, when the "Max" value remains 0 and the "Min" value is higher the same value will be used for the Max value. Is that not what happens on your end? But I will make a note to change these perimeter fields into range sliders as well.

    Thanks,
    Raoul
     
    hopeful likes this.
  7. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    1,751
    No, the values are set as Min values instead of Max. It's the VSP inspector component, ER simply sets the values in the wrong property according to the screens above. A range slider goes from lower to higher value. I'm not aware that there'd be some trickery that changes the behaviour.
     
  8. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,446
    That is what I wrote, the value is set as Min value and that should work just fine.

    To be precise, the perimeter value is multiplied by 2 (necessary as this involves both the left and right side). This value is set to the Min value, the Max value remains 0. The vegation mask line is created correctly

    In the below image the Grass Perimeter value in EasyRoads3D is set to 1. In VS the value is 2 (x2) for the Min value, 0 for the Max value. The grass is removed.

    VS.jpg

    What is wrong here? VS is supported for a couple of years now. There are no known issues with this.

    As mentioned, I will change this to a range slider.

    Thanks,
    Raoul
     
    Last edited: Jan 11, 2021
  9. BriBill

    BriBill

    Joined:
    Oct 8, 2019
    Posts:
    5
    Thank you for replying so quickly, Raoul. Much appreciated!
    Today I opened my project and was very excited to find everything suddenly working as expected. I think this may have been a classic case of "turn it off/on again". That said, I also want to thank you for the additional notes which are helpful as well as Rowlan's video. Thank you both!
     
    Rowlan and raoul like this.
  10. marcell123455

    marcell123455

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

    It´s me again with a new bug report ^^
    When you have a sideobject with Alignment set to "Path Normal" AND "Average by Road Lengh" is enabeled you get a error when placing markers of a new created road that has this sideobject applied.

    If you have a road with this sideobject already created and have "Average by Road Lengh" disabeled but enable it later and update the sideobject it gets updated for the existing road and placing new markers for this road isn´t a problem.
    Can you confirm this?

    ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
    Parameter name: index
    System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) (at <9577ac7a62ef43179789031239ba8798>:0)
    System.ThrowHelper.ThrowArgumentOutOfRangeException () (at <9577ac7a62ef43179789031239ba8798>:0)
    System.Collections.Generic.List`1[T].get_Item (System.Int32 index) (at <9577ac7a62ef43179789031239ba8798>:0)
    EasyRoads3Dv3.OQQDOQOOOD.OCCOQCDCDD (UnityEngine.GameObject parentGo, System.Single curDist, System.Single scaleFactor, EasyRoads3Dv3.SideObject so, System.Collections.Generic.List`1[T] vecPositions, System.Collections.Generic.List`1[T] vecPositionsLeft, System.Collections.Generic.List`1[T] vecPositionsRight, System.Collections.Generic.List`1[T] vecPositionsCenter, System.Collections.Generic.List`1[T] vecAngles, System.Collections.Generic.List`1[T] vecDistances, System.Int32 currentVecArrayInt, System.Int32 num, EasyRoads3Dv3.ERModularRoad roadScr, System.Int32 startConnectionEnd, EasyRoads3Dv3.ERSORoadExt soData, System.Boolean mirrored, System.Boolean rotateFlag, System.Collections.Generic.List`1[T] sectionIndexes, System.Boolean shapeDirFlag, System.Int32 k) (at <1d23188b5bed49edaa1e3cc0dc8a67e1>:0)
    EasyRoads3Dv3.OQQDOQOOOD.OQQQCDQQCC (UnityEngine.GameObject go, EasyRoads3Dv3.SideObject so, EasyRoads3Dv3.ERModularRoad roadScr, EasyRoads3Dv3.ERSORoadExt soData, System.Boolean mirrored, System.Boolean isChild) (at <1d23188b5bed49edaa1e3cc0dc8a67e1>:0)
    EasyRoads3Dv3.OQQDOQOOOD.OQOCCOQCQC (EasyRoads3Dv3.ERModularBase scr, EasyRoads3Dv3.ERModularRoad roadScr, EasyRoads3Dv3.SideObject so, System.Boolean isParent) (at <1d23188b5bed49edaa1e3cc0dc8a67e1>:0)
    EasyRoads3Dv3.OQQDOQOOOD.OQDDOQQCCQ (EasyRoads3Dv3.ERModularBase scr, EasyRoads3Dv3.ERModularRoad roadScr, System.Boolean isSideObjectFlag) (at <1d23188b5bed49edaa1e3cc0dc8a67e1>:0)
    EasyRoads3Dv3.ERModularRoad.OODQCDQQOC (System.Boolean ignorePrefabAlignment, System.Boolean forceAutoRotate) (at <1d23188b5bed49edaa1e3cc0dc8a67e1>:0)
    EasyRoads3Dv3Editor.OCCQCODDQD.OnSceneGUI () (at <6bc06c5cfea24f6b841976d4fa5fdaa1>:0)
    System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <9577ac7a62ef43179789031239ba8798>:0)
    Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <9577ac7a62ef43179789031239ba8798>:0)
    System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <9577ac7a62ef43179789031239ba8798>:0)
    UnityEditor.SceneView.CallOnSceneGUI () (at <68af50843d0a45398c92799647332ec2>:0)
    UnityEditor.SceneView.HandleSelectionAndOnSceneGUI () (at <68af50843d0a45398c92799647332ec2>:0)
    UnityEditor.SceneView.OnGUI () (at <68af50843d0a45398c92799647332ec2>:0)
    System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <9577ac7a62ef43179789031239ba8798>:0)
    Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <9577ac7a62ef43179789031239ba8798>:0)
    System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <9577ac7a62ef43179789031239ba8798>:0)
    UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at <68af50843d0a45398c92799647332ec2>:0)
    UnityEditor.HostView.Invoke (System.String methodName) (at <68af50843d0a45398c92799647332ec2>:0)
    UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at <68af50843d0a45398c92799647332ec2>:0)
    UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect) (at <68af50843d0a45398c92799647332ec2>:0)
    UnityEditor.DockArea.OldOnGUI () (at <68af50843d0a45398c92799647332ec2>:0)
    UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <56474b4aa5ee4be8a067345b2ec36d81>:0)
    UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <56474b4aa5ee4be8a067345b2ec36d81>:0)
    UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <56474b4aa5ee4be8a067345b2ec36d81>:0)
    UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Boolean canAffectFocus) (at <56474b4aa5ee4be8a067345b2ec36d81>:0)
    UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUI (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus) (at <56474b4aa5ee4be8a067345b2ec36d81>:0)
    UnityEngine.UIElements.IMGUIContainer.HandleEvent (UnityEngine.UIElements.EventBase evt) (at <56474b4aa5ee4be8a067345b2ec36d81>:0)
    UnityEngine.UIElements.EventDispatchUtilities.PropagateEvent (UnityEngine.UIElements.EventBase evt) (at <56474b4aa5ee4be8a067345b2ec36d81>:0)
    UnityEngine.UIElements.MouseEventDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <56474b4aa5ee4be8a067345b2ec36d81>:0)
    UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at <56474b4aa5ee4be8a067345b2ec36d81>:0)
    UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <56474b4aa5ee4be8a067345b2ec36d81>:0)
    UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at <56474b4aa5ee4be8a067345b2ec36d81>:0)
    UnityEngine.UIElements.EventDispatcher.OpenGate () (at <56474b4aa5ee4be8a067345b2ec36d81>:0)
    UnityEngine.UIElements.EventDispatcherGate.Dispose () (at <56474b4aa5ee4be8a067345b2ec36d81>:0)
    UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <56474b4aa5ee4be8a067345b2ec36d81>:0)
    UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at <56474b4aa5ee4be8a067345b2ec36d81>:0)
    UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at <56474b4aa5ee4be8a067345b2ec36d81>:0)
    UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <56474b4aa5ee4be8a067345b2ec36d81>:0)
    UnityEngine.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <56474b4aa5ee4be8a067345b2ec36d81>:0)
    UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <819de1aa368e45faa4f78e26c97c62b0>:0)

    Thanks ;)
     
  11. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    1,751
    The problem is simply that when you find bugs in Easy Roads it's hard to get to the cause of it when there's a concept in there that just doesn't make any sense. Not to me anyway. I've been there a while ago, so I know it won't change. Still, here's the example:

    You can set the values for the line renderer in ER:

    er vs.png

    However ER multiplies the values that are explicitly set for the line renderer by 2. A single line is set throughout the road, but ER considers it as two lines.

    er lr.png

    Now for some reason there's 4 in there when there should be 2, actually 2 in both fields for min and max. 4 is way too much as default, nobody can tell from where that value came from when the user explicitly set 2. And only because there's a consistency check in VS that sets the value of max to the same as min in case min > max doesn't mean an external application should feed the interface with inconsistent values.



    Now you get into this and all of a sudden you think what did ER with the line renderer now again that the grass is still there? Where do i have to look. Do I have to search again in the doc or ask on the forum? But turns out the entire feature is gone.
     

    Attached Files:

    • er4.jpg
      er4.jpg
      File size:
      250.2 KB
      Views:
      15
    • er2.jpg
      er2.jpg
      File size:
      258.1 KB
      Views:
      16
  12. raoul

    raoul

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

    "Average by Road Length" was recently added so it may not be 100% stable, but in this case I cannot recreate the error you posted.

    I tested this on a Lamppost side object for which "Average by Road Length" was already toggled on. The alignment was changed to "Path Normal" and the side object is auto activated for the road type this was tested on. I created a new road of this type added marker, after adding the second marker the road and lampposts appear and adding more markers worked well, no errors.

    Are these the correct steps? Can you consistently recreate this error purely based on the provided steps?

    Thanks,
    Raoul
     
  13. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,446

    Hi Rowlan,

    Will you be happy with the Min / Max solution I mentioned twice? Will that deal with the situation that you have brought up in your last 3 posts, a situation that does not result in actual issues.

    When this was implemented it seemed that the value had to be multiplied with two because the perimeter value is relative to one side of the road while there are two sides. I will check this once again, and if that is actually wrong then that will be fixed.

    The video at the end of your post shows all works well as intended (keeping aside the Min max slider values you brought up which I will check). Then you create a new road network. Didn't we already discuss this here , just a couple of posts above. It is a bug already fixed in the current v3.2 beta when this is scene related, your situation a new road network in the same scene will be fixed too. Was anything not clear in that post, do you still have questions about that?

    Thanks,
    Raoul
     
  14. qpuilie

    qpuilie

    Joined:
    Jan 14, 2020
    Posts:
    53
    Hi Raoul,

    I want to commit a bug.
    I create a custom connection.And i create multiple custom connections by runtime api.It is bad.But i create default X connection is fine.Please check the attachment1.

    The create code like this:
    Code (CSharp):
    1.     void Start() {
    2.         if(_roadNetwork==null)
    3.             _roadNetwork= new ERRoadNetwork();
    4.         ERConnection lCross = _roadNetwork.GetConnectionPrefabByName("LCrossing_ER");
    5.         ERConnection xCross = _roadNetwork.GetConnectionPrefabByName("Default X Crossing");
    6.         for (int i = 0; i < 3; i++) {
    7.             _roadNetwork.InstantiateConnection(lCross, $"connection_{i}", new Vector3(i*20,0,i*20), new Vector3(0,0,0));
    8.             //But if you create an X connection,it works just fine.
    9.         }
    10.     }

    And provide a simple project(Attachment2)

    Thanks,
    Zhang
     

    Attached Files:

  15. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,446
    Hi Zhang,

    I looked at the project, the same error is thrown. This specific connection is a custom connection prefab, I see it is related to your post of last week, L connections.

    What I see is that the connection prefab is instantiated, fully functional, roads can connect. So the error seems more a warning.

    It must be runtime API related because the error is not raised for this prefab when instantiating it manually inside the Unity editor instead of through the scripting API.

    Thank you for reporting this error / warning message, I will look into it.

    Just in case, what I noticed is that the terrain is not updated in Build Mode. Looking at the prefab in the Custom Connection Editor, that is because "Terrain Deformation" is toggled off. I guess that was intentional? After switching "Terrain Deformation" on, all works well, the terrain is updated.

    Thanks,
    Raoul
     
  16. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    1,751
    No more questions. I'm done. Thank you.
     
  17. marcell123455

    marcell123455

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

    Ok, I will do more testing relating this and let you know then. However, It seems Alignment "none" is having the effect I need. But what is the difference then to "Path Normal" ?

    I have a other question. Is it possible to disable the automatic editing of the roads Left / Right indent / surrounding area at start sections when you pull a road out of a intersection node? So that every marker has the values set in the road type, no matter what.

    And I want to say thanks again, for your help, quick responses here at the forum/mail and great support for this asset :)
     
  18. qpuilie

    qpuilie

    Joined:
    Jan 14, 2020
    Posts:
    53

    Yes,this is quesstion is about L connections.
    Terrain transformation is turned off on purpose, and this problem is related to L-Connection, but my ultimate goal is to make L-Connection the same as T/X connection. The problem now is that my custom connections cannot be connected to other connection's roads with sidewalks, or there is no way to active sidewalks. Is there a way to add an L-type dynamic connection?

    Thanks,
    Zhang
     
  19. raoul

    raoul

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

    "None" means no rotation on the x and z axis, that is for example generally what you want for the side object type I tested, lampposts. For "Path Normal" the alignment is relative to the path orientation at that point, it is the same as the "Path Forward" option but in this case possible road tilting will also be included. That is not the case for "Path Forward".

    In what way are these values automatically edited? What does happen is that nearby the intersection these values are adjusted but that is purely to make sure the terrain will be adjusted in the best possible way. This is especially visible when the white surfaces surrounding the roads in Edit Mode are visible, General Settings > Scene Settings > Hide White Surfaces.

    Or which package do you have imported and what is the terrain profile? Is it the v3.2 beta, in v3.2 a start is made with auto adjusted Indent and Surrounding values based on the terrain profile. Perhaps this is involved?

    Thank you for reporting the issues you run into. We will be happy to help and when these are bugs we can fix them which will make the tool better :)

    Thanks,
    Raoul
     
    marcell123455 likes this.
  20. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,446
    Hi Zhang,

    I think this is related to what we discussed on the previous page, I suggested to use the circular control type (built-in sidewalks supported) and you mentioned that this is API related which makes the automatic positioning of markers for circular sections more complicated. That is why you were looking for an L Connector type.

    So a built-in dynamic L Connector is not so high on the list because it can already be done on the road itself. What is on the list for v3.2.x is side object support on intersections. This will require Vector3 data for the intersection edges. This same data will also be used for the v3.3 sidewalk system upgrade, built-in sidewalks on custom connections like your current L Connector prefab.

    Thanks,
    Raoul
     
  21. marcell123455

    marcell123455

    Joined:
    Jun 18, 2014
    Posts:
    110
    Hello Raoul,

    I found a bug relating auto generated bridges.
    Do these steps to recreate the error:


    ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
    Parameter name: index
    System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) (at <9577ac7a62ef43179789031239ba8798>:0)
    System.ThrowHelper.ThrowArgumentOutOfRangeException () (at <9577ac7a62ef43179789031239ba8798>:0)
    System.Collections.Generic.List`1[T].get_Item (System.Int32 index) (at <9577ac7a62ef43179789031239ba8798>:0)
    EasyRoads3Dv3.OQQDOQOOOD.OQQQCDQQCC (UnityEngine.GameObject go, EasyRoads3Dv3.SideObject so, EasyRoads3Dv3.ERModularRoad roadScr, EasyRoads3Dv3.ERSORoadExt soData, System.Boolean mirrored, System.Boolean isChild) (at <1d23188b5bed49edaa1e3cc0dc8a67e1>:0)
    EasyRoads3Dv3.OQQDOQOOOD.OQOCCOQCQC (EasyRoads3Dv3.ERModularBase scr, EasyRoads3Dv3.ERModularRoad roadScr, EasyRoads3Dv3.SideObject so, System.Boolean isParent) (at <1d23188b5bed49edaa1e3cc0dc8a67e1>:0)
    EasyRoads3Dv3Editor.OCCQCODDQD.ODQDDQODQC (System.Boolean& roadUpdate, UnityEngine.Event cEvent) (at <6bc06c5cfea24f6b841976d4fa5fdaa1>:0)
    EasyRoads3Dv3Editor.OCCQCODDQD.OnInspectorGUI () (at <6bc06c5cfea24f6b841976d4fa5fdaa1>:0)
    UnityEditor.UIElements.InspectorElement+<>c__DisplayClass58_0.<CreateIMGUIInspectorFromEditor>b__0 () (at <68af50843d0a45398c92799647332ec2>:0)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    And I have a question. Is it possible to set a percenage, how possible it is that a sideobject like a lamppost is a actually spawning?
     
  22. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,446
    And I have a question. Is it possible to set a percenage, how possible it is that a sideobject like a lamppost is a actually spawning?[/QUOTE]


    Hi Marcell,

    Which v3.2 beta are you using?

    I tried to recreate this on a new road with 6 markers with auto generated bridge sections and manually activated bridge sections like in the video. So far there have not been errors. It seems the error is thrown after manually activating a bridge section. Can you easily recreate this with new road objects?

    One thing that needs attention is, auto generated bridges at the end of a road. Currently no bridge may get created. I think it is rather unlikely that a road ends with a bridge but that will be fixed anyway.

    What should this percentage be based on? What type of side objects are involved here? For example, for auto generated guardrails this is based on the bend angle and / or the height difference with the terrain.

    Thanks,
    Raoul
     
  23. marcell123455

    marcell123455

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

    I use EasyRoads3D Pro v3.2b9.t4

    Yes I can recreat this with every bridge object at every roadtype.

    A Slider from 0 to 100 would be great. Maybe a lamppost isn´t the best example. I mean this would be good for more decoration stuff which should not repeat every time.
     
  24. marcell123455

    marcell123455

    Joined:
    Jun 18, 2014
    Posts:
    110
    Ok, I had this bug of unitys package manager. It said I have the newest version but I hadn´t. Deleting the unitypackage from the folder and downloading the newest version fixed this bug.

    Thanks ;)
     
  25. marcell123455

    marcell123455

    Joined:
    Jun 18, 2014
    Posts:
    110
    Ok, after updating to the newest beta it gives me this error when I want to build terrains heightmap and update splatmaps. The progress bar stucks at "Preparing mesh data" and no changes are made to the terrain. Even when I backup terrains and try this again, it won´t fix it.

    ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
    Parameter name: index
    System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) (at <9577ac7a62ef43179789031239ba8798>:0)
    System.ThrowHelper.ThrowArgumentOutOfRangeException () (at <9577ac7a62ef43179789031239ba8798>:0)
    System.Collections.Generic.List`1[T].get_Item (System.Int32 index) (at <9577ac7a62ef43179789031239ba8798>:0)
    EasyRoads3Dv3.OODDQQOCDO.CreateSplatMeshes (EasyRoads3Dv3.ERModularRoad scr, System.Collections.Generic.List`1[UnityEngine.GameObject]& soSplatmapObjects, System.Single splatSize) (at <05b173e906fc4a32bf33fc8765650f62>:0)
    EasyRoads3Dv3.QDQDOOQQOOQDD.OQDODOQOQC (EasyRoads3Dv3.ERModularBase scr, System.Single& minx, System.Single& minz, System.Single& maxx, System.Single& maxz, System.Single splatmapScale) (at <05b173e906fc4a32bf33fc8765650f62>:0)
    EasyRoads3Dv3Editor.ODDCCQOCQC.OQCOQCOODC (EasyRoads3Dv3.ERModularBase scr, EasyRoads3Dv3Editor.OOCDDCDOCD eScr) (at <45aea86a97a246f0a425ebff9f0131a1>:0)
    EasyRoads3Dv3Editor.OOCDDCDOCD.OnInspectorGUI () (at <45aea86a97a246f0a425ebff9f0131a1>:0)
    UnityEditor.UIElements.InspectorElement+<>c__DisplayClass58_0.<CreateIMGUIInspectorFromEditor>b__0 () (at <68af50843d0a45398c92799647332ec2>:0)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    Thanks
     
  26. raoul

    raoul

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

    Glad to hear the previous situation is fixed.

    Regarding the latest post, you mention this happens when switching to Build Mode. This is a crucial step in the road building process. There are no known issues with this. This makes it hard to give feedback on your situation since I do not know what is involved in your scene. Can you isolate the problem? You mention specifically that Splatmaps are set up to update. Do you mean that is what is causing the error? Does the error disappear after switching "Update Terrain Spaltmaps" off?

    Regardind the percentage requestr for side objects, can you give further info on how you want to use this? Does this involve multiple side objects all randomly being instantiated? In that case, there is a way to randomly spawn side objects. Just add them all to a new prefab and assign this prefab to the Source Object slot and select "Random" from the "Prefab Childs" dropdown below the Source Object. By duplicating specific childs the chance that a specific object is selected can be controlled. Or is this not what you are after?

    THanks,
    Raoul
     
  27. marcell123455

    marcell123455

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

    Yes, the building problem seems to be related to the "Update Terrain Splatmaps" option. When I disable it, the terrain builds. Say if I should send my project again if you need it.

    What I want to do is to spawn busstops, hydrants and other streetfurniture besides the roads. The problem is that it spawns to much, even when I put the distance between the objects to a high value, everything spawns at least one time per road. I need something to control the spawnrate so that it´s possible for example, to have a sideobject with a very low spawnrate, so that it might not even spawn at every road.

    I guess the option you said wouldn´t work because even if I do this, I would have to decrease the distance between objects, and then it would be possible that multiple busstops or hydrants could spawn very close to each other. So this woudn´t work.

    Thanks
     
  28. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,446
    Hi marcell123455,

    There are no known issues with the splatmap option so yes, being able to look at this scene would help a lot. If you could email the project /scene that would be very much appreciated. How many terrain Texture Layers are assigned and are all layers set up with a texture?

    The option I suggested will indeed not work is this is purely a percentage related to having that object being spawned for a road or not. I will make a note of this.

    Thanks,
    Raoul
     
  29. marcell123455

    marcell123455

    Joined:
    Jun 18, 2014
    Posts:
    110
    Ok, I uploaded my project and send you a mail with the link ;)
     
  30. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,446
    Hi Marcell123455,

    Thank you for sending the project!

    I was able to recreate this. The error was traced back to a code section that was recently updated. In previous beta releases the splatmap was still updated in road sections with auto generated retaining walls. Just like with bridges, this should not happen. It is fixed in the latest build. And this fix caused the error in your scene because specific new data was missing for the specific road in your scene.

    This is v3.2 beta, the last beta did not include an auto road network refresh / upgrade . So to check the above I did "General Settings > Scene Settings > Refresh Road Network". The terrains updated well afterwards.

    Just to confirm, could you try that as well, does updating the terain work afterwards?

    Thanks,
    Raoul
     
    marcell123455 likes this.
  31. marcell123455

    marcell123455

    Joined:
    Jun 18, 2014
    Posts:
    110
    Yepp, everything seems to work :)
    Thanks
     
  32. marcell123455

    marcell123455

    Joined:
    Jun 18, 2014
    Posts:
    110
    Hi Raoul,
    I was able to replicate the bug I had before with the bridge. Now you have my project and could try that by yourself. Made a small video again.

     
  33. raoul

    raoul

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

    The first "issue" I see is at 0.25, a gap between the auto generated bridge and the start of the road. That needs work. When an auto generated bridge section is triggered at the start of the road it can actually start at the second spline point. That becomes clearly visible when switching the shading mode to one of the Wireframe options. It will be fixed in the final v3.2 release.

    The second issue is the same as the one you posted here a couple of posts above. Is this specific road part of the project you sent? I see two similar roads in that section but they are not the same as the road in the video where marker 7 the second last marker is selected when the error happens. And activating the bridge side object on the second last marker on both similar road sections like in the movie does not result in errors. So unfortunately I am unable at this point to reproduce this.

    Thanks,
    Raoul
     
  34. marcell123455

    marcell123455

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

    Yes, the road is part of the project. Did you tested it within my project? When you go to this location and try the same steps, you can't reproduce this?

    In the first video I just used a new default road. In the second video I used the "HW_Inter_Trans_Lane". This comes out of the connection object.
     
  35. raoul

    raoul

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

    In the scene you sent both roads use "HW_Inter_Trans_Lane".

    You already posted the error above and I still cannot easily recreate it in the scene you send. So I guess this is one of these situations that will require more. To avoid back and forth communication regarding this here I send an email with a screenshot of what I see with further info/questions.

    Thanks,
    Raoul
     
  36. D_Cergy

    D_Cergy

    Joined:
    Feb 18, 2015
    Posts:
    16
    Hi Raoul,

    I'm using Easy Road for visual purpose only on relatively flat surfaces which using box colliders. I want to remove the generated Mesh Collider of the roads. I tried to remove them, but they eventually will be generated again. I cannot find any options to disable the auto generation of the collider. Disabling the component will prevent the new generation of colliders, but I don't want unused mesh assets eating up space. Do you have any suggestion?

    Thanks,
    Diori
     
  37. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,446
    Hi Diori,

    Indeed there is currently no option to disable adding colliders as it is very likely needed in general and this option has not been requested before. I will add that.

    The collider component can also be removed automatically for example after road updates or after switching to Build Mode using callbacks.

    In the ERRoadNetwork class:
    Code (csharp):
    1. public delegate void RoadUpdateCallback (ERRoad road);
    2. public static RoadUpdateCallback onRoadUpdate;
    3.  
    4. public delegate void BuildModeCallback ();
    5. public static BuildModeCallback onBuildModeEnter;
    6.  
    7. public delegate void EditModeCallback ();
    8. public static EditModeCallback onEditModeEnter;
    9.  
    10. public delegate void SideObjectUpdate(ERSideObjectInstance soInstance);
    11. public static SideObjectUpdate onSideObjectUpdate;
    We are using this for very project specific additional features.

    Thanks,
    Raoul
     
  38. D_Cergy

    D_Cergy

    Joined:
    Feb 18, 2015
    Posts:
    16
    Hi Raoul,

    Thanks for the quick reply and considering to implement this feature in future update! It will be great since there are no better alternative to create roads on flat surfaces.

    I've done the workaround per your suggestion and it removes the mesh colliders from the roads. But they still exist in crossings. How do I retrieve all the connections/crossings with GetConnections() from ERRoadNetwork class as written in the API docs?
    I've tried using road.GetConnectionAtEnd() and GetConnectionAtStart() on road update callback, but sometimes it misses some crossings.

    And I realise that these callbacks are triggered in Editor, which I'm not familiar with. Do you have suggestion where should I register the ERRoadNetwork.onRoadUpdate? I register it in Start(), and it will run after I started or enter the Play mode.

    Thanks,
    Diori
     
  39. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,446
    Hi Diori,

    Indeed GetConnections() in the ERConnections class could be used for crossings.
    Code (csharp):
    1. // Get a reference to the road network object
    2. ERRoadNetwork roadNetwork = New ERRoadNetwork();
    3.  
    4. // Get the connextion objects
    5. ERConnection[] connections = roadNetwork.GetConnections();
    The collider component can be accessed through the gameObject property in the ERConnection class.

    Regarding the callback approach, attached is a package with two scripts. Add the ERCallback script to the road network object and have a look at the ERCallbackEditor script in /Assets/EasyRoads3D/Editor/

    Thanks,
    Raoul
     

    Attached Files:

    D_Cergy likes this.
  40. denis3510

    denis3510

    Joined:
    May 16, 2020
    Posts:
    10
    Hi, I bought the asset and have all the preset road types, I am trying to create tunnel but can't manage to do it and i can't find any info on that.. maybe anyone can help me to figure out how to make tunnels and bridges?
     
  41. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,446
    Hi denis3510,

    Tunnels is a v3.2 feature which is in beta. The beta package is located in /Assets/EasyRoads3D/Beta Release/

    Do you have this package imported?

    This package includes a small v3.2 beta demo scene with two tunnel examples.

    Additional provisional v3.2 info can be found here: https://easyroads3d.com/v3beta.php

    Please let me know if that does not help.

    Thanks,
    Raoul
     
  42. denis3510

    denis3510

    Joined:
    May 16, 2020
    Posts:
    10
    It did help! , I managed to figure it out and all the thing with the terrain holes i managed to fix it, still one last thing is how i change the size of the tunnel?
    i made a road with width of 20 and the tunnel still the same size which is small for my road..,
    Thanks for fast reply it help a lot!
    Denis
     
  43. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,446
    Glad to hear that worked!

    In v3.2 there is a scale option in the Side Object Manager in the General Settings. You could try that.

    But this is tricky with regard to the terrain hole creation, you may have to tweak the start / end offset value to match the new scale. Tunnels is in Preview state, it will be optimized further.

    Also in the case of tunnel objects scaling the side object may not be ideal. If you do modelling then you may want to have a look at the setup of these tunnel side object examples. They are based on a model, you can create and import your own unique tunnel prefabs.

    Thanks,
    Raoul
     
  44. denis3510

    denis3510

    Joined:
    May 16, 2020
    Posts:
    10
    I am trying to find the option and i think i tried to change every option in the the side object, yet nothing changed the size of the tunnel size.. i will upload screenshot of my tab, I am sorry but i am very noob and i am just at my beginning of the game dev journey.. maybe you can tell me wich one of this option is it ? 2021-01-19 20_53_49-OFF-Road For Testing - Microsoft Visual Studio.png 2021.png

    Thank you very much!
    Denis
     
  45. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,446
    I had a look, that is actually correct. The Scale option is not active in the current beta build. It will be in the next update.

    Another way is to scale up the mesh of the prefab in the project folder, the prefab that is assigned to the "Source Object" slot. Afterwards press the "Refresh" button on the right of this slot. This should be all for the concrete tunnel type.

    The Rock tunnel is based on defined start / end sections in the Mesh Editor window, the "Open Mesh Editor Window" button at the bottom in the "General Settings" section. So this one is a little bit more complicated especially when you are just starting, you are jumping straight into the deep with tunnels and the beta :)

    Thanks,
    Raoul
     
  46. denis3510

    denis3510

    Joined:
    May 16, 2020
    Posts:
    10
    Hi, i made it with the concrete tunnel, i changed the mesh size of the source object and this solved everything now i have perfect tunnel

    Thank you very much Raoul! its a great peace of a tool !
    Denis
     

    Attached Files:

    raoul and hopeful like this.
  47. Sk4tOoR

    Sk4tOoR

    Joined:
    Sep 19, 2018
    Posts:
    14
    Hello,

    I'm running into issues while creating a simple SideObject (Guard Rail Right v2). It is created the common way Add New Road / Object -> Check Side Object -> Add New Object. After placing the second marker suddenly the rail disappears. Only the blocks and the end of the rail are displayed. You can read the full exception below. A simple picture is append as well.

    The problem started at the moment I changed the source prefab. I simply changed the material. After reverting this action the problem still exists. I'am working with version control. Maybe its the reason for problems like this? My ER Version is 3.2.b8. Any idea how to place guard rails again?

    Thank you

    Code (CSharp):
    1. ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
    2. Parameter name: index
    3. System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) (at <fb001e01371b4adca20013e0ac763896>:0)
    4. System.ThrowHelper.ThrowArgumentOutOfRangeException () (at <fb001e01371b4adca20013e0ac763896>:0)
    5. EasyRoads3Dv3.OQODODQDOD.ODCQOOOCOO (UnityEngine.GameObject parentGo, System.Single curDist, System.Single scaleFactor, EasyRoads3Dv3.SideObject so, System.Collections.Generic.List`1[T] vecPositions, System.Collections.Generic.List`1[T] vecPositionsLeft, System.Collections.Generic.List`1[T] vecPositionsRight, System.Collections.Generic.List`1[T] vecPositionsCenter, System.Collections.Generic.List`1[T] vecAngles, System.Collections.Generic.List`1[T] vecDistances, System.Int32 currentVecArrayInt, System.Int32 num, EasyRoads3Dv3.ERModularRoad roadScr, System.Int32 startConnectionEnd, EasyRoads3Dv3.ERSORoadExt soData, System.Boolean mirrored, System.Boolean rotateFlag, System.Collections.Generic.List`1[T] sectionIndexes, System.Boolean shapeDirFlag, System.Int32 k) (at <f8f947793d71411996d71f3e4c5e551e>:0)
    6. EasyRoads3Dv3.OQODODQDOD.OQDQQQCQQQ (UnityEngine.GameObject go, EasyRoads3Dv3.SideObject so, EasyRoads3Dv3.ERModularRoad roadScr, EasyRoads3Dv3.ERSORoadExt soData, System.Boolean mirrored, System.Boolean isChild) (at <f8f947793d71411996d71f3e4c5e551e>:0)
    7. EasyRoads3Dv3.OQODODQDOD.ODCCCQDODO (EasyRoads3Dv3.ERModularBase scr, EasyRoads3Dv3.ERModularRoad roadScr, EasyRoads3Dv3.SideObject so, System.Boolean isParent) (at <f8f947793d71411996d71f3e4c5e551e>:0)
    8. EasyRoads3Dv3.OQODODQDOD.ODQOCDOCDD (EasyRoads3Dv3.ERModularBase scr, EasyRoads3Dv3.ERModularRoad roadScr, System.Boolean isSideObjectFlag) (at <f8f947793d71411996d71f3e4c5e551e>:0)
    9. EasyRoads3Dv3.ERModularRoad.OCQODOOOQQ (System.Boolean ignorePrefabAlignment, System.Boolean forceAutoRotate) (at <f8f947793d71411996d71f3e4c5e551e>:0)
    10. EasyRoads3Dv3.ERModularRoad.OQCCOODCOC (UnityEngine.Vector3 pos, System.Int32 selectedMarker) (at <f8f947793d71411996d71f3e4c5e551e>:0)
    11. EasyRoads3Dv3Editor.OQDOQODCDO.OnSceneGUI () (at <11cc78afe204437fbc14ddba7e7d4c8e>:0)
    12. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <fb001e01371b4adca20013e0ac763896>:0)
    13. Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    14. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <fb001e01371b4adca20013e0ac763896>:0)
    15. System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <fb001e01371b4adca20013e0ac763896>:0)
     

    Attached Files:

    • 01.PNG
      01.PNG
      File size:
      2.3 MB
      Views:
      12
  48. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,446
    Hello Sk4tOoR,

    I will check this particular side object. In any case "Guard Rail Right v2" is the side object that was part of the previous v2 package and it will no longer be part of the upcoming v3.2 demo package. It is recommended to use the other Guard Rail left and Right side objects in the current demo package. And in fact, if you are using the v3.2 beta then one of these two side objects can be used for both the left and right of the road.

    Regarding the error, how was the prefab changed and what exactly where the steps afterwards? Did you Refresh this side object after the changes? The "Refresh" button is located on the left of the "Source Prefab" slot.

    Thanks,
    Raoul
     
  49. denis3510

    denis3510

    Joined:
    May 16, 2020
    Posts:
    10
    Hi, i am working on my road network and i tried to test this on android mobile phone, and there is problem with the road in some areas the road desaapears only while i am above the road, i will upload pictures WhatsApp Image 2021-01-22 at 21.21.05.jpeg WhatsApp Image 2021-01-22 at 21.20.52.jpeg WhatsApp Image 2021-01-22 at 21.21.16.jpeg
    The problem accures only when i test on the mobile device, When i test on the unity game player the road is ok and nothing dessapears. Any one know how can i fix this issue?
     
  50. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,446

    Hello Denis,

    I cannot see how the results are different in an android mobile device compared to the Unity editor?

    The Troubleshooting page in the manual covers all possible terrain related issues and includes fixes.

    First question, does anything change to the terrain after switching the road network into Build Mode? Is the terrain heightmap updated afterwards?

    What is the terrain size and heightmap resolution?

    What is the "Raise" value of the road network? This is visible in the Inspector after switching to Build Mode.

    Especially in the first image it seems the terrain does not really match the road. The last image shows reasonable height difference and a curved road. That can cause issues especially in bends, the terrains heightmapscale might not make it possible to update the terrain exactly accordingly the road shape. But that should already be visible in the Unity editor.

    Thanks,
    Raoul
     
unityunity