Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

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,722
    Hi JonaOneview,

    Built-in sidewalks are currently not supported on imported models.

    But imported models with sidewalks where the sidewalk shape matches a built-in sidewalk preset are supported. So when the specific model already has these sidewalks added then road sections where the same built-in sidewalk shape is used can connect to these imported crossing models with sidewalks.

    The sidewalk system will also be expanded V3.3, built-in sidewalks will be supported on imported models although there will probably be limitations since these models can have any shape and sidewalks will not always look good following any shape.

    Thanks,
    Raoul
     
  2. JonaOneview

    JonaOneview

    Joined:
    Nov 3, 2019
    Posts:
    11
    Thank you very much Raoul, you've helped me a bunch! Can't wait for V3.3 to come out. is there an expected release date for it?
     
  3. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    There is no expected release date for v3.3, it will certainly not be in the next weeks. I just mentioned the sidewalks schedule to let you know. The new sidewalk options will first be available in the alpha and beta builds. The system for creating sidewalk presets from the General Settings tab instead of through the crossing options in the current version is done. Sidewalk activation directly on roads is also functional. What needs to be done, is support on crossings. Once that is implemented it will be activated in the alpha / beta builds.

    Thanks,
    Raoul
     
    JamesWjRose likes this.
  4. colin_young

    colin_young

    Joined:
    Jun 1, 2017
    Posts:
    243
    I'm running into an issue where my lanes (using 3.3.0a1) in some cases seem to have the wrong ends connected. The attached screenshot demonstrates using some custom gizmos I've created to visualize the entity graph I extract from the road network. Most of my connections are working correctly, there is just a small number that are giving me issues. The direction goes from yellow to red. The connection on the right thinks the lane is connected at the opposite end, while the connection on the left has it correct. I've recreated all 3 roads by deleting them and dragging out from the connector, which has solved the problem for some of the other crossings that had this issue. I've also deleted and recreated the crossing by dragging the roads together. Other working crossings have the main road type in use also, but not this specific combination.

    Any suggestions what might be going wrong? If necessary I can send you the latest scene (which is back down to ~400MB from 1.5-4+ GB thanks to your suggestions via email).
     

    Attached Files:

  5. raoul

    raoul

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

    With the current info it is hard to give feedback.

    Is this right-hand driving and is the other road a single lane (one direction) road type?

    In that case, if yellow is the start and red is the end, I see two outgoing lanes from the one direction road, one goes to the left and another to the right. This appears to be correct.

    Which lanes are wrong? Or is this related to the right lane data on the road section from the right towards the crossing What do the lanes look like generated by EasyRoads3D itself?

    Just a note, single lane road types do need work, I belief at the moment both ends are handled as outgoing lanes.

    Thanks,
    Raoul
     
  6. colin_young

    colin_young

    Joined:
    Jun 1, 2017
    Posts:
    243
    SerializedObjectNotCreatableException: Object at index 0 is null
    Yeah, I realize it's going to be a bit difficult just from a picture, was hoping there was some sort of known issue :)

    The problem is the road on the right. The wrong lane is "connected". I have sort of isolated the issue to crossings with a road type of Paved Alley connecting to another road when the alley and road ends don't match, i.e. end-end and start-start are okay, end-start and start-end are not. So far those are the only issues I've seen. Other differing road types appear to be fine to connect. The lane setup for both is the same: 2 lanes, (Lane1, -0.5, left) and (Lane2, 0.5, right), the they have different widths. I tried creating a new road type from the default type (which doesn't seem to have this issue), but even changing to that type still has the issue (even after deleting the problem road and recreating by dragging from the connector).

    I've also noticed the following in the editor when I use the "select connection in hierarchy" on one of the problem crossings (or even attempt to select it directly in the editor when not in ER3D "mode"):
    • EasyRoads3Dv3: duplicating Flex Connectors is not supported
      UnityEngine.Debug:Log(Object)
      EasyRoads3Dv3Editor.QDOQDSQQDQODD:OnEnable()
    • SerializedObjectNotCreatableException: Object at index 0 is null
    • SerializedObjectNotCreatableException: Object at index 0 is null
    • MissingReferenceException: The object of type 'ERCrossingPrefabs' 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.
      EasyRoads3Dv3Editor.QDOQDSQQDQODD.OnEnable () (at <c182ca8aab0c4426ba2bf4ad591ece3b>:0)
    After which the crossing is gone from the scene. That only seems to happen for one crossing, even after I recreate it (by dragging the roads together).

    By single lane I'm assuming you mean a one-way with only one lane total, and not one lane in each direction.

    I'm going to go ahead and send an export of the scene to you since I think this is some sort of corruption.
     
  7. raoul

    raoul

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

    The screenshot only shows a lane on the right road without any information and I don't know where this data comes from. Like I already mentioned it is hard to give feedback with only this info. I will check the scene you sent.

    I meant a single lane, one lane for the road, not one lane on both sides. Although the road is not clearly visible in Edit Mode, it appears that the lane is in the middle of that road. But from the additional info it seems this a 1x1, two lane road. I will check the scene you sent.

    The warning message appears when the mesh of the selected road is also used on another crossing. This is what will happen when duplicating a Flex Connector. Each Flex Connector should have a unique mesh. I see that indeed the crossing will be removed, I will change that for the next alpha update.

    But you mention that this also happens when snapping two roads together and after selecting the newly created Flex Connector? To test that in the scene you sent, for which roads does that happen?

    Thanks,
    Raoul
     
  8. colin_young

    colin_young

    Joined:
    Jun 1, 2017
    Posts:
    243
    In the scene I sent, the roads I mentioned in the email as having one of the problem connectors are where the connector that disappears on selection is.
     
  9. raoul

    raoul

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

    Yes, the email does mention two roads. And when recreating the Flex Connector and selecting it afterwards in the hierarchy the same warning is displayed. I will look into that.

    Thank you for sendfing the scene!

    Raoul
     
  10. colin_young

    colin_young

    Joined:
    Jun 1, 2017
    Posts:
    243
    I'm just happy it's not me :) I only noticed these issues because my automatic traffic script was making the vehicles do some very weird things on a few intersections. On the plus side, my traffic script can handle impossible geometry...
     
  11. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    Yes, it is strange. There are around 15 other Flex Connectors in the scene. There is no warning when selecting them in the hierarchy. Anyway, this will be changed so the mesh is replaced if necessary. That way the warning isn't really necessary either.

    Thank you for reporting this.

    Raoul
     
  12. Undiscovered

    Undiscovered

    Joined:
    Apr 5, 2014
    Posts:
    53
    Hi really nice asset. I do however have a question regarding the import process of OSM data as I cant seem to find much information in the manual. My question is when creating the Unity terrain how do i know what values to set the terrains height/width to? I've opeed the OSM file to see if it refers to a height/width of the data but not having much joy. You see without the correct values the OSM data skews to the Unity terrain... I have also tried using the Global Terrain Coordinates and entering the values from the OSM website but still not having much joy.
    If anyone can assist that would be great.
    Thanks!
     
  13. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    Hi Undiscovered,

    Usually OSM imports are done together with a terrain that is also generated from DEM data. That is at least how we work. Either matching coordinates are used in which case there is no need to enter Global Terrain Coordinate values. If the terrain coordinates are not the same as the OSM bounds coordinates then the terrain coordinates can be entered. The road data will be extracted relative to these coordinates.

    But if that is useful, we can add a button that will resize the terrain according the bounds in the OSM file.

    Thanks,
    Raoul
     
  14. Undiscovered

    Undiscovered

    Joined:
    Apr 5, 2014
    Posts:
    53
    Thanks for your quick response.

    May I ask the process that you follow to import OSM with DEM data? Is it possible to download it as a package from OSM? I'm intrigued.

    Thanks again
     
  15. colin_young

    colin_young

    Joined:
    Jun 1, 2017
    Posts:
    243
    I'm not associated with EasyRoads3D, but I have used the OSM import to add ER3D roads to a terrain that was extracted from DEM files. This is the approximate process I used:
    1. Determine the geographic coordinates of the terrain bounds. This is a bit tricky because Unity needs a rectangle and using equal longitude coordinates creates a trapezoidish shape. I believe I used MapBox to initially create my terrain, then got the coordinates from that.
    2. Process your DEM files. I used QGIS to combine several sources
    3. Extract a heightmap. I used GDAL utilities: gdalwarp and gdal_translate
    4. import the heightmap for a Unity terrain object
    You will need to learn a bit about geographic coordinate systems.
     
    raoul likes this.
  16. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    Hi Undiscovered,

    Importing / collecting DEM data and OSM data are two different processes. At least in our case. DEM data can come in different formats / projections. There are several tools that can be used to convert these formats and also the used projection so it matches the OSM data. Whether the projection needs to be converted depends on the size of your world and the accuracy you are after. It is easy to experiment with that when also satellite imagery matching the DEM data is used. The satellite imagery can be used as a terrain texture. The layout of the generated roads can be compared with those visible on the terrain.

    Regarding Unity, we use the gridfloat format and update the unity terrain through a script. Something like this https://wiki.unity3d.com/index.php/HeightmapFromGridFloat

    Thanks,
    Raoul
     
  17. GWStudio

    GWStudio

    Joined:
    Sep 27, 2016
    Posts:
    109
    Hi Everyone ...
    Does EasyRoads3D Support HDRP 7.xx !!??
     
  18. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    Hi GWStudio,

    The EasyRoads3D Pro package itself includes limited custom shaders. There are some example shaders showing how EasyRoads3D specific features can be used like road blending with the terrain but HD RP and URP are currently not supported. If there is any shader in this demo package you like to use in an HD RP project, let me know.

    New shaders are being made also for v3.2 and v3.3 specific features. These shaders will support all HD RP and URP versions.

    The HD Roads Add On package with road types, crossing prefabs and road materials does support the latest 7.x HD RP and URP versions.

    Thanks,
    Raoul
     
    GWStudio likes this.
  19. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,200
    How can I use an existing road via the API in the Unity Editor?

    Basically I'd like to drag a road into an editor field and hit a convert button. The problem: The road is always null which leads to a nullpointer exception in the Inspector, i. e. I can't even get to the point to drag in a road.

    Code (CSharp):
    1.  
    2. [System.Serializable]
    3. public class EasyRoadsExtension : MonoBehaviour
    4. {
    5.    public ERRoad road = null;
    6. }
    7.    
    8.    
    9. [CustomEditor(typeof(EasyRoadsExtension))]
    10. [CanEditMultipleObjects]
    11. public class EasyRoadsExtensionEditor : Editor
    12. {
    13.    private SerializedProperty road;
    14.  
    15.    public void OnEnable()
    16.    {
    17.        road = serializedObject.FindProperty("road");    <==== is null
    18.    }
    19.  
    20.    public override void OnInspectorGUI()
    21.    {
    22.        serializedObject.Update();
    23.  
    24.        EditorGUILayout.PropertyField(road, new GUIContent("Road", "")); <==== exception
    25.        
    26.        serializedObject.ApplyModifiedProperties();
    27.    }      
    28.        
    29. }
    30.  
    31.  
     
  20. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    Hi Rowlan,

    Do you have more code? Because road will be null in the code you posted.

    I am not sure how this is used. Is this script attached to all individual road game objects? In that case you can do something like this:

    Code (csharp):
    1. if (road == null)
    2. {
    3.     // create a reference to the road network in the scene
    4.     ERRoadNetwork network = new ERRoadNetwork;
    5.  
    6.     road = network.GetRoadByGameObject(this.gameObject);
    7. }
    Dragging in a road gameobject will not work. How do you want to use this?

    Thanks,
    Raoul
     
  21. Viet1990

    Viet1990

    Joined:
    Jan 2, 2013
    Posts:
    8
    Hello,

    first of all thank you for an amazing asset! I have purchased it a few days ago and have tried to wrap my head around it, as it seems to be a very powerful tool with so many options and customization.

    I have a few newbie questions which I'd be really glad if someone can help answer:

    1. Road and connection width: how would I go about in increasing the width of the road and connection?
    upload_2020-1-26_17-54-1.png
    If I create a new road extending from a crossing, the Road Width option here seems to be grayed out:
    upload_2020-1-26_17-53-56.png

    I also tried to create a separate road which I could set the width, but upon connecting to a crossing, the connection width didn't scale with the road. How do I also scale the connection to the road with different width?

    upload_2020-1-26_19-26-32.png

    2. Setting the outer curb:
    I tried to set the "outer curb" checkbox (I assume the outer curb means the area highlighted in red) of a Default T crossing, but got an error:
    upload_2020-1-26_19-28-44.png

    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 <437ba245d8404784b9fbab9b439ac908>:0)
    4. System.ThrowHelper.ThrowArgumentOutOfRangeException () (at <437ba245d8404784b9fbab9b439ac908>:0)
    5. System.Collections.Generic.List`1[T].get_Item (System.Int32 index) (at <437ba245d8404784b9fbab9b439ac908>:0)
    6. EasyRoads3Dv3.OCCDQCDCQC.ODCCOQQDDD (EasyRoads3Dv3.ERCrossings scr, System.Collections.Generic.List`1[T] vecArray, System.Collections.Generic.List`1[System.Collections.Generic.List`1[UnityEngine.Vector2]]& uvArray, EasyRoads3Dv3.QDOQDSQOOQDDD corner, System.Boolean reverse, System.Single uvTiling) (at <44db4b557a5242b59c9b46f9ab327024>:0)
    7. EasyRoads3Dv3.OCCDQCDCQC.OCCOQQDCOO (EasyRoads3Dv3.ERCrossings scr) (at <44db4b557a5242b59c9b46f9ab327024>:0)
    8. EasyRoads3Dv3.ERCrossings.OOCDCODDQQ (System.Boolean sidewalkSceneHandleFlag, System.Boolean rebuildRoads) (at <44db4b557a5242b59c9b46f9ab327024>:0)
    9. EasyRoads3Dv3Editor.DOQQDSQQDQODD.OnInspectorGUI () (at <d2c0ecc4f4594554b9bb5558a34eebd5>:0)
    10. UnityEditor.UIElements.InspectorElement+<>c__DisplayClass55_0.<CreateIMGUIInspectorFromEditor>b__0 () (at <0a2a5ea3c8ab4e3394576dd407a984f6>:0)
    11. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    3. How would I go about in creating a fork in the road, or a highway exit lane:
    upload_2020-1-26_19-36-12.png

    Thank you so much!
     
  22. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,200
    That already helped, thank you! The purpose is that I'd like to create roads via your API using the Unity Editor. One problem I'm facing currently is that ER doesn't seem to handle the angle properly. Do you think you can solve this on your side? Basically I got a shape with Vector3 positions in clockwise order. However, ER seems to twist the direction. Example:

    er.jpg

    I'm only using this:

    Code (CSharp):
    1.  erRoad.AddMarkers(positions.ToArray());
    ie nothing I can do on my end, unfortunately to fix this. Or do I have to smoothen out the points. Here's an example of my points and the road that ER creates:

    p.jpg
     
    Last edited: Jan 26, 2020
  23. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    Hi Rowlan,

    The problem with the shape especially visible in the centre is probably caused by the rather extreme angle between road markers and added to that, the differences in distances between markers. Markers do not have to be positioned at exactly the same distance, but in this example the most right marker is almost in the centre of the image. The distance to the right edge of the image without the next marker possibly even being close in that area, is a lot longer then the distance to the next marker. Counted up to that the extreme angle with the next marker will result in an unrealistic road shape.

    You can try inserting some markers manually and see how that changes the shape. The spline strength option for each marker can also be used to some extend to control the road shape.

    Thanks,
    Raoul
     
  24. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,200
    The "manual" is actually the thing I'd like to avoid :D I guess I have to try some smoothing algorithms. In case you know good ones, please let me know. I already tried Chaikin's smoothing algorithm, but that still has hard edges in.

    Since you asked above how this is used: I created Vegetation Studio Pro Extensions with which you can create base shapes for biomes, lakes and rivers, i. e. populate your terrains automatically. I thought why not add Easy Roads as well. Thanks to your help, I already have quite good results. Here's a quick demo on blank terrain:

    rtc.gif

    Basically a race track creator for fun. Those tracks should just be a base to start from. Nontheless it would be great for everyone if I could smooth out those hard curves automatically :)
     
    raoul likes this.
  25. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    Yes, but playing with different distances between markers and angles manually to see how this affects the shape is easier. It is just to get a reference of how to setup your algorithm.

    Yes, I know what your aiming at :) I just wondered what your intentions were with the ERRoad question in the code snippet you posted.

    Progress is looking good :)

    Thanks,
    Raoul
    .
     
  26. PHeimlich

    PHeimlich

    Joined:
    Oct 15, 2018
    Posts:
    11
    Hi raoul,

    is it possible to connect road to road or road to crossing via api? I have placed my roads and crossings and I want to connect them automatically by finding the nearest marker positions.

    Thanks,
    PHeimlich
     
  27. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
  28. Milvust

    Milvust

    Joined:
    Jan 25, 2020
    Posts:
    7
    Hi Raoul

    I have a problem with a broken road texture, when I build a project. different in the scene

    I use Unity 2019.2.17f1
     
  29. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    Hi Milvust,

    This sounds more material / texture related. Does this involve provided materials / textures in the package? What exactly does this look like? Or does this happen in a final build outside the Unity editor and does this look as if the texture is stretched?

    Thanks,
    Raoul
     
  30. PHeimlich

    PHeimlich

    Joined:
    Oct 15, 2018
    Posts:
    11
    Hi raoul,

    when I connect to roads via mouse click, then the GameObjects (Roads) are still available. But when I connect the roads via API (with the ConnectRoads-Method from ERRoadNetwork), then there is just one GameObject left, but I want to keep them both. So I tried to Insert an IConnector first and then the ConnectRoads-Method, but that don't work. Can you help me pls?

    Tahnks,
    PHeimlich
     
  31. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    Hi PHeimlich,

    The post in my previous reply also includes a comment regarding ConnectRoads(). This can be used to merge two road objects of the same type into one road object. It seems that is not what you want.

    After adding an I Connector one of the other options in the specific link can be used to connect the other road. For example:

    ERRoad class
    public bool ConnectToStart(ERConnection connectionObject, int connectionIndex)

    public bool ConnectToEnd(ERConnection connectionObject, int connectionIndex)

    connectionObject is the connection returned when adding the I Connector. connectionIndex will be 1 since index 0 is used for the road already attached to the I Connector.

    Thanks,
    Raoul
     
  32. Freznosis

    Freznosis

    Joined:
    Jul 16, 2014
    Posts:
    298
    Are there any guidelines about best practices for custom prefab workflows? I've read the manual for custom prefabs but I have a few problems with it here and there.

    1) The custom prefab window slows down with more complex objects. My custom prefabs don't have an insane amount of verts for optimization purposes, but they do have slightly higher vert counts than the custom prefabs included in the ER3D demo project due to their overall size of being large highway pieces. The prefab window will either hang indefinitely when loading some of my custom models or it will be very slow when trying to select verts for the connections. It seems anything over 1000 verts starts to slow down a lot.
    2) When creating custom road types for the custom prefabs, some of the road types don't show up for other connections of the prefab even though it is the exact same geometry. This seems to happen randomly as sometimes I will start over creating the prefab and the road type will show up for all connections.
    3) I have never gotten the custom road types material to work directly from the custom prefab window. I've always had to goto the Road Network object and change the material settings there for it to save and work. Even though I change it to my custom material, the road type material always reverts back to the first road material (0), in my case it defaults to "blender tertiary old_dirt". Easy fix by just changing it on the Road Network but still something to look into since it's not working.

    Appreciate any help or insight on anything I'm missing/doing wrong, thanks!
     
  33. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    Hi Freznosis,

    1) The custom prefab system is intended to import crossing type of meshes into the system. It can indeed slow down for large objects. What type of objects are these? Perhaps there is an alternative way to do this.

    2) Road type display has a low filter, the only criteria is matching vertex count with the selected connection shape. The stats window in the top right shows the selected vertices count. Does that indeed always match? Would it be possible to sent prefabs for which this happens so we can test them?

    3) The dropdown shows all materials available in the Road materials folder, this is for quick material selection. The assigned material is the one in the material slot. Do you mean the material in the material slot always reverts back, or the material in the dropdown?

    I just tested this in all possible ways. By manually dropping a material in the material slot, by selecting a road material from the dropdown and by selecting a road type. This appears to work well, also when editing the prefab afterwards by dropping the generated prefab in the window. Also, for the last test, after dropping this generated prefab in the window the initially assigned materials do appear in the Material slots for all connections. Do I have to do something specific to reproduce this?

    Just like with dynamic built-in crossings, it is recommended to assign road types to custom prefab connections. That way it is not necessary to assign the road material, the material assigned to the road type will be used.

    Thanks,
    Raoul
     
    Last edited: Feb 1, 2020
  34. Freznosis

    Freznosis

    Joined:
    Jul 16, 2014
    Posts:
    298
    Hi!

    Thank you for the swift investigation.

    1) I'm trying to replicate the unique and complex structures that are the Japanese expressway (highways). They have lots of unique elements, interchanges, split intersections, etc that would be too difficult to replicate with side objects and dynamic prefabs. I've attached some crudely edited images below of what I'm trying to achieve with the custom prefab system. The red sections are custom prefabs and the blue sections are the dynamic easy road paths pulled from the prefabs. I got the idea from the older packages that included the sample highway entrance and exits. The prefab system seems to be fully capable of this, but the only thing slowing me down is the speed at which the custom prefab editor runs at with more detailed objects. I've tried disabling some of the detail objects that are attached to the prefab so that less verts are drawn, but they are still forced back on in the editor window. Is there a different way to go about this?

    2) The connections are carbon copy's of eachother so I am sure they match, but I will have to double check when I am back to working on the expressway.

    3) Yes, when I create a new road type and set it's material, after exiting the prefab window it isn't set or is reset. So I have to goto the road types window and assign the material again.

    Thanks again!
     

    Attached Files:

  35. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    Hi Freznosis,

    Thank you for the further in formation.

    1) Are the guard rails, barriers and other non road related elements part of the mesh? In that case, one way to reduce vertex count is have all these non road related elements that are not part of connections as a separate mesh and add this mesh to the final prefab created by EasyRoads3D in /Assets/EasyRoads3D/Resourtces/custom prefabs/

    2) I will await for further feedback, if the vertex count is indeed the same it would be very helpful if we can test this with one of the prefabs.

    3) In my test all this works well, or is this actually related to 2) ? Or does this happen with the original source mesh and do all connections have to be reset? In that case please drag the generated prefab in the window, not the original prefab. Otherwise does this happen with all your custom prefabs, and also with the provided custom prefabs in the demo package?

    Thanks,
    Raoul
     
    Freznosis likes this.
  36. Milvust

    Milvust

    Joined:
    Jan 25, 2020
    Posts:
    7
    I have broken texture with texture in the package
     

    Attached Files:

  37. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    Hi Milvust,

    It is not clearly visible, but given the image taken from mobile it appears this happens in a final build.

    This is probably not related to textures in the package. Is this a long road and does this start further away along the track? Then it is most likely related to UV floating point inaccuracies. There are two solutions.

    1. Insert I connectors at intervals at a distance just before where this start to happen. Inserting I Connectors will split the road in separate objects preserving the shape. By using separate objects, the UVs start back at 0. This option is available further below in the marker section in the Inspector.

    2. The reason why this happens in the final build and not in the Unity editor is most likely related to the project settings, specifically: Project Settings > Player > Other Settings > Optimization > Vertex Compression > Tex Coord 0

    Switching this off should also fix the problem. Does that help?

    As mentioned above there are already ways to deal with this, but a built-in solution is being worked on. A new update is ready and will be available next week. This optimization will probably be part of the update that will follow later in February.

    Thanks,
    Raoul
     
  38. Milvust

    Milvust

    Joined:
    Jan 25, 2020
    Posts:
    7
    Raoul how to fix it
     

    Attached Files:

  39. Milvust

    Milvust

    Joined:
    Jan 25, 2020
    Posts:
    7
    I use Unity 2019.2.171f with LWRP 6.91

    How to Fix it
     

    Attached Files:

  40. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    The "Raise" level in the Inspector is 0. This means that the road is exactly at the terrain height. This results in Z-fighting, what is visible in the image, certainly when no offset is used on the shader. Which shader is used on the road?

    Can you try a Raise value of 0.02 or so?

    Thanks,
    Raoul
     
  41. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,200
    I polished my Easy Roads module a bit so in case anyone wants to populate multi-tile terrains with random vegetation and roads quickly, here you go :)



    The Easy Roads part starts at 04:54. Full credits to Raoul and Lennart, without their awesome assets this wouldn't be possible in Unity. And of course NatureManufacture for the vegetation and the excellent Easy Roads HD-AddOn.

    In addition to creating tracks, you can also automatically place a gameobject, i. e. the car. While toying around with it, I figured some more options might be interesting, like hitting a forward and backward button which moves the car from one marker to the other. It's all only to get everyone quickly started with a base to fine-tune later.
     
    Last edited: Feb 5, 2020
  42. dsilverthorn

    dsilverthorn

    Joined:
    May 14, 2017
    Posts:
    835
    WOW
    Amazingly simple and beautiful. Thanks for letting us use it!!! I can't wait to start putting all the pieces together.

    Question: How do you get the dirt/tire marks to show up on the terrain (in the grass areas)? The effect is beautiful.
     
  43. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,200
    Thanks :) The tire marks is an effect of Edy's Vehicle Physics. You will also notice the smoke/dust. It's also part of that asset. However, at night e. g. those particles are bright. You can solve that problem with Lux Lit Particles. Just mentioning it because I did a lot of toying around and solution finding :D All works quite well with Easy Roads.
     
    dsilverthorn likes this.
  44. dsilverthorn

    dsilverthorn

    Joined:
    May 14, 2017
    Posts:
    835
    Very cool!
    I've looked at Edy's but only looked. Very nice though. Will have to look a little closer now. ;)
    Thanks for the tips!
     
    Last edited: Feb 5, 2020
  45. dsilverthorn

    dsilverthorn

    Joined:
    May 14, 2017
    Posts:
    835
    Edy's and Lux lit particles are now on my wish list! Thanks @Rowlan !
     
    Rowlan likes this.
  46. HeloiseL

    HeloiseL

    Joined:
    Apr 25, 2019
    Posts:
    4
    Hello!
    I'm trying out the free version of Easy Roads, it seems like a great tool. However, I am facing an issue:
    the "build terrain" option won't work on my pre exisiting unity terrains. It's working on a newly built unity terrain I made in the same scene though. I've tried to spot the differences between this new terrain and the old ones in the scene, however I couldn't find any difference apart from the fact that the new terrain does not have textures or trees on it and the old ones do. Is there some settings of the unity terrain that are not supported by easy roads?
    here is a screenshot of my terrain settings attached.
    Thank you in advance for your help!
     

    Attached Files:

  47. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    Hello HeloiseL,

    Build Terrain(s) including vegetation removal should work in the free version with the limitation that multiple terrain tiles are not supported in the free version. But that seems not the case because adding roads in Edit Mode will already fail.

    Just as a test, have you tried new terrains with textures and vegetation?

    Does the Build process complete or is it interrupted and do you see error messages?

    What is the history of the older terrains? Were they upgraded across different Unity version updates? Since you mention that there is no issue with new terrains, what may work is removing the terrain from the scene, then drop it back in the scene from the project folder.

    Thanks,
    Raoul
     
  48. HeloiseL

    HeloiseL

    Joined:
    Apr 25, 2019
    Posts:
    4
    Hi Raoul, thanks for your answer!
    My terrain has tiles ("neighbour terrains"), I guess that's why the "build terrain" option is not working then. Does the paid version support terrains with multiple neighbour terrains?
     
  49. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    Yes, the Pro version does support multiple terrain tiles. All terrain tiles can be updated at once. Or only one terrain tile can be updated to speed up the workflow when working on a specific area and switching back and forth between Edit Mode and Build Mode to see the final results.

    Just for your own reassurance, have you tried the free version with just one terrain tile in the seen?

    Thanks,
    Raoul
     
  50. HeloiseL

    HeloiseL

    Joined:
    Apr 25, 2019
    Posts:
    4
    Yes the "build terrain" option worked with only one terrain, with or without vegetation on it.
    Thanks for your answer, I was also wondering, is there any way to try out intersections between roads in the free version?
     
    raoul likes this.