Search Unity

EasyRoads3D v3 - the upcoming new road system

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

  1. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,630
    Hi Stefan,

    1. Yes, that is possible through the scripting API, roads can be created and the shape can be baked in the terrain afterwards. The runtime scene in the main EasyRoads3D package includes a simple example of this.

    2. That is also possible either by moving the markers upwards and removing the road mesh. Or, better, this can be done using the shape type of side object. An example of this is the river bed side object in the additional free demo package. The advantage of this approach is that you can define the exact shape of the ridge and no road mesh will be created. The idea is the same as for the river bed side object, only the nodes in the Shape Editor window will be above y = 0 instead of below y = 0 like in the river example.

    Thanks,
    Raoul
     
    Last edited: Jun 13, 2019
  2. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,630
    Hi Christopher,

    Because you mention Build Mode, first thoughts are this is related to original terrain data that is stored in order to restore the terrains when switching back to Edit Mode. But 16GB seems like a lot although a 4097x4097 already uses a lot more then a 513x513 terrain.

    What does the scene look like? How many terrains, terrain resolution and does the road network cover the full area?

    Thanks,
    Raoul
     
  3. MadAboutPandas3

    MadAboutPandas3

    Joined:
    Jul 3, 2017
    Posts:
    26
    Hi Raoul,

    thanks for your quick answer! That was my initial thought too. After your post I just finalized the roadnetwork (which appropriately clears the temp data) and it works smoothly. Since we revert the scene and terrain anyways this is a perfect match for our build pipeline.

    Thanks again for solving this issue,
    Christopher from Mad About Pandas
     
  4. MadAboutPandas3

    MadAboutPandas3

    Joined:
    Jul 3, 2017
    Posts:
    26
    Just a quick add on question, after conversing with a dev, would it be possible for you to provide code so that we could call whatever the "Finalize" Button does within a script? As we need to do repeat this process for several scenes and would be grateful if that were to be automated.
     
  5. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,630
    Hi Christopher,

    Indeed the Finalize option will remove all EasyRoads3D script components including the stored original terrain data.

    Automating this process can be done through the scripting API

    Code (csharp):
    1. // create a reference to the road network object in the scene
    2. ERRoadNetwork roadNetwork = new ERRoadNetwork()
    3.  
    4. // Finalize
    5. roadNetwork.FinalizeObjects();
    Thanks,
    Raoul
     
  6. marcrem

    marcrem

    Joined:
    Oct 13, 2016
    Posts:
    153
    Hi Raoul

    We had some problems with source control and it somehow messed our roads. Here's a screenshot of our "playground" scene where we test our different road types. We are using the HD Roads add-on, and I reimported the entire add-on, but as you can see something is wrong.

    Any idea how I can fix that?

    Thanks! Screen Shot 2019-06-14 at 11.02.06 AM.png
     
  7. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,630
    Hi Marcrem,

    Does the same happen in a new project? If not, then what is different in this project? What type of Unity project is this and which version of Unity? Are there shader errors?

    Thanks,
    Raoul
     
  8. marcrem

    marcrem

    Joined:
    Oct 13, 2016
    Posts:
    153

    Thanks for helping,

    I found the solution! The git faulty manipulation that we did actually reverted our project settings to the gamma color space. Changing it back to linear fixed it!

    I do have a question now though, why can't I connect this road to the connector? Screen Shot 2019-06-14 at 4.03.25 PM.png
     
  9. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,630
    Glad to hear you managed to fix that issue.

    Regarding the connection issue, I am not sure. These seem to be all HD Roads assets as well. The selected road name is NM_Asphalt_No_Lines_002. This appears to be the NM_Asphalt_No_Lines road type, but the the road type dropdown is empty, no road type is selected. Which prefab type are the two connection prefabs? Can you try disconnecting the road from the right prefab. This will enable the road type dropdown, this way the specific road type can be selected again. Does the road connect to both crossings afterwards?

    Thanks,
    Raoul
     
  10. marcrem

    marcrem

    Joined:
    Oct 13, 2016
    Posts:
    153
    Here's what happens then. My partner (level designer) made videos to explain what's happening.
    Bug 1 :


    Bug 2 :


    And here are the errors we see popping in the console.

    Code (CSharp):
    1. Failed setting triangles. Some indices are referencing out of bounds vertices. IndexCount: 159, VertexCount: 350
    2. UnityEngine.Mesh:SetTriangles(Int32[], Int32)
    3. EasyRoads3Dv3.ERModularRoad:OOQQDQCQQD(Boolean, Boolean)
    4. EasyRoads3Dv3Editor.OODCCOQODQ:OnInspectorGUI()
    5. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    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 <f2e6809acb14476a81f399aeb800f8f2>:0)
    4. System.ThrowHelper.ThrowArgumentOutOfRangeException () (at <f2e6809acb14476a81f399aeb800f8f2>:0)
    5. System.Collections.Generic.List`1[T].get_Item (System.Int32 index) (at <f2e6809acb14476a81f399aeb800f8f2>:0)
    6. EasyRoads3Dv3.OOOQOODOOO.OQDDOQCQCO (EasyRoads3Dv3.ERModularBase baseScript, EasyRoads3Dv3.ERMarkerExt marker, System.Collections.Generic.List`1[UnityEngine.Vector3]& soSplinePointsLeft, System.Collections.Generic.List`1[UnityEngine.Vector3]& soSplinePointsRight) (at <95f776a319394729926e002514760aa1>:0)
    7. EasyRoads3Dv3.OOOQOODOOO.OQOQCCOCOC (EasyRoads3Dv3.ERModularBase baseScript, System.Collections.Generic.List`1[T] markers, System.Collections.Generic.List`1[UnityEngine.Vector3]& soSplinePointsLeft, System.Collections.Generic.List`1[UnityEngine.Vector3]& soSplinePointsRight, System.Boolean& hasExits) (at <95f776a319394729926e002514760aa1>:0)
    8. EasyRoads3Dv3.ERModularRoad.OOQQDQCQQD (System.Boolean ignorePrefabAlignment, System.Boolean forceAutoRotate) (at <95f776a319394729926e002514760aa1>:0)
    9. EasyRoads3Dv3Editor.OODCCOQODQ.OOCDOQDDQO (UnityEngine.Vector3& hitPos, System.Boolean OODQODCODO, UnityEngine.Event cEvent, EasyRoads3Dv3.ERModularBase scr) (at <542c552f956a4940bb3364f57c27fbec>:0)
    10. EasyRoads3Dv3Editor.OODCCOQODQ.OCDCODCCCC (UnityEngine.Vector3 pos, System.Boolean OODQODCODO, UnityEngine.Event cEvent, EasyRoads3Dv3.ERModularBase scr, System.Boolean dragStageFlag) (at <542c552f956a4940bb3364f57c27fbec>:0)
    11. EasyRoads3Dv3Editor.OODCCOQODQ.OnSceneGUI () (at <542c552f956a4940bb3364f57c27fbec>: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 <f2e6809acb14476a81f399aeb800f8f2>: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 <f2e6809acb14476a81f399aeb800f8f2>:0)
    15. System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <f2e6809acb14476a81f399aeb800f8f2>:0)
    16. UnityEditor.SceneView.CallOnSceneGUI () (at C:/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:2605)
    17. UnityEditor.SceneView.HandleSelectionAndOnSceneGUI () (at C:/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:1910)
    18. UnityEditor.SceneView.OnGUI () (at C:/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:1757)
    19. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <f2e6809acb14476a81f399aeb800f8f2>:0)
    20. Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    21. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <f2e6809acb14476a81f399aeb800f8f2>:0)
    22. System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <f2e6809acb14476a81f399aeb800f8f2>:0)
    23. UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:295)
    24. UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:288)
    25. UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:261)
    26. UnityEditor.DockArea.OldOnGUI () (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:392)
    27. UnityEngine.Experimental.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, System.Boolean isComputingLayout) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:238)
    28. UnityEngine.Experimental.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:376)
    29. UnityEngine.Experimental.UIElements.IMGUIContainer.HandleEvent (UnityEngine.Experimental.UIElements.EventBase evt) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:355)
    30. UnityEngine.Experimental.UIElements.EventDispatcher.DispatchEvent (UnityEngine.Experimental.UIElements.EventBase evt, UnityEngine.Experimental.UIElements.IPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:260)
    31. UnityEngine.Experimental.UIElements.UIElementsUtility.DoDispatch (UnityEngine.Experimental.UIElements.BaseVisualElementPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:243)
    32. UnityEngine.Experimental.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:74)
    33. UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:171)

    EDIT : The terrain was made using Real World Terrain.
     
    Last edited: Jun 15, 2019
  11. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,630
    Hi Marcremn,

    In my reply I asked for the road type (I assume the road type is NM_Asphalt_No_Lines) and which exact prefabs are involved. Can you pass this information?

    This is essential info to test if the problem can be recreated.

    There are two blocks with errors in your last post. The first block shows one error related to triangles referencing non existing vertex indexes. The second shows an ArgumentOutOfRangeException. Are these two errors related? How can this be reproduced? It is a little bit unclear to me what you exactly do in the second video starting at 0.06, the Inspector is not clearly visible, is this "Attach Lane" related? In that case, please ignore that, it is experimental, certainly with the HD Roads package assets.

    Thanks,
    Raoul
     
  12. marcrem

    marcrem

    Joined:
    Oct 13, 2016
    Posts:
    153
    The prefab is Asphalt_NoLines_ER_X.

    yeah the "attach lane" is what was used. The errors happens when "attach lanes" is checked and then we try to move a point.
     
  13. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,630


    Hi marcrem,

    Thank you for the additional info. The Asphalt_NoLines_ER_X prefab appears to work fine. With the road selection the handle on the connection displays in green, not red like in your screenshot. The road type does display the dropdown and it connects fine with the other crossing. This is also tested with the current 3.2 beta.

    HDRoads2.jpg

    HDRoads1.jpg

    Do you have the same issue in anew project? Does a package reimport indeed not fix this?

    Regarding the "Attach Lane" errors, I assume you have the v3.2 beta imported in your project? This is motorway exit lane related, as mentioned the "Attach Lane" option is experimental and should actually not have been included in the latest beta.

    Motorway exits is being worked on at the moment. Here is an impression, for example line markings for example need to be added.
    motorwayv3.2.jpg

    Thanks,
    Raoul
     
  14. marcrem

    marcrem

    Joined:
    Oct 13, 2016
    Posts:
    153

    Thanks raoul. So in order to "reinstall" easyroads 3d? Should I simply delete all ER related folders and files, then reimport? We are using the 3.2 beta, should I install the regular stable version, then import the beta package? What about the HD roads pack, should I avoid importing some of their files? Thanks again
     
  15. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,630
    For which purpose do you want to reinstall the EasyRoads3D package itself?

    The issue with connecting the specific NM_Asphalt_No_Lines road type with the Asphalt_NoLines_ER_X prefabs could be related to an issue with these prefabs in your project. In that case simply reimporting the HD Roads package should fix that.

    Thanks,
    Raoul
     
  16. marcrem

    marcrem

    Joined:
    Oct 13, 2016
    Posts:
    153

    Well since your answer was that it works for you, while for us, we get errors like shown in the videos, I figured I'd need to reinstall a fresh ER3D maybe? I already re-imported the HD roads package.

    Could it be a problem related to a real world terrain created terrain?
     
  17. marcrem

    marcrem

    Joined:
    Oct 13, 2016
    Posts:
    153
    I mean it doesn't make sense at all:

    1. Selected the connector. From that connector, I can start a road by dragging one of the points.
    2. It works, we have a road created and it's connected to the connector.
    3. Now let's try to connect that new road to another connector that looks just like this one. The green point that we want to connect to will turn RED and we CAN'T connect it.
    4. Now even more weird: Let's say we disconnect the road from the first connector. Remember it was created FROM THE CONNECTOR. well guess what? Can't connect it back.

    Something must be wrong somewhere :(

    EDIT : Just tested on a brand new scene in the same project. Regular unity terrain. It all works fine. So it's something related to the terrain maybe.
     
  18. marcrem

    marcrem

    Joined:
    Oct 13, 2016
    Posts:
    153
    Side note: When dragging a road on a compatible node to create a connector, it creates a connector with sidewalks by default. Any way to change the default connector? Thanks :)
     
  19. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,630
    Hi marcrem,

    I belief the conversation is about two issues:

    1. The errors in the console which from your video appears to be related to "Attach Lane" in v3.2 beta. The "Attach Lane" option is experimental, reimporting The official v3.1 version will not fix this issue. An EasyRoads3D reimport is not required for this, just avoid using the Attach Lane option.

    2. The second issue is related to the specific situation in the screenshot you posted. A short road section between two connection prefabs, one prefab shows red handles meaning the road cannot connect. I posted a screenshot with all this working. Meanwhile you did confirm in another conversation we have that indeed the terrain is involved here, a 1000x1000 terrain with heightmap resolution 32, this is a fairly low detailed terrain with a grid size of about 31 units, not ideal for creating roads in general unless the terrain is almost flat. And you mentioned that increasing the terrain heightmap resolution does fix the problem.

    With the original terrain heightmapscale, the road will only cover one terrain cell in the situation in your screenshot. This will not work well unless the two connection prefabs are on exactly the same height so perhaps that is why the connection handle displayed in red. I will check this situation because even with this heightmapscale it should still be possible to connect the road between the two crosisngs if these crossings are exactly at the same height.

    Thanks,
    Raoul
     
  20. PhilipZ0

    PhilipZ0

    Joined:
    Mar 5, 2019
    Posts:
    16
    Thank you for the fast answer. I have bought the Easy Roads Pro and it is great. I also have managed to create 3 roads segments that are repeating deleting and instancing as vehicles move over them.

    I have a question about creating the default road but with 3 or 4 tracks and also I didn't find road type as highway and similar types of roads. Keep up the good work. Cheers
     
  21. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,630
    Hi PhilipZ0,

    Good to hear you are making progress with the scripting API and the infinite road.

    The EasyRoads3D Pro package itself includes limited assets. The free (if you have Pro) demo package includes more road types. All the assets used in the demo video and tutorials on the website are part of this package.

    https://assetstore.unity.com/packages/tools/terrain/easyroads3d-demo-project-105045

    And you can create new road types with your own materials in General Settings > Road Types

    Let me know if you have further questions

    Thanks,
    Raoul
     
  22. marcrem

    marcrem

    Joined:
    Oct 13, 2016
    Posts:
    153
    Thanks again Raoul, what a great customer service!

    Now, this issue is new to us, it never happened in the past. What is this "surface" object? They seem to be constantly visible in the scene even though "Highlight indents" is turned off.

    surface.png
    64555680_1054713221394733_31704211628490752_n.png
    64302953_2250005555075586_1422372767616991232_n.png

    And finally, as we need to have a road that goes from 1 lane on each side only, to the same with turn lanes near the intersection, what do you suggest us to do to "fake" it for now? See google maps example here :

    Screen Shot 2019-06-17 at 2.36.12 PM.png

    This scene is only going to be used for a video, so if you have a quick way of cheating / faking it in mind for now, it'll be fine.

    Thanks!!!
     
  23. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,630
    Hi Marcrem,

    The Highlight options in the third image is for the selected road only and give an indication of how the terrain will be affected by the road network. The white surfaces surrounding all the roads in the first 2 images give a true representation of how the terrain will be affected. "Hide White Surfaces" below the "Highlight" options in the third image controls the visibility of these surfaces in Edit Mode. In Build Mode they will always be hidden.

    Regarding the second question, lane changes on the same road is not possible at the moment through a built-in solution. There are three options:

    1) A modeled connection piece for the transition with on one end the two lane section attached and on the other end the four lane section.

    2) Use two different road types and connect the two with an I Connector. The I Connector can be setup so the width transition is part of it. The material on the I Connectormust be asphalt only. The line markings on this transition can be done with side objects. Both the demo package and the HD Roads package include examples of line markings done with the side object system. But because they will be on top of the I Connector, in this case you don't want to activate them for the road objects. Instead create them as separate objects (the "Side Object" checkbox for new objects) on top of the I Connector section.

    3) Use asphalt only for the road material. Create the width transition by changing the width of the road. The N key toggles this option on /off. The road shape nodes will become visible and selectable per marker. This way the road shape can be adjusted per marker either in Scene View or in the Inspector further below in the marker section. In this case, all line markings need to be done using side objects.

    Thanks,
    Raoul
     
  24. Binary-Soul

    Binary-Soul

    Joined:
    Nov 25, 2014
    Posts:
    23
    Good evening,

    I've been looking around the API but there's two functionalities I can't seem to find.

    There is a "No terrain deformation" toggle on the Editor that you can tick on/off for every marker, I can't find how to do this in code.

    Also, when dealing with the indenting and surrounding of a road's markers, I know how to:
    - Edit indent value: road.SetIndent(value, index, ERRoadSide);
    - Edit surrounding value: road.SetSurrounding(value, index, ERRoadSide);

    But I can't seem to find how to edit the "Indent Alignment" in code.

    It's probably just there and I can't see it, but I'd really appreciate your help as I can't seem to find them.

    Thank you.
     
  25. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,630
    Hi Binary-Soul,

    Not all Inspector options are available yet in the scripting API. This is indeed the case for the terrain deformation and Indent Alignment options. They will be added for the next update.

    Thanks,
    Raoul
     
  26. Binary-Soul

    Binary-Soul

    Joined:
    Nov 25, 2014
    Posts:
    23
    Oh ok, thanks Raoul, I'll have to make do without them for now I guess. Any estimated time of release on the next update?

    Thank you for the great support by the way!
     
  27. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,630
    Most work is done on v3.2 at the moment. The current official v3.1.x releases include fixes for reported bugs and small improvements like your API "requests". There is no v3.1.x update planned at the moment but I will see if this can be done somewhere next week if you need this.

    Thanks,
    Raoul
     
    40detectives likes this.
  28. Untitl3d

    Untitl3d

    Joined:
    Jun 20, 2019
    Posts:
    5
    Hi
    When will you release EasyRoads v3.2 in Asset Store?
     
  29. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,630
    Hi Untitl3d,

    The v3.2 betas are available on our website. Do you mean when these betas will be available on the asset store or when the official release will be?

    v3.2 is a large update, given that there is still a fair amount of work to do on motorway exits and sidewalks, it is hard to say when the official release will be.

    Is there something specific you are waiting for?

    Thanks,
    Raoul
     
    Untitl3d likes this.
  30. Untitl3d

    Untitl3d

    Joined:
    Jun 20, 2019
    Posts:
    5
    Nothing really, Was just wondering for an estimated official release date of your asset. we don't use the beta variants as they make game designing a bit of a hassle sometimes!

    I'd use the shaders that are editable via ShaderGraph for the EasyRoads V3.2 final. I reckon this new render pipeline feature of Unity should come out of beta soon!
     
    Last edited: Jun 24, 2019
  31. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,630
    Hi Untitl3d,

    v3.2 is a major update. For example, the current sidewalk options do not work well on the v3.2 Flex Connector, hence the sidewalk system will get an upgrade as well in v3.2. New features are included in the betas once they have passed the alpha status.

    If you like to use for example the built-in X crossings and T crossings with the current sidewalk options for a city environment and the Flex Connector without sidewalks in other areas, the current beta should already work well for you. That is why I asked if you were waiting for something specific.

    Any material can be assigned to the roads and crossings both to individual roads and to road type presets so that should work well.

    Thanks,
    Raoul
     
  32. Thomas-Pasieka

    Thomas-Pasieka

    Moderator

    Joined:
    Sep 19, 2005
    Posts:
    2,112
    Hi @raoul

    So I am trying to use EasyRoads3D on a client project but have run into several issues. I read up some on what people are experiencing using your plugin here so I made sure to follow some of the advise. However, even though I am making sure to use a Road Type I still run into issues trying to connect Roads to Intersections quite often.

    In fact, when I do to manage to get it to work then all of a sudden the sidewalk doesn't work any longer. More often than not it feels like I am fighting the plugin trying to get it to do what I want. It seems something always breaks somewhere else once I have solved an issue. It's a constant cycle of trying to make things work. Additionally there is very little documentation on how to create "Decals" (I did manage to create my own but it was guess-work and luck).

    I am sure you heard it before but your video tutorials are not exactly helpful as you don't do voice overs which greatly diminishes their usefulness. So as it stands we're running into a ton of issues and could really use some pointers.

    I'd love to see quick/short voiced tutorials that cover one topic alone. Quick and to the point so I don't have to scrub and search for what I am after. Below are some odd behaviors...





     
  33. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,630
    Hello Thomas,

    First Video: I see two things

    1) I see a marker being disconnected and in the same drag operation being reconnected again. That will not work well, if you want to reconnect it, then please restart the drag operation.

    2) The red handle at the end on the connection you want to attach the road to. This particular road has sidewalks active on both sides. Can you select the specific crossing and check if the sidewalks are active for the road that will be attached to this connection? The outer handles, are they grey or green

    In v3.2 sidewalks will get an upgrade which will also include improvements to situations like this where sidewalk settings on crossings and roads do not match.

    Second video:

    0.29 the crossing is selected. Referring to 2) in the first movie, I don't know if this is on purpose, but this crossing shows several grey handles, meaning that sidewalks are inactive for the attached roads. That is what I described above.

    It seemed the road you were dragging in the beginning of the video did not have sidewalks. At 0.29 the crossing prefab is selected, it shows that this connection does have green handles, sidewalks are active. That would explain the red handle and why the road did not connect.

    The same situation at the end of the video, since the initial road did not have sidewalks and was pulled out of this connection I assume sidewalks are off for this prefab connection?

    Does this situation with green and grey active/inactive handles cover the issues you are having with sidewalks?


    Third video:

    I am not sure what happens at the start, when moving the mouse over a green handle a yellow rectangle should appear, at this point a new road can be dragged out.

    Starting at 0.22, a new road is pulled out from the crossing. The road type dropdown is empty. Are these the default crossings part of the package? Are road types assigned to connections of the crossing prefab? At 0.34 the available road types are visible. Were these road types created by you or was at least the default road type (possibly initially also assigned to the connection prefab) renamed?

    For example, when creating new road types, the "Create New Connection Prefab" button below the material options in the road type settings will create a new crossing prefab for this road type.

    Further in the video, this road appears to be unresponsive in some occasions, do you see error messages?

    The current Start / End decal options is based on prefabs and is available in the road settings and the road type settings. It is covered in the manual with both sections linking to each other.

    New Start / End Decal presets can be created for road types. For each road of that type one of the decals will be randomly selected if more decals are available. The selected decal can be manually changed.

    The additional free demo package includes decal examples with links to our website:

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

    New videos with voice is on the list and will be created when v3.2 is out. V3.2 is a major update also with changes to the Inspector options. Although we get different requests, users also asking for one long video covering everything, we belief short videos are indeed more friendly.

    Thanks,
    Raoul
     
  34. Thomas-Pasieka

    Thomas-Pasieka

    Moderator

    Joined:
    Sep 19, 2005
    Posts:
    2,112
    @raoul - Thanks for the feedback. It did help to a degree but I still got the occasional bug where a road or intersection would just act weird and not do what it's supposed to. I will record any other issues I will run into and post again with further questions.
     
  35. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,630
    Glad to hear that. Yes, please provide further info on roads / intersections acting weird. Is this similar to what is seen in video 3? Are there any error messages? Can the problem be isolated to that specific road? For example does the problem still happen when other roads connected to the same crossing prefabs are temporarily disconnected from the crossing? I am asking this because the video showed several crossings with different corner handles being active.

    Thanks,
    Raou
     
  36. Carpe-Denius

    Carpe-Denius

    Joined:
    May 17, 2013
    Posts:
    804
    This doesn't work anymore.

    If I do this, I'll get an exception and the road I was pulling breaks at the nearest node and loses all curvature.
    This happens on roads with two, three or more nodes. It doesn't happen with all road types, but the HD road types from the asset store encounter that problem (shown is NM Dirty)

    Before:

    upload_2019-6-24_23-25-55.png

    After:

    upload_2019-6-24_23-26-23.png

    Two exceptions:

    Code (CSharp):
    1.  
    2. EasyRoads3Dv3 - Flex Connector Warning: No Connection Match found on the left side
    3. UnityEngine.Debug:LogError(Object)
    4. EasyRoads3Dv3.QDDDQODDQDQDQDD:OCCCDDDDDO()
    5. EasyRoads3Dv3.ERCrossings:ODQCCDDOOQ()
    6. EasyRoads3Dv3Editor.QDDDOODDODQDQDD:ERUndoRedoCallback()
    7. UnityEditor.Undo:Internal_CallUndoRedoPerformed()
    8.  
    9. ###########################################################################
    10.  
    11. ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
    12.  
    13. Parameter name: index
    14. System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
    15. System.ThrowHelper.ThrowArgumentOutOfRangeException () (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
    16. System.Collections.Generic.List`1[T].get_Item (System.Int32 index) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
    17. EasyRoads3Dv3.QDDDQODDQDQDQDD.OOQOOCCODC (System.Collections.Generic.List`1[System.Int32]& tris, System.Collections.Generic.List`1[UnityEngine.Vector3]& vecs, System.Collections.Generic.List`1[UnityEngine.Vector2]& uvs, System.Collections.Generic.List`1[T] vecsData, System.Collections.Generic.List`1[T] uvsData, System.Collections.Generic.List`1[T] priorityPointsMain, System.Collections.Generic.List`1[T] priorityPointsMainUVs, System.Collections.Generic.List`1[UnityEngine.Color]& colors, System.Collections.Generic.List`1[T] originalShapeVecs, System.Collections.Generic.List`1[System.Int32]& connInts, System.Int32 totalVecs, System.Collections.Generic.List`1[System.Int32]& secondPriorityInts, System.Boolean singleSectionFlag, EasyRoads3Dv3.ERConnectionSibling sibling) (at <5a923e59458f4b108619ccff3bca06d3>:0)
    18. EasyRoads3Dv3.QDDDQODDQDQDQDD.ODOOCQCDQC (System.Collections.Generic.List`1[T] priorityRoads, System.Collections.Generic.List`1[T] primaryRoads) (at <5a923e59458f4b108619ccff3bca06d3>:0)
    19. EasyRoads3Dv3.QDDDQODDQDQDQDD.OCCCDDDDDO () (at <5a923e59458f4b108619ccff3bca06d3>:0)
    20. EasyRoads3Dv3.ERCrossings.ODQCCDDOOQ () (at <5a923e59458f4b108619ccff3bca06d3>:0)
    21. EasyRoads3Dv3.ERCrossingPrefabs.InitFlexConnector () (at <5a923e59458f4b108619ccff3bca06d3>:0)
    22. EasyRoads3Dv3Editor.OQQODQDOCC.OnSceneGUI () (at <50cbb218d9ac441daf4665537b961b4b>:0)
    23. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
    24. Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    25. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
    26. System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
    27. UnityEditor.SceneView.CallOnSceneGUI () (at C:/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:3275)
    28. UnityEditor.SceneView.HandleSelectionAndOnSceneGUI () (at C:/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:2522)
    29. UnityEditor.SceneView.OnGUI () (at C:/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:2383)
    30. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
    31. Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    32. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
    33. System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
    34. UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:345)
    35. UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:339)
    36. UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:315)
    37. UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect, System.Boolean floatingWindow, System.Boolean isBottomTab) (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:373)
    38. UnityEditor.DockArea.OldOnGUI () (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:340)
    39. UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:295)
    40. UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:481)
    41. UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:464)
    42. UnityEngine.UIElements.IMGUIContainer.HandleEvent (UnityEngine.UIElements.EventBase evt) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:444)
    43. UnityEngine.UIElements.MouseCaptureDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/Events/MouseCaptureDispatchingStrategy.cs:93)
    44. UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:280)
    45. UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at C:/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:156)
    46. UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at C:/buildslave/unity/build/Modules/UIElements/Panel.cs:189)
    47. UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:255)
    48. UnityEngine.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:78)
    49. UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)
    50.  
    51.  
     
  37. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,630
    Hi Carpe-Denius,

    I had a look at the original post, this is v3.2 beta Flex Connector related.

    The process of pulling out a new road from an existing road involves splitting the original road in two road objects, insert the Flex Connector and attach all 3 road ends to the Flex Connector. In your situation the error breaks this process resulting in what is visible in the second image.

    The default road is a two node road and the Flex Connector works well in general with a multi node setup.

    The roads in the HD Road packages have a three node setup. The Flex Connector in 3.2 has not been tested yet on the road types in this package but I belief it should work well.

    For the Flex Connector the road types do however require an upgrade. Are you using these road types as they come in the package? Throughout the various betas this upgrade has been implemented as an automated process but perhaps something is still not set correctly for the HD Road types which are based on v3.1 custom road shapes. A simple way to upgrade a road type is selecting it from the dropdown in General Settings > Road Types, change the position of a node and set it back to the original position.

    I will have a look today at the HD Roads road types in v3.2.

    Just in case, this new drag workflow is in the current v3.2 beta a Flex Connector feature only. Using this on a HD Roads road type will not insert a typical HD Roads connector.

    Thanks,
    Raoul
     
    Last edited: Jun 25, 2019
  38. Carpe-Denius

    Carpe-Denius

    Joined:
    May 17, 2013
    Posts:
    804
    Changing one of the road nodes back and forth did the trick (and right Connection node wasn't set on the third node), thank you.

    After changing the first nodes position the second node got automatically set to NaN, but it was possible to change that to 0.
     
  39. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,630
    That is good to know, thank you very much for the feedback!

    I will check today why the HD Roads road types do not fully upgrade through the automated process. I guess the NaN situation is a result of that.

    Raoul
     
  40. Thomas-Pasieka

    Thomas-Pasieka

    Moderator

    Joined:
    Sep 19, 2005
    Posts:
    2,112
    @raoul Is there a video on how to create Railroads with EasyRoads?
     
  41. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,630
    It is not that rail roads / rail road crossings is a built-in feature, ready to use with the main EasyRoads3D Pro package.

    EasyRoads3D Pro has a tool that can be used to import your own connection models, the Custom Prefab system. Connections where the roads should attach can be assigned. These connections behave the same as for built-in dynamic connection prefabs. "Roads" pulled out of these connections will inherit the shape of the connection and new corresponding road types can be created inside this window. That is how other infrastructures like rail road systems can be created using EasyRoads3D

    The free additional demo package includes an example of a road / rail road connector and matching rail roads.

    https://assetstore.unity.com/packages/tools/terrain/easyroads3d-demo-project-105045



    The below page includes links to two videos and additional notes. The second video is a rail road example.

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

    Thanks,
    Raoul
     
  42. Thomas-Pasieka

    Thomas-Pasieka

    Moderator

    Joined:
    Sep 19, 2005
    Posts:
    2,112
    So just so I understand properly... it is currently not possible to import/create a Railroad tracks using your plugin? I can only create "Road" tracks?
     
  43. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,630
    Hi Thomas,

    To explain what is involved here, I started with saying that rail roads are not a built-in feature. Something that can easily be setup through General Settings > Road Types, like can be done for new road types.

    Then I mentioned the Custom Prefab system that supports importing models into the system. Through that system rail roads can be made. The generated track will inherit the shape of the models connections, in this case a rail road shape. Once that is done, rail road crossings and rail roads can be created.

    Have you seen the video on the page in my previous post? Or the rail road in the demo package?

    Thanks,
    Raoul
     
  44. Thomas-Pasieka

    Thomas-Pasieka

    Moderator

    Joined:
    Sep 19, 2005
    Posts:
    2,112
    Thanks again for your time. Yes I have checked your videos. As I understand it I can currently only create Crossings and Sideobjects. However, what I am looking to do is to use a "Mesh/Model" as a "Road Type". Is that possible? Currently I don't see where I would use my own mesh/model as Road Type.
     
  45. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,630
    A mesh model as a road is currently not yet possible as it will not work well with how roads are snapped to crossing connections.

    Do you need these roads perfectly attach to crossings?

    If not, then you can look into the Procedural Side Object type. Create a new side object and simply drop your road mesh model in the Source Object slot.

    Then you could create a new road object from the second tab from the left in the main easyRoads3D toolbar, mark it as side object and add two markers as a start. Then activate this side object for the new road.

    Or create a new road type, mark it as Side Object by toggling on the corresponding checkbox lower in the road type settings just above all available side objects. And activate this specific side object. New objects with this side object auto activated can now be created instantly.

    With this approach terrain deformation is also possible but that is the next step. This too can be done through an additional side object used for that purpose. Or the object can be created as an actual road with an additional road mesh that will be created as well. But this can be deleted afterwards. Using a side object for this is more efficient if multiple instances are required.

    Thanks,
    Raoul
     
  46. unitypolska2000

    unitypolska2000

    Joined:
    Sep 23, 2013
    Posts:
    8
    Hi!
    I have a problem with my custom roads. When I attach a road to my crossing I have a bug with my mesh. It appears black near the connection and it's very annoying. I'm looking for some advice, how to avoid that. Thanks! Screen Shot 06-26-19 at 10.06 PM.PNG Screen Shot 06-26-19 at 10.07 PM.PNG Screen Shot 06-26-19 at 10.08 PM 001.PNG Screen Shot 06-26-19 at 10.08 PM.PNG
     
  47. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,630
    Hi unitypolska2000,

    Does that happen with all connections? Do all similar connections show the same number of vertices and normal groups in the stats window? For example, the crosswalk prefab in the top two images, in the first image the road connects well. This is not the case in the second image, do both connections have the same stats?

    What is causing this is the process of averaging normals between the roads and the connections. The result can look like in some spots in your images when the wrong vertices are referenced.

    If you want you can send us one of your models so we can have a look at it.

    Also, v3.1.8 which will be released the end of the week has an option to switch off averaging normals.

    Thanks,
    Raoul
     
  48. unitypolska2000

    unitypolska2000

    Joined:
    Sep 23, 2013
    Posts:
    8
    Thanks for reply.
    Now I can see, that on the crossing 2 of 3 connections have 9 normal groups, and 1 have only 8 normal groups (that from the image, with black spot). But with the crosswalk all stats looks the same (between connections inside crosswalk and comparing it to the crossing conections). Where can I send you my models?
     
  49. marcrem

    marcrem

    Joined:
    Oct 13, 2016
    Posts:
    153
    Hi Raoul! Me again :D

    So we really enjoy using the grid tool, but when doing so in a very large world, the editor has to draw the grid and it becomes unusable. Would it be possible to only render the grid at a given radius around the camera?

    Thanks!
     
  50. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    4,630
    Hi unitypolska2000,

    These black spots could very well be related to the difference in normal groups.

    Our email is in the readme file in the EasyRoads3D folder.

    Thanks,
    Raoul