Search Unity

World Building EasyRoads3D v3 - the upcoming new road system

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

  1. Thendon

    Thendon

    Joined:
    Nov 5, 2017
    Posts:
    5
    And it's me again,

    Scince I am generating a bunch of stuff automatically I was trying to set the side objects of a road with type fence via scripting api.

    Code (CSharp):
    1.      erRoad.SideObjectSetActive(erNetwork.GetSideObjectByName("awesome_fence"), true);
    For some reason the side object wont automatically set on the road, even though the returned object of GetSideObjectByName is correct.
    Am I missing something?
     
    Last edited: Aug 17, 2019
  2. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi Thendon,

    I assume "awesome_fence" is a fence you created? Does it instantly appear when activating it manually for a road object? Several side objects in the demo package, among which some fences have a setup that will not instantly show the side object when activating it. This is controlled by "default active state for each marker". For side objects that will only be active on a small number of road sections, it is more efficient having to activate them for these sections, then having to deactivate them for all other sections.

    Are you using this inside the Unity editor? In that case, can you scroll down to the Side Object Marker section in the Inspector of the selected road and check if the side object is actually active for markers?

    Another way to generate the side objects is to activate them for the specific road type in General Settings > Road Types. New instances of that road type will have this side object auto activated.

    Thanks,
    Raoul
     
    Last edited: Aug 17, 2019
  3. LandPlanOS

    LandPlanOS

    Joined:
    Sep 8, 2014
    Posts:
    13
    Dear Raol,

    I refer to Your documention: "If Vegetation Studio is present, there will be options for adding either a Vegetation Studio Mask Line component or a Biome Mask Area component and an activation checkbox.l"
    I have VS installed but I´am to dump to find the checkbox. Could You give me a hind?
    Stefan
     
  4. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi Stefan,

    Vegetation Studio support is activated from the EasyRoads3D toolbar > General Settings > Terrain Management

    In case there is no Vegetation Studio info available in this section, which version / packages of EasyRoads3D do you have imported and which version of Vegetation Studio? Recent EasyRoads3D Pro versions also support Vegetation Studio Pro including the VEGETATION_STUDIO_PRO compiler directive in /Assets/EasyRoads3D/scripts/ERVegetationStudio.cs

    Thanks,
    Raoul
     
  5. LandPlanOS

    LandPlanOS

    Joined:
    Sep 8, 2014
    Posts:
    13
    Dear Raoul,

    don´t know why but reinstalled it and everything is fine!
    But another question:
    We use a custom material on the terrain. Is it possible the ER overtint it with a colour/texture?

    thx
    Stefan
     
  6. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi Stefan,

    Glad to hear VS support does work now.

    ER can bake the road shape in the terrain splatmap. This can be set for road types and individual road objects (further below in the Inspector). The splatmap prototype texture can be selected. This info is extracted from the terrain object. Since you are using a custom terrain material, are these textures available and selectable?

    Thanks,
    Raoul
     
  7. Flavelius

    Flavelius

    Joined:
    Jul 8, 2012
    Posts:
    945
    Small Error report: if i remove/delete all road types in the general settings it throws never ending indexoutofrangeexceptions (with a pretty useless stacktrace)as long as i keep the road type dropdown open.
    I'd also like to suggest swapping the 'remove' and 'delete' names as remove in 'manage project road types' actually deletes them, whereas 'delete selected road type' just seems to remove it from the list, atleast for me that was the case.
     
  8. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi Flavelius,

    Thank you for reporting that! It is fixed in the next update.

    But the indexoutofrangeexceptions error is no longer thrown after adding a new road type or adding a project road type.

    I can see how different naming can perhaps be confusing but the two are not really related. The buttons at the top in Road Types refer to project road types. The Remove button is located in the "Manage Project Road Types" window. It removes the road type from the project list.

    "Delete Selected Road Type" at the bottom in the Road Network toolbar tab "General Settings > Road Types" deletes the road type from that road network in the scene.

    I have renamed the button in Manage Project Road Types so they both say "Delete". I am not a native English speaker though, if "Remove" is more appropriate for deleting a road type from the road network in the scene it can be changed :)

    Thanks,
    Raoul
     
  9. Claytonious

    Claytonious

    Joined:
    Feb 16, 2009
    Posts:
    904
    In Unity 2019.2.0f1, I'm getting this error, which seems to prevent much of the functionality of side objects and crossings from working properly:

    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. EasyRoads3Dv3.OOCCDQCOCOExt.GetMatchingPrefabs (EasyRoads3Dv3.ERModularRoad scr, System.String[] prefabs, EasyRoads3Dv3.ERCrossingPrefabs[]& prefs, System.Int32 type) (at <cbc8da974cc04c7bb7f501e663035a22>:0)
    3. EasyRoads3Dv3Editor.OCQDDQQDDO.OnSceneGUI () (at <6d1b4cde5a37401b9ea1376afc745ac1>:0)
    4. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <a8ed250850854b439cedc18931a314fe>:0)
    5. Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    6. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <a8ed250850854b439cedc18931a314fe>:0)
    7. System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <a8ed250850854b439cedc18931a314fe>:0)
    8. UnityEditor.SceneView.CallOnSceneGUI () (at /Users/builduser/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:3292)
    9. UnityEditor.SceneView.HandleSelectionAndOnSceneGUI () (at /Users/builduser/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:2539)
    10. UnityEditor.SceneView.OnGUI () (at /Users/builduser/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:2400)
    11. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <a8ed250850854b439cedc18931a314fe>:0)
    12. Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    13. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <a8ed250850854b439cedc18931a314fe>:0)
    14. System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <a8ed250850854b439cedc18931a314fe>:0)
    15. UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at /Users/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:359)
    16. UnityEditor.HostView.Invoke (System.String methodName) (at /Users/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:353)
    17. UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at /Users/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:329)
    18. UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect, System.Boolean floatingWindow, System.Boolean isBottomTab) (at /Users/builduser/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:374)
    19. UnityEditor.DockArea.OldOnGUI () (at /Users/builduser/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:341)
    20. UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize) (at /Users/builduser/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:298)
    21. UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect) (at /Users/builduser/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:483)
    22. UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e) (at /Users/builduser/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:466)
    23. UnityEngine.UIElements.IMGUIContainer.HandleEvent (UnityEngine.UIElements.EventBase evt) (at /Users/builduser/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:447)
    24. UnityEngine.UIElements.EventDispatchUtilities.PropagateEvent (UnityEngine.UIElements.EventBase evt) (at /Users/builduser/buildslave/unity/build/Modules/UIElements/Events/IEventDispatchingStrategy.cs:64)
    25. UnityEngine.UIElements.MouseEventDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at /Users/builduser/buildslave/unity/build/Modules/UIElements/Events/MouseEventDispatchingStrategy.cs:59)
    26. UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at /Users/builduser/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:280)
    27. UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at /Users/builduser/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:156)
    28. UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at /Users/builduser/buildslave/unity/build/Modules/UIElements/Panel.cs:190)
    29. UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at /Users/builduser/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:255)
    30. UnityEngine.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at /Users/builduser/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:78)
    31. UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at /Users/builduser/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)
    32.  
     
  10. LandPlanOS

    LandPlanOS

    Joined:
    Sep 8, 2014
    Posts:
    13
    Thx for Your answer.

    I tried it and changed the material here:
    upload_2019-8-17_20-11-11.png
    (ground6) after I clicked "Build Material". But when I build the terrain there was no change.
    I guess I have understood something wrong? Did I?

    Thx
    Stefan
     
  11. Flavelius

    Flavelius

    Joined:
    Jul 8, 2012
    Posts:
    945
    i tried to go through the demo tutorials and noticed that around all places where there are these road blends/joins of different types the terrain does not match the road / the road just floats above the terrain

    is this a limitation or just a bug on my side?
     
  12. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hello Claytonious,

    I belief you also asked this by email. From only an error message it is hard to tell what goes wrong. When exactly is this error thrown? It appears to be related to finding crossing prefabs matching a road type.

    Thanks,
    Raoul
     
  13. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi Flavelius,

    It is not a limitation and neither is it a bug on your side (or perhaps a design bug :)). This is a road example based on a custom road shape, a swamp road that goes down into the water on the left and right side with customized node settings per marker, there is a tutorial for that road. There is no terrain deformation involved for this road. This can be seen by selecting the road, "Terrain Deformation" in the main "Road Settings" is switched off.

    Indeed it stretches too far on the land section where it does no completely match the terrain. I will make some adjustments in that section. But the purpose of this swamp road is to show how custom road shapes can be done and how these shapes can be adjusted per marker.

    Thanks,
    Raoul
     
  14. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi Stefan,

    The section in your screenshot is from General Settings > Materials & Textures, that is not related to baking the road shape in the terrain splatmap.

    The process of extracting the terrain splatmap textures is automated. Do you see your terrain textures in the Splatmap texture dropdown further below in the Inspector of the selected road, the "Add Shape to Terrain Splatmap" section?

    If not, what is the setup of your custom terrain material? Are the textures not directly assigned to the terrain?

    Thanks,
    Raoul
     
  15. LM031

    LM031

    Joined:
    Jul 16, 2017
    Posts:
    10
    Hi Raoul

    Running into issues while using EasyRoads3D Pro (using 3.1.8.f2). I am mainly working in HDRP. Therefore also using EasyRoads3D Pro Add On (1.1).

    The steps I followed:
    -Started a HDRP project with the latest release of Unity (2019.2.0f1). This release uses HDRP 6.9.0 by default or 6.9.1 when upgraded.
    -After starting the project I imported EasyRoads3D Pro completely followed by the add-on. No Issues during import.
    -Then starting a new Road Network. Unity comes with a message saying road type presets available. I say yes to importing them.
    -Warning from Unity no terrain available, so I create one
    -Back to the Road Network, Unity comes with a message if I want to backup terrain, I say no.
    -Checking "Add New Road", only one available (1. Default Road). When using road all the materials are pink.
    -In the NatureManufacture Assets/SRP Support folder there is a package "EasyRoads Addon - HD SRP 4.6+ support pack", double click to install.
    -Then use Import Road Types to the import the HD Road Presets.
    -Drawing a road with one of the new HD presets (e.g. NM_Asphalt_Dotted 001). Still everything pink
    -When checking the shaders there are two "failed to complile" (HD_SRP_Road_Shader and HD_SRP_Metalic_Cross_Road_Shader).
    Console Errorr like: "Shader error in 'NatureManufacture Shaders/HD SRP Road Material': failed to open source file: 'Packages/com.unity.render-pipelines.core/ShaderLibrary/Wind.hlsl' at line 127 (on d3d11)"
    This is correct, because that file (Wind.hlsl) is not available in the project.

    Is there something I can do to get this resolved?

    I did a quick check. Basically I have to get back to 2018.3.8.f1 in combination with HDRP 4.6.0 to get it to work (the shaders start to work). My present project is in 2019.2.0f1 with a lot of work already done, so going back to 2018.3 is no option for this project

    But still in 2018.3.f1 HDRP I had a issue with a pink material. When The road has terrain deformation, this is pink. I can get rid of it by removing the terrain deformation from the road or acitvate "Hide White surfaces" in the scene settings. I can not find the white material in the project, used for these terrain deformations (then I could convert it to a HDRP shader). Is the material present in the project and can be modified?
     
  16. colin_young

    colin_young

    Joined:
    Jun 1, 2017
    Posts:
    243
    I presume by object export you are referring to finalizing the road network and then modifying that? Although at the rate I'm progressing there's a decent chance 3.2 will be complete long before I am :)
     
  17. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi Colin,

    The obj export I mentioned was related to your last question

    There is no direct way to do that, but the Flex Connector can be exported to .obj the way I mentioned, then edited modified and imported back in the system as a Custom Connection prefab.

    Lately I have been busy with v3.1 updates, HD Road package updates and the demo project, and vacation. The coming week v3.2 will be picked up again. It depends on when you need built-in curbs on Flex Connectors and in what state. The new Sidewalk system is already setup and partially functional on roads. Connections, including the Flex Connector, is still to do.

    Thanks,
    Raoul
     
  18. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi LM031,

    An update of the HD Roads package is pending approval by the asset store team. It includes new HD SRP packages up to 6.9.+

    The white material on meshes used as a reference to show how the terrain will be deformed is located here: /Assets/EasyRoads3D/Resources/Materials/surfaceMaterial

    Thanks,
    Raoul
     
    Last edited: Aug 18, 2019
    LM031 likes this.
  19. Flavelius

    Flavelius

    Joined:
    Jul 8, 2012
    Posts:
    945
    I have a question about the terminology, as it's a bit confusing for me:
    1.jpg
    2.jpg
    From what i gathered so far that first 'crossing' & 'connection' mean the same and secondly are objects/prefabs if encountered outside the prefab editor, but in the prefab editor 'connection' refers to connection/crossing type, which also means road type.
    Then, (crossing or) connection also refers to all prefabs, no matter their shape ( linear, T, X, roundabout etc. as seen in the prefab instantiation tab) or type. Btw. i'd suggest removing the word 'prefab' (green highlight) as it hints towards creating new assets instead of scene instances.
    So for adding my own mesh shapes to the system (linear, T, X, roundabout etc.) i use the same procedure for all of them to get them into the system and just treat them all as ~road objects with connections of potentially different types.
    Did i get everything right so far?
     
  20. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi Flavelius,

    That is indeed only terminology. "Crossings", "connection prefabs", we always call them here "connectors", roads are attached to connectors. But when just starting with the the tool and for road networks in general, "crossings" will sound more familiar. Essentially crossings are connection prefabs, roads can connect them. Connection prefabs are not necessarily crossings, for example a complex road transition model with road type A connected to one end and road type B to the other end.

    To add your own mesh shapes, "The Custom Prefab Editor Window" button must be used, near the bottom in the right part of the image. This will open the window visible on the left in the image (I am just confirming what you already did). This window can be used for any type of model you want to import in the system.

    The "Crossing" wording in this Custom Prefab Editor window should probably indeed be changed to "Connection" as particularly in this window any type of "Connection" prefab can be created.

    Thanks,
    Raoul
     
    Flavelius likes this.
  21. LandPlanOS

    LandPlanOS

    Joined:
    Sep 8, 2014
    Posts:
    13
    Dear Raoul,

    yes they are directly assigned.

    Stefan
     
  22. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi Stefan,

    If the textures are directly assigned to the terrain then the terrain should also generate a splatmap. All this is what is required. Have you checked these splatmap Texture dropdown I mentioned, In General Settings > Road Types and for individual road types? Are your terrain textures visible in these dropdowns?

    Thanks,
    Raoul
     
  23. marcrem

    marcrem

    Joined:
    Oct 13, 2016
    Posts:
    340
    Hi Raoul,

    So I'm a bit lost here. If I uncheck "active" and reactivate it, it will refresh the road network, but then only 3 roads have the vegetation mask lines on. I don't understand why it doesn't put it on all the roads. Any idea? Thanks.

     
  24. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi Marcrem,

    What was the active state of all the roads for Vegetation Studio before reactivating it? "Active" in "Terrain Management" will switch VS support on and perform a full Road Network Refresh. All the roads where Vegetation Studio is active will have the Vegetation Mask Line component attached.

    "Reset all Road Types and Objects" will set all roads and road types to the current settings in the Terrain Management section visible in your image. This should add the Vegetation Mask Line component to all roads.

    Do you see another behaviour?

    Thanks,
    Raoul
     
  25. colin_young

    colin_young

    Joined:
    Jun 1, 2017
    Posts:
    243
    A bit of a weird problem. I'm sure it's not EasyRoads3d related, but that's where it's being exposed. I have a car model I imported from FBX. The first time I imported it, the normals were clearly messed up. I imported it into Blender, "fixed" the normals (they looked correct but I recalculated them anyway), exported to FBX, deleted the original import in Unity and reimported. Now the model looked fine in Unity. I created a prefab (empty GameObject -> car), then added that to my prefab collection of parked cars. When the side object system adds the cars, this one is showing up with the original, messed up, display. I was able to "fix" it by setting the X-scale to negative in the prefab, but that seems more like a hack than a fix.

    Is there something that ER3D is doing that is causing the problem to be exposed, even though I don't see the issue outside of the prefab being used in the side object system (i.e. dropping it in the scene directly or editing in the prefab editor)? The x scale has no impact on the display in the editor or the prefab editor, other than the texture being mirrored. The normals/backfaces appear correctly with either scale.

    EDIT: It turns out that the model was like this: Container -> Mesh, where the mesh had negative scales. Fixing that has fixed the display, but I still don't quite understand why I could add the prefab directly without a problem, but the side object system was adding it with issues. /EDIT

    My goal here is to figure out what the actual problem is and fix that. It's only this particular model that is having an issue. Every other car model I've imported is behaving as expected.
     
    Last edited: Aug 20, 2019
  26. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi Colin,

    I am not sure if this is related but when dropping models in a scene Unity sometimes seems to do something to them, like adding rotation values so the orientation is correct. You mentioned that the prefab itself looks correct when dropping it in the scene. Have you compared all these settings with the original prefab in the project folder and also those instantiated by ER? Do you see differences? ER will instantiate the prefab according the state in the project folder.

    If you want you can send the prefab to us and we will check.

    Thanks,
    Raoul
     
  27. colin_young

    colin_young

    Joined:
    Jun 1, 2017
    Posts:
    243
    Could be. I've noticed Unity seems inconsistent about orientation, although I haven't done a proper study of it where I systematically change the orientation and export settings in Blender and see what Unity does, but I do see a lot of models show up in the thumbnail lying on their sides, but when they are dropped in the scene they are oriented as expected (okay, at least with "up" in the expected direction).

    In this case it turned out that the car model had a mesh nested inside some sort of container object, and that mesh had a uniform negative scale applied. Once I corrected that, it appears correctly, both in the side objects and when dropped into the scene directly (aside from a minor issue of text on the textures now appearing backwards, but that I can fix easily). I'm not going to complain too much about a very nice looking car model that somebody has been generous enough to give away for free though. I've spent way less time fixing it up than I would have spent creating a far inferior model myself.
     
    raoul likes this.
  28. swnc

    swnc

    Joined:
    Aug 3, 2018
    Posts:
    35
    Hi Raoul,
    I want to connect 2 roads with a bridge via scripting API. Do you have a good reference or an idea on how should I proceed? I was planning to proceed as:
    -> First, connects two roads between markerIndex1 and markerIndex2
    -> Then, set the side objects active (bridge pillar and bridge simple) for the 2 markers which would be for example markerIndex1 and (markerIndex1 + 1) with using this function: public void SideObjectMarkerSetActive(SideObject obj, int markerIndex, bool value).

    I would appreciate if you have a better or an alternative solution for creating a bridge between 2 roads via scripting API.

    Best,
    swnc
     
  29. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi swnc,

    Side objects are activated on road objects, not between two different roads. So indeed the two roads have to be merged in one first when the bridge will be added as a side object. The alternative is to add the bridge as a custom connection prefab but that requires the bridge as a model. The side object bridge example in the demo package does not work well for that.

    When working with bridges it might be necessary to tweak the start / end offsets to hide a possible gap between the bridge and the terrain at the marker position. When using the scripting API for this you may want to adjust the default start ./ end offsets in the Side Object Manager. They should be about 1.5 the heightmapscale of your terrain (terrain size / heightmap resolution).

    Thanks,
    Raoul
     
    swnc likes this.
  30. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    Hi Raoul, I had to take a break from unity but am now back hoping to solve the raised road issue. I upgraded the beta version but still this didn't solve the raised road issue. I will attach an image to demonstrate.

    Im using Unity: 2019.2.0a7 and East Roads: c3.2.b6 but will check if there another beta version to upgrade too.

    er.PNG

    As you can see the road in the background is also raised. As well as many other places.

    I will check fro the beta now but any advice to get this solved would be appreciated.

    Many thanks.
     
  31. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi Hawk0077,

    It is not so clear from the photo what the problem is. I can see roads do not align but there is no further info. What is the gap between the two roads? Are these two different road objects? What are the marker positions?

    Would it be possible to have a look at this so I can see the problem? Can you email the scene?

    Thanks,
    Raoul
     
  32. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    Sorry Raoul The scene is too big and I haven't been able to strip it down enough to send. Il upload another photo for now
     
  33. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    Hi Raoul, here are some more photos with nodes visible:
    e1.PNG e2.PNG

    Here is your email response a couple of months ago to a video I sent you.

    "Another thing that happens is the road network jumping up and down. This is a result of the error messages and code not completing. In the video a road is selected attached to a T crossing and the mouse is moved over a road section. I belief this situation was recently brought up on the forum. We were able to reproduce an it is fixed for the next release. So I hope your situation is related."

    These roads just developed the different levels and havent been able to do anything with the project since as I was waiting for the update and then waiting for the flex connectors to be integrated with the published version.
    This was the error that keeps occuring:

    EasyRoads3Dv3: Please Refresh the Road Network: General Settings > Scene Settings
    UnityEngine.Debug:LogError(Object)
    EasyRoads3Dv3.OQDQDODDOO:ODDCDDCODO(GameObject, SideObject, ERModularRoad, ERSORoadExt)
    EasyRoads3Dv3.OQDQDODDOO:OCODDCQQCQ(ERModularBase, ERModularRoad, SideObject)
    EasyRoads3Dv3.OQDQDODDOO:ODDODDOQDC(ERModularBase, ERModularRoad, Boolean)
    EasyRoads3Dv3Editor.ODQQDOQOQO:UpdateSideObjectsInScene(ERModularBase)
    EasyRoads3Dv3Editor.OCDDOOQQDO:OnSceneGUI()
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)


    Refreshing the network makes no difference.
     
  34. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735

    Hi Hawk0077,

    With the handles visible, I now see that I Connectors are involved. First of all there is no need to cut these road sections in separate roads and insert I Connectors at these positions. Side objects like bridges and walls, visible in the image, can be activated / deactivated per marker with additional offset options for fine tuning the start / end positions.

    Ok, so the height differences was a result of error messages and roads jumping up and down when moving over a road. That issue by itself is fixed in the latest beta. Does that indeed still happen on your end?

    It looks like the issue on your end now is that some roads are at a different position anyway. Could you go through all road objects in the hierarchy, are they all positioned at (0,0,0)?

    When does the "EasyRoads3Dv3: Please Refresh the Road Network: General Settings > Scene Settings" message (it is not an error) appear?

    Duplicating the scene and sending the duplicate, with all assets apart from the road network removed, is perhaps an option?

    Thanks,
    Raoul
     
  35. jdtec

    jdtec

    Joined:
    Oct 25, 2017
    Posts:
    302
    Any consideration to add the ability to export to OpenDRIVE format?
     
  36. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi jdtec,

    That is on the list, but after the v3.2 update.

    Thanks,
    Raoul
     
    jdtec likes this.
  37. PhilipZ0

    PhilipZ0

    Joined:
    Mar 5, 2019
    Posts:
    16
    Hi Raoul,

    I have created roads per scene that I am using and updating the road markers of only one type of road I am using. When I build the project I have in memory a lot of unused textures from railRoad or dirtyRoad. How can I easily remove not used textures/materials from being in the memory? Thank you.


    Edit: Find it under Build Terrain --> Finalize Network :)
     
    Last edited: Aug 21, 2019
  38. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi PhilipZ0,

    Do you mean that usused assets in general are part of the final build, "File > Build..."? In that case, because you mention railRoad and dirt roads it sounds as if you have the additional demo package imported in your scene. It is recommended to import this package in a new project. It primarily serves as a resource to get familiar with the tool. Assets you like to use can be exported and imported in your own project. It is mentioned in the asset description.

    What happens now is that Unity will include all the assets in /Assets/EasyRoads3D/Resources/ because of the runtime features of EasyRoads3D.

    If you don't want that, a quick fix in the current situation, for the final build is to temporarily rename this Resources folder to something else, like "Resources_Temp". Then build the project and afterwards change the name back to "Resources".

    Hope this indeed answers your question.

    Thanks,
    Raoul

    [Edit] I see you edited your post. Just in case, "Finalize Road Network" removes all EasyRoads3D script components from all game objects. The road network is no longer editable after doing this.
     
    Last edited: Aug 21, 2019
  39. marcrem

    marcrem

    Joined:
    Oct 13, 2016
    Posts:
    340

    Sorry for my late reply.

    Here's what I did. Made sure to remove all existing vegetation mask line. Then, I enabled vegetation studio pro, and pressed the Reset button. It added many mask lines, but as you can see here some roads don't have a line. some of the roads with missing mask line components are long with many points, some very small, it doesn't matter.

    Screenshot_2.png
     
  40. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi Marcrem,

    I just tested this, in fact VS cannot be decativated for road types and individual roads, which makes sense. But it is possible to select whether a Mask Line component or Biome Mask Area component should be added. I just tested this, all roads are updated when changing this in General Settings > Road Types and after pressing "Update Scene Instances". The same when making changes on an individual road. Switching on/off "Active" in General Settings > Terrain Management > Vegetation Studio, does also have the expected result. Changing the settings and pressing "Reset all Road Types and Objects" does update the road network correctly.

    Did you select one of the roads where no mask line component was added. After selecting a road in the hierarchy, can you see a vegetation mask line component in the Inspector? If not, what are the VS settings for that road? What happens when changing these settings? And what are the settings for that specific road type?

    Thanks,
    Raoul
     
  41. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    The road network was complete. I am removing the T connections in these sections and replacing them with the new Flex connections. So i-connectors were necessary to connect the flex connectors back to the road.

    I have just tried to delete am i-connector but it just wouldnt delete. I'll strip the project and send it. Thanks Raoul.

    This does appear to have gone but I haven't really done any editing as I was waiting for an update and hoping that would fix the road heights. Without the road heights being corrected its pretty much a waste of time doing any more editing. As I may have to revert back to a much later version. I have already done a lot of editing i this scene so would prefer not to revert back to previous version.

    Yes.

    When dragging the scene (rotating scene).

    I will work on this over the next few days. I'll backup then strip the scene and upoad it to one drive. Not sure how it will perform on your end though.
     
  42. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi Hawk0077,

    I Connectors are only required when the road shapes are different. If these roads are of the same type, they can be merged in one.

    The I Connector can be deleted from the Inspector "Delete Connector".

    Another quick way to only send the road network is by loading an additional empty scene in the hierarchy and simply drag drop the road network to the empty scene. Only save the empty scene and export this scene to a Unity package perhaps also including the EasyRoads3D folder in the project folder. Unless all dependencies are included as well, the side objects will probably not work, but the problem with road heights seems more roads related. If you are not sure that will work, you could perhaps test the package first in a new project.

    I had a look, this appears to be side object related, the shape type of side object, and related to older versions. Is this an older project and are shape type of side objects involved?

    Are these roads all of the same type? This is probably not the case, but in v3.2 road shapes can be customized, including the height. If these road shapes are set higher above y = 0 then that would result in these height differences.

    Thanks,
    Raoul
     
  43. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    I am not sure whether there are shape side objects. This is an older version network that IU have been upgrading and changing as I go.

    then when the flex connections became available I paused and began:

    • Changing width of main roads (changing from 2 lane to 3 lane roads - this isnt complete yet due to current issues.)
    • So now many connections are not wide enough (theyre connected to the new road widths (wider). I was in the process of doing this when the road height issue occurred.
    So the who thing is looking a bit of a mess but like I said I was in the process of correcting things when the issue occurred.

    I am almost done backing up now so will ttry dragging the network to a new scene. I presume by that that you dont need the terrain itself.
     
  44. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi Hawk0077,

    The terrain itself is probably not required since the height issue is road related only.

    Thanks,
    Raoul
     
    Hawk0077 likes this.
  45. swnc

    swnc

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

    I was testing the last beta version(v3.2 b6) for the lane connectors in the "AI Traffic Scene" and I realized that it doesn't work as it should. You can see that there are lane connectors for the crossings in the Editor mode but when you run the scene, the code prints out as there are no lane connectors in those crossings (Line 203 in the ERVehicle.cs Script). Do you know the reason and how can be fixed?

    Best,
    swnc
     
  46. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi swnc,
    When I open the v3 beta project used to build the beta package, load the "AI Traffic Scene" and run the scene, 19 "vehicle" objects are instantiated moving over the roads and crossings randomly going straight or taking turns. I don't get any messages.

    The message at line 203 should include a crossing name. Does this happen on one or more crossings? Can you move that crossing to trigger lane data updates. Does it update? And does this message still appear afterwards when running the scene.

    Or have you tried reimporting the original demo scene, just to test if perhaps something changed in the current scene in your project?

    Thanks,
    Raoul
     
  47. swnc

    swnc

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

    The message contains for all crossing names and when I move the crossings it does not update. I did not try to reimport the original demo scene.
    I have uploaded the screen recording.

    Best,
    swnc
     
  48. swnc

    swnc

    Joined:
    Aug 3, 2018
    Posts:
    35
    I have realized that lane connectors generated wrongly but when I reset the lane connectors in the editor, it was fixed.

    Best,
    swnc
     
  49. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Glad to hear that!

    After seeing your previous post I just created a new 2019.1 test project and imported v3.2 beta 6, opened "AI Traffic Scene", it works as expected right after importing the beta package.

    So I assume something changed in your scene. I was going to ask what the lana data looked like on crossings. Was the lane data actually visually there like for selected roads? What do you mean with lane connectors generated wrongly?

    Thanks,
    Raoul
     
  50. swnc

    swnc

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

    Lane connectors look like on the below
    upload_2019-8-22_15-52-45.png

    I also realized that I can not save the crossings with lane connectors or can I? In the previous beta version, I could save the crossings with the lane connector information so that I could instantiate the crossing via scripting API and use the lane connectors information. However, this is not possible now. Maybe I am missing something?

    Edit: I realized that you automated the lane connectors if a road is attached which is really nice. The problem with me that the traffic direction was left-hand. Everything works now!
    Best,
    swnc
     
    Last edited: Aug 22, 2019