Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

EasyRoads3D v3 - the upcoming new road system

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

  1. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,266
    Hi antoripa,

    The update will be available next week.

    Do you already have the road network object in your scene? In that case you could create your road type with the correct material in General Settings > Road Types, and in your code use:

    ERRoadType roadType = roadNetwork.GetRoadTypeByName(string name);

    The runtime code remains the same including:

    ERRoadNetwork roadNetwork = new ERRoadNetwork();

    Thanks,
    Raoul
     
    antoripa likes this.
  2. Richard-_K

    Richard-_K

    Joined:
    Sep 27, 2015
    Posts:
    17
    Thanks Antoripa and Raoul you were correct the serialization was not set to mixed mode. I'll have a go at fixing it using the above steps.

    Richard.
     
    raoul and antoripa like this.
  3. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    road.SetMaterial(mat) works fine .... now I can create my default serialized object to use in runtime ...thanks for your support

    Antonio
     
    raoul likes this.
  4. starvanger

    starvanger

    Joined:
    Oct 4, 2010
    Posts:
    14
    normals.jpg Custom Crossing issues

    hi,

    I bought easyroads a few years ago through the website. I decided to use easyraods for a mobile project now and have some issues.

    First issue is my custom corner crossing.
    I am using unity 5.3.3 and current ER beta.

    To have 90 degrees corner like that one I am attaching, I made a custom crossing. Finally worked out every aspect to build it, but, when I connect the crossing, it gets normal issues. I tried so much, like smoothing groups, resorting of vertices etc. but finally no good result. Do you have any ideas on how I could fix this?

    Second issue using ER without terrain.
    I tried to use ER without terrain but just with a plane as a terrain. That caused to throw ER to multiple "object not found" issues, also complaining about there is no terrain. So, possible without unity terrain?

    Suggestion: Atlasing for easyroads.
    As easyroads very often is just tiling in one direction, it could be possible to add multiple road parts with tiling in just one direction into one texture, so that would reduce drawcalls a lot for mobile.

    Well, maybe not a bug,

    but what I found, when the standard resolution for a street is high and I build a road, it is not shown. maybe a default value which creates a road also if it is below the resolution value would help.



    All in all easyroads is a good package, I wish the progress had been a lot faster over the last years. This is the first production where I actually thing I could really use it, instead of using external tools to create road networks, aside from simple racetracks.
     
    Last edited: Nov 28, 2016
  5. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,266
    Hi Starvanger,

    Normals between connection prefabs and roads are averaged for a smooth connection this is for both dynamic and custom prefabs as in your screenshot. It is hard to tell from a screenshot what goes wrong and there are no known issues related to this. Have you created more custom prefabs? Does it happen on all of them? Would it be possible to send model to me so I can test it?

    EasyRoads3D is indeed optimized to work with the Unity terrain object but it should work without a unity terrain object as well although you will loose the terrain deformation feature. I just tested this, I do not get the "object not found" messages. When exactly is this error thrown?

    Is this about different road types / materials? In that case, that will be possible once you can manually tweak road shape / UV settings in General Settings > Scene Settings. Since you are already looking into custom connection prefabs, that system includes an UV Editor window which can be used to fine tune the road UVs. It sounds like this could be used to setup the UVs for your different road types so they all use the same material. Or did you mean something else?

    Please be specific, what are the exact bugs you are having and how can I reproduce them? Bugs that are reported are taken care of with the highest priority.

    Thank you, I wish production would have gone faster as well :). Please consider the feature list. I spend 2 or 3 hours a day on this, it has taken at least 1500 / 2000 hours by now. It could have been released faster but it wouldn’t have the current feature set.

    Thanks,
    Raoul
     
  6. starvanger

    starvanger

    Joined:
    Oct 4, 2010
    Posts:
    14
    hey raoul,

    thx for the hypersonic fast answer, will write a review in the assetstore on that immediatly. Ah, of course, I bought it on your site and cant review it in the assetstore. Well Highly recommended, folks.

    I understand well how hard it is to build such a piece of software and really no complaining at all.

    Where to send that crossing example? I have build two crossings so far, one seems to be redundant as, the t crossing works as an arrow crossing I have seen meanwhile.

    But same with both items I tried. I also tried a lot of variations of my crossing ... ( all in 3dsmax btw. )
    Like I tried to detach faces by id in the mesh, merging all vertices, making small polys to reduce the area of smoothing ...

    Ok, please tell me where to send the crossing example and I will answer to your helpfull answer in depth later.
     
    Last edited: Nov 28, 2016
  7. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,266
    Just sent a PM :)

    Thanks,
    Raoul
     
  8. starvanger

    starvanger

    Joined:
    Oct 4, 2010
    Posts:
    14
    Ok, as I edited in my post above. It is not a bug, but looks like a bug. If you build a road with the add new road button and that road length is below the road resolution you set up for that road type, nothing but two markers are shown. It took me a while to find out what my mistake is, but it would be good, that if I build a road which is shorter than resolution to build that one gets either a warning or a road with one segment build which is below minimum resolution.
     
  9. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,266
    I had a quick look. In general adding markers seems to work well when the distance between markers is smaller then the road resolution value (which seems unlikely to happen), the road is generated. The only glitch I notice is on the last marker segment and only on reasonable angles relative to the previous marker segment. Is that what you meant? I will check what is causing this, but this only happens on extremely low poly roads.

    Thanks,
    Raoul
     
  10. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,266
    EasyRoads3D v3 beta 8.3 is now available for download on our website

    Please contact use if you do not yet have the download link. The asset store update will be submitted today aswell.

    As mentioned last week, this update includes controllable smoothness / bumpiness for a more realistic look and driving experience on specific road types like in the screenshot below. Default values for road types can be set in General Settings > Road Types, and can optionally be adjusted per road individually.



    The first road in the screenshot is a perfect spline based road. The second has slight bumpiness added.This can be adjusted per marker for segments with excessive bumpiness like in the bottom road segment example. This will be further extended so you can manually fine tune the bumpiness if you want to.

    Furthermore X Position and Y position randomness has been added for side objects with similar controls as already available for rotation randomness.

    By request public ERRoad ConnectRoads(ERRoad road1, ERRoad road2) and public ERRoad ConnectRoads(ERRoad road1, int markerIndex1, ERRoad road2, int markerIndex2) have been added to the ERRoadNetwork class of the scripting API. The first connects the passed roads (of the same road type) by the markers nearest to each other. The second will connect the road at the passed marker indexes.

    Apart from completing the final demo project, next is tidy up the Inspector, customize the look to your preferences and the option to group side objects in categories which will be useful if you have many side object types in your project.

    As always please backup your project first before importing the update :)

    Thanks,
    Raoul
     
    Last edited: Nov 29, 2016
    radimoto, antoripa, John-G and 3 others like this.
  11. 600

    600

    Joined:
    Dec 18, 2013
    Posts:
    340
    Beautiful !

    Perfect timing, planning to rebuild the map for my game :)
     
    raoul likes this.
  12. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    Excellent features ... just what I was waiting for ...
     
    raoul likes this.
  13. AlbertoMastretta

    AlbertoMastretta

    Joined:
    Jan 1, 2015
    Posts:
    69
    Hey Raoul.

    I hope you are well.

    I've been having some bugs that I'd like to report, and hopefully find some solutions for the short term.

    The first and biggest one is that I can't access the side object manager. If I click on manage project side objects, regardless of the scene I'm on, it gives me this error:

    NullReferenceException: Object reference not set to an instance of an object
    ERSideObjectImporter.SetSideObjects (EasyRoads3Dv3.ERModularBase bscr, System.String path)
    EasyRoads3Dv3Editor.ERSideObjectsManager.OnGUI (EasyRoads3Dv3.ERModularBase scr, EasyRoads3Dv3Editor.OOQODQOOQO eScr)
    EasyRoads3Dv3Editor.OOQODQOOQO.OnInspectorGUI ()
    UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editor, Int32 editorIndex, Boolean rebuildOptimizedGUIBlock, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect) (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1235)
    UnityEditor.DockArea:OnGUI()

    I can no longer work since I need to create new side objects and delete some others for my current task. It would be great if you could show me a way to fix this, since I believe it is something that got messed up just recently on my project, and not a problem on the asset itself.

    Another bug I encountered is on shape objects. Sometimes my start or end objects will disappear, until I restart unity. It mostly happens after I build the road network, but it is not consistent. Sometimes it happens when I turn on and off other side objects. The objects are placed because I can see them in the hierarchy, but If i try and find the original mesh, it doesn't show up in the inspector's preview.

    This side object problem happens as well as the previous one I mentioned, which is that the end side object doesn't get placed correctly, and sometimes it places two objects and not just one.

    Thanks for your support!

    Cheers.
     
  14. AlbertoMastretta

    AlbertoMastretta

    Joined:
    Jan 1, 2015
    Posts:
    69
    Awesome! I'm so glad we're getting a feature to adjust bumpiness, this will help my off road tracks a lot!

    Thanks for the update! I'll check it out during the day.
     
    raoul likes this.
  15. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,266
    Hi Alberto,

    I am very well, thank you!

    Do you remember when that started to happen? After which process? Could you send me a PM with your email so we can debug this?

    You mention that it doesn't show up in the Inspector. Do you mean after selecting the source mesh used for the Start / End segments in the project panel? Can you try a right click reimport in that case? We have seen something similar but it happens only occasionally so it is a bit tricky to debug if this is EasyRoads3D related anyway (Instantiate() is used, also for the mesh asset). Or does a reimport not fix this?

    Can you recreate this with specific settings? Is this also Shape type side object related? In what way is it not placed correctly? Position, rotation?

    Thanks,
    Raoul
     
  16. tasadar

    tasadar

    Joined:
    Nov 23, 2010
    Posts:
    256
    hi, is there any api documentation?
    i need to know if you can query the underlying spline information.
    thank you.
     
  17. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,266
    Hi Tasadar,

    Yes there is, http://unityterraintools.com/EasyRoads3D/v3/html/scriptingAPI.html

    For the center of the road:

    ERRoad.GetSplinePointsCenter() which returns an array of Vector3

    Thanks,
    Raoul
     
  18. Richard-_K

    Richard-_K

    Joined:
    Sep 27, 2015
    Posts:
    17
    Hi All,
    I am have quite a lot of trouble getting a custom crossing prefab to work. In particular when in the Custom Prefab editor I can't elect any vertices in my model in order to define connections.

    If I open on of the demo meshes (e.g. "trainConcrete") in the Custom Prefab editor then I can select (using shift drag) the connection vertices, but with my own mesh - no luck (I have tried several export formats fbx, obj etc). I am guessing either there is a problem with the mesh (it is created in an external app) or perhaps with how I have set up the custom crossing.

    Here is a prototype for the object for which I basically want Easyroads3d to create the mesh for the "cable" that runs between the supports (in the same way as the rail track is created between the concrete sleepers):

    Mesh: https://dl.dropboxusercontent.com/u/570611/Unity/ForumImages/trackSupports_01fbx.fbx

    Thanks,
    Richard.

    PS Easyroads3d v3b8, Unity 5.4f1 (meshes created in Modo)

     
  19. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,266
    Hi Richard-_K,

    I didn't look at your model yet, but you can only create connections from vertices highlighted with a black dot.like visible on the shapes inside the two spheres in the middle.

    It seems the outer part of your mesh is something like a box type of shape, is that right? That will not work, it should be "open" on the connetion side with the road. Have a look at the more complex highway overpass source meshes in the beta package. So simply removing the triangles from your source mesh that will not be visible anyway (after connecting the road/track) should fix this issue.

    Thanks,
    Raoul
     
    Last edited: Dec 1, 2016
    Richard-_K likes this.
  20. Richard-_K

    Richard-_K

    Joined:
    Sep 27, 2015
    Posts:
    17
    Works perfectly!

    many thanks,
    Richard.


    Many thanks.
     
    raoul likes this.
  21. JOKaija

    JOKaija

    Joined:
    Feb 8, 2015
    Posts:
    161
    I LOVE Your work! Every time, when I need a some new routines to be published,
    you will do that!

    Now my terrain splitter works great! I had to time to expand it for 6 and 8 players and
    I really needed that fliptexture. No more problems with invisible roads while creating
    game arenas for players :)

    I noticed, you added clone function too, but I clone my terrain like this: (Example
    about 4 player terrain)

    Code (CSharp):
    1.  
    2.         if (rnet == null)
    3.         {
    4.             rnet = new ERRoadNetwork();
    5.             rnet.roadNetwork.enableBackWithoutRestore = true;
    6.         }
    7.         GameObject rr = GameObject.Find("RuntimeRoads");
    8.         ERRoad[] allobjects_a;
    9.         List<ERRoad> allobjects_b = new List<ERRoad>();
    10.         FatherObjects.Clear();
    11.         // First get all roads....
    12.  
    13.         allobjects_a = rnet.GetRoads();
    14.  
    15.         foreach(ERRoad er in allobjects_a)
    16.         {
    17.             if (er.gameObject.name.Contains("LR-") ||
    18.                 er.gameObject.name.Contains("UR-") ||
    19.                 er.gameObject.name.Contains("UL-"))
    20.             {
    21.                 er.Destroy(); // Cloned, so, delete before creating a new one
    22.             }
    23.             else
    24.             {
    25.                 allobjects_b.Add(er); // If not cloned, add for copylist
    26.             }
    27.         }
    28. ---------- cliplclip --------
    29.         if (togle4)
    30.         {
    31.             if (allobjects_b.Count > 0)
    32.             {
    33.                 foreach (ERRoad go in allobjects_b)
    34.                 {
    35.                     if (go != null)
    36.                     {
    37.                         Vector3[] rpoints = go.GetMarkerPositions();
    38.                         List<Vector3> lrpoints = new List<Vector3>();
    39.                         List<Vector3> urpoints = new List<Vector3>();
    40.                         List<Vector3> ulpoints = new List<Vector3>();
    41.                         foreach (Vector3 rp in rpoints)
    42.                         {
    43.                             Debug.Log("Roadp: " + rp);
    44.                             // Transfer point positions to lower right
    45.                             Vector3 temp = rp;
    46.                             temp.z = rp.x;
    47.                             temp.x = rp.z * -1;
    48.                             lrpoints.Add(temp);
    49.                             // Transfer point positions to upper right
    50.                             temp = rp;
    51.                             temp.z = rp.z * -1;
    52.                             temp.x = rp.x * -1;
    53.                             urpoints.Add(temp);
    54.                             // Transfer point positions to upper left
    55.                             temp = rp;
    56.                             temp.z = rp.x * -1;
    57.                             temp.x = rp.z;
    58.                             ulpoints.Add(temp);
    59.                         }
    60.                         ERRoadType roadType = new ERRoadType();
    61.                         roadType.tag = "ROAD";
    62.                         roadType.layer = 11;
    63.                         roadType.roadWidth = go.roadScript.roadWidth;
    64.                         roadType.sidewalks = false;
    65.                         roadType.roadMaterial = go.roadScript.roadMaterial;
    66.  
    67.                         ERRoad newlr = rnet.CreateRoad("LR-" + go.gameObject.name, roadType, lrpoints.ToArray());
    68.                         newlr.SetResolution(1);
    69.                         newlr.SnapToTerrain(true, 0.01f);
    70.                         newlr.FlipTexture();
    71.  
    72.                         ERRoad newur = rnet.CreateRoad("UR-" + go.gameObject.name, roadType, urpoints.ToArray());
    73.                         newur.SetResolution(1);
    74.                         newur.SnapToTerrain(true, 0.01f);
    75.                         newur.FlipTexture();
    76.  
    77.                         ERRoad newul = rnet.CreateRoad("UL-" + go.gameObject.name, roadType, ulpoints.ToArray());
    78.                         newul.SetResolution(1);
    79.                         newul.SnapToTerrain(true, 0.01f);
    80.                         newul.FlipTexture();
    81.                     }
    82.                 }
    83.             }
    84.         }
    85.  
    86. ---------- cliplclip --------
    87.  
    88.  
    As you see, I copy each terrain point to a new position for new clones.
     
    raoul likes this.
  22. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,266
    Hi Jari,

    Thank you!

    Yes, as you know the API is not fully implemented yet regarding the Scene View and Inspector options but requests that are easy to add will be implemented. But v3 should really be released and I want to focus on that as much as possible, so I hope you guys are covered now. The main thing yet to add to the API, more complicated, is full control over side objects like you have in the editor, that is planned for v3.x. But if there are other smaller things you need, just let me know.

    Raoul
     
  23. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,266
    Just for others possibly experiencing the same issues, the "manage project side objects" button issue in the Side Object Manger is actually fixed in the 8.3 update released earlier this week.

    And occasionally disappearing Start / End objects after updates can indeed most likely be fixed by a Reimport in the project panel for that object.

    Raoul
     
  24. Marco-Sperling

    Marco-Sperling

    Joined:
    Mar 5, 2012
    Posts:
    597
    Hi raoul,
    while working on our terrains we noticed some strange behaviour that occurs when building all terrains at once.
    Some roads or segments tend to create high ridges or deep cracks next to them. To us it looks like EasyRoads3D is keeping track (internally) of a terrain that differs from the one we have created (actually imported from worldmachine). As if it is clinging to a terrain iteration from days before our current version.
    I tried the "backup terrain" option before running the build terrain option, yet the issue persists.
    I tried the "backup terrain" option followed by the "restore terrain" option, yet the issue persists.

    It gets even stranger:
    On some roads I can work around the issue by toggling the "deform terrain" checkbox off and on again. But this only works when specifically selecting the terrain underneath that road in the build settings. One terrain by one. Not what I want.
    When I try to build all terrains at once the issue reappears. Cracks and peaks.

    Any idea what might go wrong on my side?
     

    Attached Files:

  25. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,266
    Hi Marco,

    Backup / Restore terrain is unrelated to this.

    I just did a quick test in a multi terrain test scene updating all terrains at once. The results are as expected so I need a little bit more info.

    1. Did this work before in this specific multi Terrain setup? If so, has anything related to the terrain objects changed meanwhile?
    2. Are all terrain game objects positioned at the same height? I don't think this matters but something to perhaps verify if this is not the case.
    3. Do all terrain objects nicely connect or do you have overlapping terrains?

    Toggling On/Off "Terrain Deformation" updates the relevant data. Can you switch off "Hide White Surfaces" in General Settings > Scene Settings and look at the problematic areas, do these surfaces nicely snap to the terrain on the outer side? If not, can you try Scene Settings > Update Road Network. Can you see a difference?

    Thanks,
    Raoul
     
  26. Marco-Sperling

    Marco-Sperling

    Joined:
    Mar 5, 2012
    Posts:
    597
    Thx very much, this seems to have fixed 99% of the cracks. :D The rest I can smooth out.***

    1. Regarding this specific scene: I cannot remember the details. But I think the issue has been bothering us in the past, too. We just haven't had our terrain developed as far as we have it now - so the issue didn't matter back then.

    2. All terrains are grouped under the same parent object which sits 32.5 units below world space origin. Each terrain itself is on Y = 0.
    Important: the terrain-parent lives in its own scene that differs from the one the RoadNetwork is living in.
    Also I'd like to stress that the issue creates both peaks and cracks. So I'm not sure if it is related to the Y-offset which should only affect one direction, if all of the terrains shared the same negative offset - shouldn't it? Anyway...

    3. All nicely connected, no overlaps, no seams. We were extra careful.

    Regarding the white surfaces:
    These road skirts are almost always activated in our scene. For the most parts I didn't notice anything weird with their terrain snapping. In some places though where I got these cracks the skirts dropped way below terrain height. I cannot say the same about the road segments that create peaks. Everything looks nice there.

    But since the peaks appear much less frequently I can live with them.
    I'll monitor the issue and report back when I have more findings for you.

    This was from version 7.7.2. I will upgrade our project soon to 8.3 to benefit from your latest features (grids, yay!) and bugfixes.


    ***
    How about a multi terrain editing morph brush? Store the terrain at its state before building. Build the terrain with ER3D. Use morph brush in spaces close to the road to bring back the old state of the terrain.
     
  27. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,266
    Glad to hear that worked out well :)

    Because you mentioned "toggling the deform terrain" fixes it, I thought that "Refresh Road network" might do the trick. But all it does is refresh the roads and rebuild the deformation data, so I wonder what went wrong in your scene? You could keep an eye on these white surfaces, do they always nicely snap to the terrain. The only reason why that could not be the case is overlapping terrains and the wrong terrain being used to get the height.

    Since you mentioned that the terrains are grouped as childs under an object with different Y. Could it be that the 32.5 was previously diferent. That would explain the terrain results and does require a Road Network Refresh.

    Do you mean something like the "Preserve Terrain Contours Slider" in Build Mode? To clearly see the effect it requires considerably increased Left / Right Surrounding values which are by default set to the minimum required value based on your terrains heightmapscale. The terrain will gradually morph from the original height to the required height to match the road shape. You can't really achieve this effect with the default value, not enough terrain points available...

    To clearly see the effect there must be an height difference between the road and outer snapping point of the white surfaces and the underlaying terrain area must have clear contours.

    Thanks,
    Raoul
     
    Last edited: Dec 1, 2016
  28. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    If I've 4 terrains will work? I can make a road that goes trough 4 terrains?
     
  29. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,266
    Hi TooManySugar :)

    Yes, that will work regarding the terrains. Is it a single road, how long? Usually you want to split it using crossings etc.

    Thanks,
    Raoul
     
  30. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    Awesome, just evaluating the feasibility of the tool Nothing massively long , the 4 terrains make 1200x1200m

    edit the V3 looks very interesting!
     
  31. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,266
    Ok, because with v3 you will usually want to use crossings which will break up roads in pieces. One single road could get too long if it is massive although there are ways around that by splitting it.

    Thanks,
    Raoul
     
  32. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    I donwloaded t he free for testing. The road goes trough 3 or at least 2 terrains but only the terrain where road ends is adapted. mmm any clues? unity 4.7.2

    edit. ok I see in settings tha there is an "Active Terrain " drop down that is locked. In the full version is there an option so that it affects all terrains? Or may be I can modify each terrain at a time?
     
    Last edited: Dec 1, 2016
  33. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,266
    The free version is still v2 and does not support multiple terrains.

    The full version includes the v3 beta package (this thread) and does support multiple terrains.

    But you mention Unity 4.7.2. The current v3 beta is Unity 5 only. I can send an older version that supports Unity 4 but no updates for Unity 4 will follow. The full version 2 on the asset store for Unity 4 also supports multiple terrains but indeed you have to select the active terrain and one by one build all the terrains whereas in v3 all terrains can be updated at once.

    Thanks,
    Raoul
     
  34. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    I see, tx. will think what to do.
     
  35. Richard-_K

    Richard-_K

    Joined:
    Sep 27, 2015
    Posts:
    17
    Hi All,
    I assume EasyRoad3D v3 works fine with Unity 5.5?

    thanks,
    Richard.
     
  36. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,266
    Ok, support for Unity 4 stopped a while ago, it seemed save to do that since Unity 5 is already available since early 2015.

    Thanks,
    Raoul
     
  37. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,266
    Hi Richard,

    I am downloading the latest 30 Nov version at the moment. Throughout the 5.5 beta period it has been tested. The only issue not covered yet was related to SetSelectedWireframeHidden() no longer being supported in 5.5. Because it was still in the 5.5 docs and this situation was brought up in various other posts as well I left it for the time being. I will check, but since no comments have been made related to that I assume it is fixed meanwhile. Otherwise I will update the new 8.3 release which is currently pending approval.

    Are you experiencing any issues?

    Thanks,
    Raoul

    [EDIT] No issues encountered in 5.5.0 f3, please let me know if you do run into something not working as expected
     
    Last edited: Dec 2, 2016
  38. tasadar

    tasadar

    Joined:
    Nov 23, 2010
    Posts:
    256
    hi, just started testing the latest beta and i came across a problem that building terrains does not remove the tress from the scene. i have multiple terrains(4) and all terrains option is selected.
     
  39. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,266
    Hi tasadar,

    Yesterday I did a multi terrain test, trees within the defined range to the roads were correctly removed.

    Do you mean this worked well before and now stopped working in beta 8.3?

    Indeed you have "Remove Trees" in the Build settings toggled on? Just double checking...

    Are you perhaps using a terrain asset potentially locking this? Some of the tools have this option, also for the terrain heightmap, usually this can be switched off.

    Are the terrain heightmaps updating correctly? Or are you using this on a flat terrains?

    Thanks,
    Raoul
     
  40. tasadar

    tasadar

    Joined:
    Nov 23, 2010
    Posts:
    256
    i just tested with 8.3, didnt try with the older ones.
    remove trees is checked.
    actually the terrains are empty(just trees) and flat.
    i will try with more variations...
     
  41. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,266
    If the terrains are flat then it could be that "Terrain Deformation" in the Inspector for the selected road is toggled off. "Terrain Deformation" is an option because you do not want that process for road objects like highway overpasses that do not really interact with the terrain. And removing terrain trees is probably also not what you want in that case.

    Because your terrain is flat you do not really notice that this checkbox is off, assuming that your roads are flat as well.

    You can set the default state for "Terrain Deformation" for each road type in General Settings > Road Types. Does this happen for one of the provided road types? I belief it is checked for all of them in the latest betas.

    Or is "Terrain Deformation" actually on?

    Thanks,
    Raoul
     
  42. tasadar

    tasadar

    Joined:
    Nov 23, 2010
    Posts:
    256
    hi, i might have disabled it myself not sure but after checking it on, i had to move one the markers a little towards +y to make it work. another problem is that after doing this, some parts of the road became invisible due to z fights.

    note: i do use the provided road types.
     
  43. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,266
    Ok, glad to hear that worked.

    Did you only move one marker up? In that case, the nature of the spline curve is that when marker A is slightly higher then marker B and C, the curve will go slightly below marker B and C on the BC segment. Just a little bit, but because your terrain is flat and I assume it is flattened at 0, it is not possible to adjust the terrain downwards that little bit. The terrain object does not support negative height values. These critical areas where road segments are very close or below the terrains 0 value, are highlighted with red dots. It is generally recommended to flatten terrains first at 50 or so when you start with a new terrain. This also allows for example carving riverbeds in the terrain etc.

    You can put that specific marker back at the previous height, hit the S key which selects all markers and raise them all just a tiny bit in the Inspector, 0.01 or 0.02 should work on a flat terrain. Or you can use the "Raise" option after switching to Build mode.

    Thanks,
    Raoul
     
  44. tasadar

    tasadar

    Joined:
    Nov 23, 2010
    Posts:
    256
    you are right, my terrains are all at zero ground.
    thank you, i got it all sorted now.
     
    hopeful and raoul like this.
  45. tasadar

    tasadar

    Joined:
    Nov 23, 2010
    Posts:
    256
    q1.jpg

    hi raoul, i am trying to make intersections, i built 2 parallel roads + 1 that is perpendicular to them.
    i split the roads at the intersections and insert a default X crossing.
    the first one worked out fine but the second crossing will not allow me to connect the selected marker as shown in the image. the other markers can be attached but this one shows red, any idea why?
     
  46. lezan_

    lezan_

    Joined:
    Nov 27, 2016
    Posts:
    50
    Hello raoul,
    as you suggest, I switched to EasyRoads3D v3.
    For now I have some questions:
    • Is it possible to change river dimensions? Because in v3 I can create it only as Side Object (as you know,
      obviously) and I cannot find any solutions to change dimensions (width, in particular).
    • I am trying to create a river on already done river bed. Can EasyRoads3D v3 achieve that?
    • Is it possible to do not deform terrain?
    • Is it possible to to just create a mesh with EasyRoads3D and save it? I see the options in Edit mode, but after I leave it, mesh is empty.
    • If I want use Aquas with EasyRoads3D I need to change only Target Object on River surface?

    Thanks and sorry for all these questions.
     
  47. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,266
    Hi Tasadar,

    Currently roads can only connect when the crossing connection geomtery structure matches with the road. The selected road is a road only while the crossing has sidewalks. This will not work. When you select the crossing you will see at each side of the road 3 green handles. The middle handle completely removes the sidewalk, the two outer handles will close the sidewalk on that side. After that the road should connect well.

    So for now it requires a manual action, this will be optimized further so it will probably auto close/activate the sidewalks of the respective connection.

    Thanks,
    Raoul
     
  48. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,266
    Hi lezan_,

    Have a look at the setup of the river side objects, both the river surface and river bed. These are Shape type of side objects. What you see is just an example. If you open the Shape Editor window you can adjust it to your liking. The river surface is just two nodes, but you can add nodes and also change the width. The setup of the River surface is more interesting. You can set nodes to snap to the terrain. That way you can nicely control the terrain deformation.

    After adjusting the default shapes you can tweak the shape per marker per node. The B Key toggles on/off node handles, you can freely move the nodes sideways and /up/downwards. Doing this on one of the inner nodes while holding Shift will move all nodes outside of the selected nodes in the same direction. One thing to add here is being able to set an outer offset just like you can do for procedural side objects (the simple bridge example). This way the river bed shape can be adjust automatically matching the river surface changes. This needs to be done seperately at the moment.

    Additional you can create river "networks" using custom connection prefabs...


    The river object type in the dropdown can be adjusted in General Settings > Scene Settings. Deactivate the river surface object.

    There is a full road network export option in Build Mode. I will make a note to include individual road export options in Build Mode as well. For now you could use own of the available .obj exporters.

    That is how it works. I haven't tested Aquas myself. But if it uses a standard setup (one game object / MeshFilter) it should work fine. Let me know if that is not the case.

    No problem :), Please ask, new / more tutorials will follow, the final step for release.

    Thanks,
    Raoul
     
  49. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    Hi,
    I am trying to use the OSM features loading a file.
    But I am getting the below error . I am using the latest v3

    NullReferenceException: Object reference not set to an instance of an object
    EasyRoads3Dv3.ERModularRoad.OOCOOCDCDQ (Boolean ignorePrefabAlignment, Boolean forceAutoRotate)
    EasyRoads3Dv3Editor.ODODOQQCQC.Extract (System.String path)
    EasyRoads3Dv3Editor.OQDOOCQOCO.ODCOOODQCO (EasyRoads3Dv3.ERModularBase scr, EasyRoads3Dv3Editor.OCDOOOCDDD eScr)
    EasyRoads3Dv3Editor.OCDOOOCDDD.OnInspectorGUI ()
    UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editor, Int32 editorIndex, Boolean rebuildOptimizedGUIBlock, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect) (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1235)
    UnityEditor.DockArea:OnGUI()
     
  50. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,266
    Hello Antonio,

    That is related to a small bug in 8.3 related to road type changes, are you indeed using the website 8.3 update? You can try 8.2 if you want to check out road data import further.

    I will update the 8.3 version on our website and also the 8.3 submit for the asset store.

    Thanks,
    Raoul
     
    antoripa likes this.
unityunity