Search Unity

World Building EasyRoads3D v3 - the upcoming new road system

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

  1. raoul

    raoul

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

    Terrain holes for the tunnel are based on the terrain hole system introduced in Unity 2019.3. The size of the holes depends on the terrains heightmapscale (terrain size vs heightmap resolution). The currently provided tunnel examples in the v3.2 beta package are aimed at terrain with a default (around 2) or slightly larger heightmapscale.

    The start and end sections of the tunnel mesh should cover the holes in the terrain.The warning message you posted will appear when the terrains heightmapscale is larger. So the verify this, what is the terrain size and heightmap resolution in you scene?

    Thanks,
    Raoul
     
  2. Slimmy

    Slimmy

    Joined:
    Apr 25, 2017
    Posts:
    21
    Thank you! You're a life saver. And thank you for such a quick reply. You guys are awesome.
     
    raoul likes this.
  3. marcell123455

    marcell123455

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

    after using It now for even longer, I have to say that this tool works well, exept when you use auto generated side objects WHILE placing road nodes or editing them. When I have them disabeled and enable them after I placed all my roads and build my terrains and then just tick the sideobjects, they appear and work properly. This method seems like a good workarround, but this is not a reasonable way to do it for big road networks with a lot of roads, because I would have to do this for each road.

    Let´s say I have configured my roadtypes with autogenerated sideobjects enabled. Do you think you could add a toggle to the general tab, that disables or enabeles auto generatet sideobject generation while being in edit mode? so that they only get created after building the terrain? I guess this way I can use this feature without having these error messages.

    A other thing I am really missing are cathegorys for roadtypes and connection prefabs. Do you think you could add them aswell? When you have a lot of roadtypes and crossings for highways, bridges. underground connections, desert typed roads and connections, Snowy typed roads and connection etc. even with proper naming it is hard to find the correct road or crossing :/

    Thanks for this awesome tool ;)
     
  4. raoul

    raoul

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

    It would be useful to have more feedback about possible issues with auto generated side objects in the v3.2 beta while creating the road.

    It could also be that possible issues you encountered are meanwhile fixed. If you want I can send an update on Monday with the latest v3.2 beta status of auto generated side objects to see how that works for your situation.

    Do you mean an option for this per road? Isn't that a matter of toggling off "Auto Generate" and activate it whe required.

    For the full road network please have a look in:

    General Settings > Scene Settings > Build Side Objects in Edit Mode

    Road types can already be organized in a way that they can be scene specific. Of course that can still result in a large number of road types. It is possible to favorite connectors so most used connectors are listed at the top. Or Connectors can also be shown with thumbnails which also makes it easier to find the one you need. But here too there is always room for improved. It is on the list :)

    Thanks,
    Raoul
     
    marcell123455 likes this.
  5. alexrau

    alexrau

    Joined:
    Mar 1, 2015
    Posts:
    80
    The other day Unity crashed with EasyRoad3D enabled and how when I try to build my WebGL, 2019LTS.12, URP project I get this error message which is unfortinately within the DLL, so I can't check it. I removed all the EasyRoad3D from the scene I am trying to build but I still get this error. Don't know how to debug further. Can you advise?

    MissingReferenceException: The object of type 'Texture2D' has been destroyed but you are still trying to access it.
    Your script should either check if it is null or you should not destroy the object.
    UnityEngine.Texture.get_width () (at <a4546799a4ab426788e4204c69507924>:0)
    EasyRoads3Dv3Editor.ODCDQCCDDO.OnGUI () (at <2925aad90c1f4456be46168f65775ef7>: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 <e6e2fa0a47414cd2ac33237924761b45>:0)
    UnityEditor.HostView.Invoke (System.String methodName) (at <e6e2fa0a47414cd2ac33237924761b45>:0)
    UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at <e6e2fa0a47414cd2ac33237924761b45>:0)
    UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect) (at <e6e2fa0a47414cd2ac33237924761b45>:0)
    UnityEditor.DockArea.OldOnGUI () (at <e6e2fa0a47414cd2ac33237924761b45>: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 <356f1ddb1d524ad59c7a2c95775bb38e>:0)
    UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()
     
  6. raoul

    raoul

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

    What exactly did you remove from the project?

    It seems the dll's are still part of the project and apparantly there is a texture missing?

    What exactly do you want to do at this moment? It seems reimporting the package could solve this.

    Thanks,
    Raoul
     
  7. alexrau

    alexrau

    Joined:
    Mar 1, 2015
    Posts:
    80
    Going to try updating then reimporting. Was trying to get the game to build, works fine in editor. Crashing seems to have deleted all my roads, but the hard part is making the road and sideobject prefabs so I am good if they saved.
     
  8. yezo

    yezo

    Joined:
    Dec 23, 2014
    Posts:
    6
    Hi Raul,

    I am using EasyRoads3D Pro and its a great asset, thank you!

    I have a question concerning building multiple ERRoadNetwork instances dynamically via the scripting API. From what I see all the roads from all the instances get merged into a single network, as if multiple networks are not supported by the product.

    What I am doing is I generate terrain tiles dynamically from (nearly) endless procedural noise. Only 9 tiles around the camera are instantiated and get created/removed as the camera moves in the endless world. Now what I need to do is to add roads to this. I also have "endless" road graph data structure consisting of road points, which I want to translate to road networks on the fly exactly as I do with terrain. If multiple networks is not currently possible, the only way I see to do this seamlessly at runtime is to modify the single road network via the scripting API so the roads in the old parts of the network get removed as camera moves farther away from them, and the new ones get created from points and added. If that is possible, could you please share a code samples which gives a hint on how to do that?

    Thank you,
    Yevgeni.
     
  9. marcell123455

    marcell123455

    Joined:
    Jun 18, 2014
    Posts:
    275
    Yes, just send me the updated version to marcell982@gmx.de ;)
    When I disable auto generated sideobjects in edit mode they won´t generate as expected, but they also won´t generate when I click build terrains.
     
  10. alexrau

    alexrau

    Joined:
    Mar 1, 2015
    Posts:
    80
    Updating to latest version fixed it.
     
    raoul likes this.
  11. raoul

    raoul

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

    Yes, the scripting API expects only one road network to be active in the scene.

    You could indeed remove the road object from the road network (ERRoad Destroy()) if they are no longer required or disable roads further away from the cam (GameObject SetActive) or use LOD groups with the Bounds value of the lowest LOD level set to a value higher then 0, the road will be culled in that case.

    Thanks,
    Raoul
     
  12. raoul

    raoul

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

    I will send an update on Monday.

    But you mentioned you switched off "Auto Generate", that means you disabled this v3.2 feature :) Please see what I wrote, in order to skip side object creation in Edit Mode (what you requested) I referred to:

    General Settings > Scene Settings > Build Side Objects in Edit Mode

    This does not mean "Auto Generate" should be switched off. Keeping this active will still generate the data rerquired when switching to Build Mode.

    I just tested this workflow in the v3.2 beta demo scene with "Build Side Objects in Edit Mode" switched off. In general this does work well for all auto generated side objects in this scene, bridges, tunnels, guard rails and direction posts. What is not build in this setup are auto generated retaining walls. I made a note to look into that.

    Thanks,
    Raoul
     
  13. PrimusThe3rd

    PrimusThe3rd

    Joined:
    Jul 3, 2017
    Posts:
    69
    Hi,
    Will there be a tutorial once v3.2 will be (finally) realesed for this solution?
    "Ok :) If you want hard edges like in your image, the v3.2 beta does support that for Shape type of side objects. The v3.2 beta is part of the asset store download as a separate package. This feature should be stable."
    Regards, Primoz
     
  14. raoul

    raoul

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

    Yes, there will be new tutorials in general and for v3.2 specific features.

    Are you looking for more info regarding the quote in your post? It is related to Shape type of side object. The shape can be defined in the Shape Editor window, press the "Open Shape Editor Window" button at the bottom of the "General Settings" section. When selecting a shape node, node specific options are displayed among which a "Har Edge" checkbox.

    The retaining wall side object in the v3.2 beta package is a Shape type of side object and hard edges are used. So this side object can be reviewed regarding this.

    Thanks,
    Raoul
     
    PrimusThe3rd likes this.
  15. PrimusThe3rd

    PrimusThe3rd

    Joined:
    Jul 3, 2017
    Posts:
    69
    Hi, I suggest to consider releasing some form of "lite", "simplified" edition of Easyroads3D, similar to this tool:

    A lot of Unity beginners who just need easy road creation (including me) would embrace such tool. :)
    Regards,
    Primoz
     
  16. raoul

    raoul

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

    That is a runtime implementation by Andefob, https://forum.unity.com/threads/eas...-new-road-system.229327/page-180#post-6569890, using the scripting API

    It is based on a specific road network setup with for example the bridge side object. Side Objects is a framework within EasyRoads3D. The EasyRoads3D Pro package does not include these assets because many people user their own assets. But the additional free demo package does include more ready-to-use assets.

    Different, UI options is on the list to add in a way you describe, light and advanced setups etc. But this has a little bit less priority. The survey on our website shows that this is one of the items less high on the users wishlist, https://easyroads3d.com/survey.php . But I will take note of your comment :) and if others feel the same please let us know.

    Thanks,
    Raoul
     
    PrimusThe3rd likes this.
  17. amynox

    amynox

    Joined:
    Oct 23, 2016
    Posts:
    178
    Hi,

    First of all thank you for this great asset.

    I want to add parking spots attached to my road (as side object). there is a way to have there edges surrounded by "SideWalks" (the same sidewalks that one used in road connections ?

    Thanks
     
  18. raoul

    raoul

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

    Thank you, glad you like it.

    Built-in sidewalks are added relative to the road edges. So positioning built-in sidewalks relative to side objects is not possible at the moment.

    What exactly will this looks like? Do you use your own parking spot assets? Will the sidewalks and parking spot align with road connections? If not, can the sidewalks be part of the parking spots?

    Thanks,
    Raoul
     
  19. colin_young

    colin_young

    Joined:
    Jun 1, 2017
    Posts:
    243
    Other than the method documented here in 2017, is there a way to transfer a road network from one project to another? For reference that method was basically drag the network into a new empty scene and then export that scene.

    The issue I'm running into is the new scene, while built from mostly the same terrain data, has slightly different elevations. I've set all the road types to follow terrain with a contour threshold of 1, although when I look at the roads individually (i.e. not the type) the threshold is set to 5 and cannot be changed. Rebuilding doesn't "fix" the roads and some of them are floating above the terrain while others are slightly below.

    Is there some way to "drape" all the roads onto the new terrain? I have around 400 roads so I'd really rather not have to do it manually.
     
  20. raoul

    raoul

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

    So in the original scene the "Follow Terrain Contours" option is used and after "importing" this road network in the new project this no longer works.

    When the terrain is slightly different then indeed a Refresh is required to have the road adapt to the new terrain. And "General Settings > Scene Settings > Refresh Road Network" does not update the roads? In that case, is "Follow Terrain Contours" still active on all roads? Have you done a quick test on one road, deactivate > activate "Follow Terrain Contours". Does that update the road?

    I will check this anyway. For now, if the full Refresh indeed fails but deactivate > reactivate "Follow Terrain Contours" works then the quickest way to reset this for all roads is probably through the scripting API. ERRoadNetwork class GetRoads() and ERRoad FollowTerrainContours(bool value). First set all roads to false then to true. Have you tried that?

    Thanks,
    Raoul
     
  21. colin_young

    colin_young

    Joined:
    Jun 1, 2017
    Posts:
    243
    It looks like I had some compilation errors from another package. Once I re-imported it, those went away and then the refresh fixed the roads. The connectors are still sitting above the terrain (~1m or more in some cases). I should be able to handle those easily with scripting, but should those be also moved to match the terrain automatically?
     
  22. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    "Follow Terrain Contours" is road specific and generally in this state the roads already do snap to the terrain when placing markers or changing marker positions. I can see in your new scene situation a solution for all connectors would be helpful as well. I will make a note to include that when refreshing the road network. Meanwhile you could use Terrain.SampleHeight and pass the connection positions to get the terrain height and use ERConnection.SetPositon to place the connectors at the new terrain height.

    Thanks,
    Raoul
     
    colin_young likes this.
  23. marcell123455

    marcell123455

    Joined:
    Jun 18, 2014
    Posts:
    275
    Hello @raoul,

    I guess I found a other bug with autogenerated bridges. To replicate it do these steps:

    Use my project as reference.
    Select the Road Network-> General Settings -> Road Types.
    Now select "HW_4L_Road" -> scroll down and set the "SimpleBridge" Sideobject to autogenerate.

    Now create a HW_4L_Road road with a few nodes. Take a node and move it up -> A Bridge get´s created. Now move the node down again -> The bridge won´t disappear and the road won´t show the terrain smoothing grid.

    Thanks ;)
     
  24. raoul

    raoul

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

    I think more is involved in this situation.

    The "HW_4L_Road" road type already has "SimpleBridge" activated. Following your steps I cannot recreate the problem. When moving the marker back down towards the terrain with the "highlight" surfaces toggled on (I think you are referring to this as the smoothing grid), the surfaces at the start and end of the bridge do connect again when moving the marker towards the terrain, this is instantly visible when moving the marker. Then when releasing the mouse button at that point indeed no bridge is created.

    Also, these steps are similar to what is shown in the first v3.2 beta video. On my end the behaviour is the same in your scene.

    Can you consistently recreate this situation anywhere in the scene with any road shape? If not, could you then give more details about the situation when this does happen?

    Thanks,
    Raoul
     
  25. Zaddo

    Zaddo

    Joined:
    May 19, 2012
    Posts:
    78
    How to Give Road Mesh Depth with Umodeler

    I have been using easyroads3d for about 7 years. I have always struggled with the terrain clipping through the road. Raoul has great tips in the manuals troubleshooting section on how to fix this.

    But I find this tricky. I am programmer, not a graphics guy :)

    I thought if I could give the road mesh depth, this might make it easier. I got Umodeler a little while ago through a humble bundle deal. I had never used it. But I hoped it could give the easyroads generated mesh depth. This was quite easy to do.

    I thought I would share a quick video on how do this, should anyone else find this useful.

    All I am doing is Umodelerizing the easyroads mesh, then selecting all the tri's and using the pushpull tool to stretch them.

     
    Last edited: Dec 12, 2020
    raoul, hopeful and PrimusThe3rd like this.
  26. marcell123455

    marcell123455

    Joined:
    Jun 18, 2014
    Posts:
    275
    Yes, I can recreate this behavior with every other roadtype after I added the simple bridge object with auto generation.
    For example I did this with the "HW_6L_Road"

    After Placing nodes and pulling one node up:
    https://imgur.com/oOAvC3I

    When I push it down again it does not connect to the terrain again. And the bridge does not disappear.
    https://imgur.com/5PU1zsQ
     
  27. raoul

    raoul

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

    That is indeed a quick way to add depth to the roads, thanks for sharing this method :)

    Just as a note, this is something that can be done in v3.1 by using custom connection prefabs based on imported meshes. Roads extruded from these connection instances will inherit the same shape, in this case depth. And new road types can be created accordingly.

    Custom road shapes will be built-in in v3.3 which is available in alpha builds from our website.

    Thanks,
    Raoul
     
    hopeful and Zaddo like this.
  28. raoul

    raoul

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

    In my comment I wasn't so much referring to different road types, I was more asking if this can be recreated anywhere in the scene and with any road sgape (based on marker positions).

    But I checked this with the same "HW_4L_Road" road type on the flat terrain area like in your new images and this time I could recreate it. I will look into that.

    Meanwhile deactivate > reactivate this side object will fix the issue.

    Thanks,
    Raoul
     
    Last edited: Dec 12, 2020
    marcell123455 likes this.
  29. Zaddo

    Zaddo

    Joined:
    May 19, 2012
    Posts:
    78
    Hi Raoul,
    I can't work out how to get Vegetation Studio masks onto the roads. I can manually add them and this works ok. But you mention that this is integrated with EasyRoads.

    I read this post: EasyRoads3D v3 - the upcoming new road system | Page 175 - Unity Forum

    But I can't find any settings. You refer to:
    "It should be a matter of activating VS and chosing the type of component and the default settings. Then in General Settings > Road Types it is possible to set road type specific values."

    But I can't see any options in this area? The ERVegetationStudio script is in the project.

    upload_2020-12-13_9-4-6.png
     
  30. raoul

    raoul

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

    Are the default VS options visible in General Settings > Terrain Management?

    In that case, there is an "Active" checkbox. Once this is toggled on the same VS options will also be visible in the Road Types section for each road type and for each individual road.

    There is one known issue with this (fixed in the next update), after opening a new scene with a new road network the VS options will not be visible. Restarting Unity fixes this.

    Thanks,
    Raoul
     
    Zaddo likes this.
  31. Zaddo

    Zaddo

    Joined:
    May 19, 2012
    Posts:
    78
    @raoul thanks. I found it and it is working perfectly. Sorry, I don't how I missed that, I really appreciate the quick response.
     
    raoul likes this.
  32. colin_young

    colin_young

    Joined:
    Jun 1, 2017
    Posts:
    243
    For the record, I was able to easily move the connectors to the terrain. In case anyone else needs to do something similar, here is the code I used to save you a few minutes (I also update all roads to follow terrain with a threshold of 1):

    Code (CSharp):
    1. ERRoadNetwork roadNetwork = new ERRoadNetwork();
    2.  
    3.             foreach (var connector in roadNetwork.GetConnections())
    4.             {
    5.                 var transform = connector.gameObject.transform.position;
    6.                 connector.gameObject.transform.position = new Vector3(transform.x, Terrain.activeTerrain.SampleHeight(transform), transform.z);
    7.             }
    8.  
    9.             foreach (var road in roadNetwork.GetRoads())
    10.             {
    11.                 road.FollowTerrainContours(false);
    12.                 road.FollowTerrainContourThreshold(1);
    13.                 road.FollowTerrainContours(true);
    14.             }
     
    raoul likes this.
  33. marcell123455

    marcell123455

    Joined:
    Jun 18, 2014
    Posts:
    275
    Hi, I have a other question. Do sideobjects affect the terrain editing besides the road? For example I have a sidewalk which has a slope at the outside to make it easier for the car to drive over. Now this slope goes through the terrain as wanted, but is this a problem?

    https://imgur.com/HU0UaWC
     
  34. raoul

    raoul

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

    Side objects like in your image do not affect the terrain. So that is all good.

    But side objects can be used to adjust the terrain if you would want to. This is done by marking it as "Deformation Object". Especially the Shape type of side object is useful for this, the "River Bed" side object in the demo package is an example of this.

    Thanks,
    Raoul
     
    hopeful and marcell123455 like this.
  35. marcell123455

    marcell123455

    Joined:
    Jun 18, 2014
    Posts:
    275
    AAAAnd a new error ^^:

    NullReferenceException: Object reference not set to an instance of an object
    EasyRoads3Dv3Editor.OCCQCODDQD.DisplayRoadSoControls (EasyRoads3Dv3.ERModularBase scr, EasyRoads3Dv3Editor.OCCQCODDQD eScr, EasyRoads3Dv3.ERSORoadExt soData, EasyRoads3Dv3.ERModularRoad roadScr, System.Int32 index, System.Boolean& hasChanged, System.Boolean isScene, EasyRoads3Dv3.QDQDOOQQDQODD rt) (at <6bc06c5cfea24f6b841976d4fa5fdaa1>:0)
    EasyRoads3Dv3Editor.OCCQCODDQD.OCQQQOCDDO (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)

    I got this error when I clicked on that small arrow to expand the settings of my tunnel sideobject but I don´t know what tab it was, sorry. However, there is a bug with the cut holes feature.

    Create a HW_4L_Tunnel road where both ends stick trough the terrain. Now create two HW_4L_Road and connect one to the end and one to the start of the tunnelroad. Build the terrain, and you will see that the entrance which is connected to the Tunnelroads first node, is cutting holes! When you go to the Tunnel Sideobject settings you will see cutting holes is disabled. If you can´t recreate it I can make a video, I can recreate it.
     
  36. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735

    Hi Marcell,

    The "HW_4L_Tunnel" road type has "Terrain Deformation" switched off. This will not work well with tunnels.

    Also, this road type has "Simple_Tunnel" activated. This is a tunnel side object which is not part of the beta package.

    Looking at the settings in the Side Object Manager, this side object is not set as a tunnel object and "Auto Generate" is not active, instead the default marker active state is enabled . "Auto Generate" is required for tunnels in the current v3.2 beta package if you want holes in the terrain at the start and end of the tunnel.

    Testing this with the provided "Concrete Tunnel" the holes are generated. This also works well after adding the two "HW_4L_Road" and connecting them to the "tunnel" road with I Connectors.

    The question here is, what is the purpose of the "HW_4L_Tunnel" road? Does this road in your scene start and end where the road enters and exits the the terrain and do you indeed want the "Simple_Tunnel" tunnel generated over the full length? As mentioned with this setup no terrain holes will be created.

    Also, while activating / expanding these side objects on the specific road no errors occured.

    Thanks,
    Raoul
     
    Last edited: Dec 15, 2020
  37. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    @marcell123455,

    This is fixed in the next v3.2 beta update.

    Thank you for reporting this.

    Raoul
     
    marcell123455 likes this.
  38. Neto_Kokku

    Neto_Kokku

    Joined:
    Feb 15, 2018
    Posts:
    1,751
    Hi,

    I'm having a problem with connectors: I cannot add any of the existing ones to any road, they all show this in the connections tab:
    upload_2020-12-15_18-43-24.png

    How can I fix the shape of the prefabs so ER will accept them? They are custom prefabs, not dynamic ones.
     
  39. raoul

    raoul

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

    Roads can attach to connectors when the shapes match. In v3.1 the shape of built-in road types is based on two nodes, one on the left and one on the right.

    What is your situation? What do the connections of your custom prefabs look like? And, if these are not based on two nodes, did you create new matching road types in the Custom Connection Editor window after making the connection selection? In that case, this road type shape will actually match the custom connection.

    So, the shape will most likely work well within the system but it depends on how the roads were created whether they can connect to these connectors. Can you extrude new roads from these connectors?

    Thanks,
    Raoul
     
  40. ahmerbutt65

    ahmerbutt65

    Joined:
    Nov 6, 2020
    Posts:
    1
    hey.. the tool is very good. but i have a question while creating tunnels i just want both ends of the tunnel on particular points of the road length. but when i generate tunnels i got both ends of the tunnel at both end points of the roads.. kindly respond fast..
     
  41. raoul

    raoul

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

    The tunnel being created from the start to the end in the way you describe is the default behaviour of side objects, always active on all markers. Tunnels in v3.2 are based on the new v3.2 feature, auto generated side objects based on the terrain profile.

    How are you creating the tunnels? What are the exact steps you take?

    Yesterday I replied to a post from marcell123455, https://forum.unity.com/threads/eas...-new-road-system.229327/page-181#post-6620920 , your situation might be similar.

    Are you using the tunnel examples in the beta package? As mentioned above, these side objects are set up so the tunnel will be auto created based on the terrain profile, like in the v3.2 beta demo scene. Tutorials will follow but the workflow is mentioned here https://easyroads3d.com/v3beta.php .

    Thanks,
    Raoul
     
  42. ncho

    ncho

    Joined:
    Feb 1, 2014
    Posts:
    99
    Just bought this and editor behaving very messily, roads randomly duplicating, presets disappearing, Undo not working etc and getting the below errors. On 2020.1. Any advice?
     
    Last edited: Dec 16, 2020
  43. raoul

    raoul

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

    The selected error points to an issue with SetBridgeAlignment(). This is related to instantiated bridge side objects (not more commonly used procedural bridge side objects which are generated along road sections).

    Which packages do you have imported or is this related to your own side objects? And in order to attempt to reproduce this, what are the exact steps you take?

    SetBridgeAlignment() will be obsolete in v3.2. This is replaced with new Marker Snap objects that can be assigned to bridge prefabs. Road markers can snap to these objects to quickly align roads with bridge objects.

    These same for randomly duplicating roads. That is unknown, there is no history of that so it is hard to give feedback at this moment. When does this happen? Can you reproduce this in the simple demo scene?

    Undo is implemented for all Scene View actions using the Unity Undo class. In which situation does this not work?

    Thanks,
    Raoul
     
  44. ncho

    ncho

    Joined:
    Feb 1, 2014
    Posts:
    99
    Hi, it is a bit hard to pinpoint when exactly all these things happen, nor can I reproduce them repeatedly, it more happens as I try to work, I am merely using all the assets included in the demo project plus the regular non-HD package, nothing custom otherwise. It does seem to happen as soon as bridges come into play. I will keep monitoring and maybe see if 3.2 helps as soon as that comes out.
     
  45. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Is that indeed specifically when activating the "Motorway 2L Bridge"?

    I just tested this to see if there are problems but it appears to work well. In v3.1 it is a matter of activating this side object for the road. After that it can be instantiated at specific marker positions. The specific function SetBridgeAlignment() is called for example when aligning roads with the bridge. These options become available in the Inspector after selecting markers of both roads surrounding the bridge. None of these options throw errors though so I wonder what the situation is on your end.

    Regarding Undo, what I did not mention in my previous reply was that when Undo does not seem to work, clicking the terrain first to deselect for example a marker can help when Undo does not seem to be triggered..

    Thanks,
    Raoul
     
  46. marcell123455

    marcell123455

    Joined:
    Jun 18, 2014
    Posts:
    275
    Hello @raoul ,
    Small question: Let´s say I have a road with sidewalks as sideobjects and have a custom intersection with sidewalks aswell. How do I make the sidewalk Sideobject connect to the custom intersection aswell? Thanks ;)
     
  47. raoul

    raoul

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

    Side objects do not have the auto snap feature that roads and built-in sidewalks have, if that is what you were looking for? Side objects can have any shape and at the moment side objects cannot be activated on connection objects. So this snapping feature would be complicated. Side object support for connections will be available in v3.2.x or v3.3.

    But the side object should be build by default from exactly the start to the end when active on all road markers. So on 90 degree connections they should connect.

    Thanks,
    Raoul
     
    marcell123455 likes this.
  48. marcell123455

    marcell123455

    Joined:
    Jun 18, 2014
    Posts:
    275
    Thank´s for the fast answer. Yes, I mean the auto snap for sidewalks. How do I setup this for a custom sidewalk? And how do I make it snap to a custom connection?
     
  49. raoul

    raoul

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

    I think I already answered that,
    So custom sidewalks build as side objects do not snap to connection objects. What do these sidewalks look like, why are they generated as side objects? Can they not be part of the custom connection so the attached road will inherit the shape including the sidewalks? V3.3 will include an upgrade of the sidewalk system?

    Thanks,
    Raoul
     
    Last edited: Dec 20, 2020
    marcell123455 likes this.
  50. keithsoulasa

    keithsoulasa

    Joined:
    Feb 15, 2012
    Posts:
    2,126
    I'm looking for a way to disable some side object renderers at runtime, the idea is you have invisible walls to keep players on track. The instance batcher object tends to not keep the side object's tag though .

    Does anyone have a good solution to this

    Edit;

    Here's my solution

    Code (CSharp):
    1.  
    2.  
    3.     public void setRender()
    4.     {
    5.         GameObject.FindGameObjectsWithTag("Invisawall").ToList().ForEach(wall =>
    6.        {
    7.  
    8.            try
    9.            {
    10.                wall.GetComponent<MeshRenderer>().enabled = RenderWallInGame;
    11.                wall.GetComponentsInChildren<MeshRenderer>().ToList().ForEach(
    12.                    m => m.enabled = false
    13.                    );
    14.            }
    15.            catch (System.Exception)
    16.            {
    17.  
    18.                //throw;
    19.            }
    20.        });
    21.     }
     
    Last edited: Dec 21, 2020