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
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    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,011
    Hi Miojon,

    You are not limited to high resolution geometry. For both roads as crossings objects you have full control over the resolution.

    For crossings you can also choose to use your own crossings, as low poly as you want, and use them within the system.

    So, altogether, you can optimize for mobile :)

    Thanks,
    Raoul
     
    Last edited: Mar 28, 2016
    Miojon likes this.
  2. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,011
    Hello saintlol63,

    This is related custom meshes you import. It is impossible for me to tell why you cannot see it without looking at it or having full details of the mesh you are trying to import. There are currently no known issues with the Custom prefab importer.

    Are you 100% certain the geometry is centered around (0,0, 0)? You could try the Z key, this should zoom to the bounds of the imported geometry.

    Have you tried the custom crossing/connection example models that come with the package, does that work well for you?

    Could you email me the model or the unity prefab so I can look at it?

    Thanks,
    Raoul
     
  3. Studio-Technology-Developpment

    Studio-Technology-Developpment

    Joined:
    Mar 26, 2016
    Posts:
    8
    not pb with import , i test with your crosswalk 1 or 2 and custom roundabout prefab (same problem) ,
    when i move and type F to focus object, it go to the center, the object is here, but the line of meshes is not draw (invisible), on the right box you can see number of vertex.
    "Are you 100% certain the geometry is centered around (0,0, 0)? " yes it's your prefab and i verify (it's original, no modification)
    Z yes is center..
    thanks
    saintlol
     
  4. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,011
    Hello saintlol,

    I just created a new project, imported beta 7.5 then I took the below steps:

    1. General Settings > Crossing Connection Prefabs > Open the Custom Prefab Editor
    2. Dropped /Assets/EasyRoads3D/Resources/custom prefabs/crosswalk 1 prefab on the stage. The crosswalk geometry is displayed in the center and the existing connection info is available.
    3. Clicked "New Crossing Object" and dropped the crosswalk 1 source mesh at /Assets/EasyRoads3D models/cross walk 1 on the stage. It is instantly displayed in the center.

    Additionally, there are no changes made to all this in beta 7.6 compared to beta 7.5

    What are the exact steps you are taking? Does the same happen in a new fresh project?

    The F key has no function in the Prefab Editor window.

    Thanks,
    Raoul
     
  5. Studio-Technology-Developpment

    Studio-Technology-Developpment

    Joined:
    Mar 26, 2016
    Posts:
    8
    Hello raoul
    the problem become from my computer, i reinstall it and now IT s work perfectly
    sorry for the mistake and thanks a lot for your help, but it's my fault ;)

    Saintlol
    Ticket closed
     
    raoul likes this.
  6. ShinfoK

    ShinfoK

    Joined:
    Feb 6, 2014
    Posts:
    283
    raoul, long time no see.

    Just curious, is EZ working with Map-ity with auto-generation of roads at all? Cheers
     
  7. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,011
    Hi ShinfoK,

    How are you?

    I think this is more Map-ity related. Do you have access to the Map-ity road data?

    With this info creating a road through code in v3 is as simple as:
    Additionally, you can import osm data directly in v3 and also link EasyRoads road types to OSM road types. But as you can see above in the code example, you can do that as well through the API and I assume Map-ity gives you access to osm road types as well.

    Thanks,
    Raoul
     
    Last edited: Mar 28, 2016
  8. Studio-Technology-Developpment

    Studio-Technology-Developpment

    Joined:
    Mar 26, 2016
    Posts:
    8
    hello raoul , good new (yes it's possible)
    i create somme road and intersection with sucess.

    thanks again
     
    raoul likes this.
  9. ShinfoK

    ShinfoK

    Joined:
    Feb 6, 2014
    Posts:
    283
    Hey raoul.

    Ooh neat, I didn't realise there was OSM data import :)

    Cheers, I'll give it a go
     
    raoul likes this.
  10. ShinfoK

    ShinfoK

    Joined:
    Feb 6, 2014
    Posts:
    283
    Hey raoul. Unfortunately that didn't give ideal results, I guess OSM doesn't provide information intersections?

    I'm going at it manually.

    Getting this error:

    Been a long time since I've played with EZR, I guess I'm missing something obvious here, just not seeing it.

    Video:
     
  11. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,011
    Hey ShinfoK,

    The current OSM implementation is that it will split roads where OSM roads share marker positions. This to make it easier to manually create intersections.

    Auto generating Intersections is partially implemented but indeed not yet functional. What I see in the screenshot, basic T, X crossings will probably work fine but consider all the different sort of situations, it can result in a mess. This part requires more thought.

    Regarding the error, I assume you use beta 7.6 from the asset store? http://forum.unity3d.com/threads/ea...g-new-road-system.229327/page-41#post-2569980 The update is still pending approval.

    This is beta 7.6 specific, the current beta 7.5 download from our website works fine. Yesterday I uploaded the 7.6.1 website version but I have to prepare the download files.

    EDIT: I just watched the video, this seems to be related to sidewalk settings not matching, hence the red handles. For example, the right T crossing, although the sidewalk is visible on the crossing, it seems inactive (?) for the attached road while on the other T crossing at the same road side it seems active. Can you select both crossings one after another and make sure the corner handles are either both green (active) or white (inactive) for matching road sides.

    Thanks,
    Raoul
     
    Last edited: Mar 29, 2016
  12. ShinfoK

    ShinfoK

    Joined:
    Feb 6, 2014
    Posts:
    283
    Hey raoul. I'm using the 7.6 beta from your website.

    I did see that it there was a curb issue. Which is strange because I didn't change any of that. When I create a new intersection, I change three values. Connection width to 10, radius to 3.5 and sidewalk width to 3.5.

    What happened here was that I moved my intersections, and it somehow broke the road connection, so I deleted the road and attempted to reconnect the road, and that brought in the red issue.

    If I go to another road between two intersections that is already set up and delete the road, then place another road and reconnect, this issue pops up again occasionally. Appears to be random but I'm not entirely sure. I've only done a few basic roads so far so it's easy enough to start from scratch, but I thought I'd bring the issue up anyway :)
     
  13. thekingofdallas

    thekingofdallas

    Joined:
    Jan 30, 2014
    Posts:
    22
    Sorry if this question has been asked. Are you able to create roads with sidewalks?similar to what you would see in a typical American neighborhood? Thanks!
     
  14. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,011
    Hey ShinfoK,

    I just double checked, changing crossing settimgs like the width, radius or sidewalk width does not affect the sidewalk settigs on my end.

    Did you check the status of green/white corner handles mentiond in my previous reply? Could it be some of these handles are accidently deactivated?

    Thanks,
    Raoul
     
  15. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,011
    Hi thekingofdallas,

    It depends on what you exactly need.

    The last video in the first post on the first page of this thread shows how sidewalks are integrated in the system. Apart from that you can create custom road networks based on your own meshes, the 2nd last movie on that same posit on the first page. This is another way to include sidewalks.

    Let me know if you have further questions related to this.

    Thanks,
    Raoul
     
  16. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,011
    Beta 7.6.1 is now available both on the Asset Store and on our website

    Please update, certainly if you have beta 7.6 currently installed because this update includes an important fix for connection issues in beta 7.6

    To import in your development project please first download all files (also including the official v2 files) in a temporary project and import the v3 beta unityPackage afterwards in your development project. Or import directly into your development project by carefully deselecting all assets first in the import window and afterwards only import the v3 beta 7.6.1 unityPackage at the top.

    And always backup your project first :)

    Thanks,
    Raoul
     
    docsavage and 600 like this.
  17. szymonkosok

    szymonkosok

    Joined:
    Aug 11, 2015
    Posts:
    35
    Hi Raoul,

    That was the problem. Thank you! Added offset to shader and problem's gone. :)

    Best regards,
    Szymon
     
    hopeful and raoul like this.
  18. zt3ff3n

    zt3ff3n

    Joined:
    Feb 19, 2016
    Posts:
    17
    Hi, I am trying to make a 24km road on quiete a large terrain, but I am getting errors: "Mesh.vertices is too large. A mesh may not have more than 65000 vertices."

    Is there a way (currently using 2.5) to fix this? I would hate starting over as it took forever to map out the road.
     
  19. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,011
    Hi zt3ff3n,

    Do you mean you are using v2.5? This is the v3 thread :)

    In v2 you have the option to cut the road in segments (separate game objects), select a marker and look for the "LOD Segment" checkbox.

    In v3 a 24km road will probably have intersections(?). In that case the road will automatically be split in segments. Nevertheless one way or another dealing with Unity's 65.000 vertices limit will be added for roads in v3 as well. It has already been added for side objects (the latest update) for which this 65.000 limit is more likely to happen especially when complex side objects are involved.

    Please let me know if you need more help with this.

    Thanks,
    Raoul
     
    Last edited: Apr 1, 2016
    hopeful and zt3ff3n like this.
  20. zt3ff3n

    zt3ff3n

    Joined:
    Feb 19, 2016
    Posts:
    17
    That is the fastest support reply I've ever experienced. It worked splitting up the LOD every 30 markers! Thanks, and sorry for not noticing this was v3 support. :)
     
    raoul likes this.
  21. Mayureshete

    Mayureshete

    Joined:
    Jan 18, 2014
    Posts:
    198
    what about tunnels, I mean when we make a road through terrain instead of cutting the terrain it could make a tunnel....? hope u get what im trying to say, may be i didnt explained it well..
     
  22. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,011
    Hi Mayureshete,

    You can create tunnel geometry using side objects. The problem is the terrain object, it does not support cutting holes. There are a couple of tools on the asset store that provide workarounds. In combination with those tools you can create tunnels. I belief support for cutting holes is also on the list to be added to the terrain object directly by the Unity devs.

    Thanks,
    Raoul
     
  23. jangomoose

    jangomoose

    Joined:
    Feb 17, 2016
    Posts:
    37
    Hello, do you have a tutorial video on creating rivers with V3?
     
  24. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,011
    Hi jangomoose,

    The main demo scene in the beta package includes a river example. See a provisional video below starting at 2.40. This video is older, the current example in the main demo scene is more complex regarding the river surface shape and the shape in general.



    It is based on the side objects "River Bed" and "River Surface". A new Road / Object type was created with "Side Object" toggled on, this way the object will not render a road. The above mentioned side objects are activated.

    You can check the setup of the two side objects in the Side Objects Manager (2nd tab from the right in the Inspector), especially for "River Surface" to change the river, assign your river prefab to the "Target Object" slot for example.

    Furthermore, in the demo scene you will see the irregular shape of the river, this is done by changing node positions per marker. This is activated/deactivated through the B key

    Let me know if you need more help with this.

    Thanks,
    Raoul
     
    Last edited: Apr 4, 2016
  25. jangomoose

    jangomoose

    Joined:
    Feb 17, 2016
    Posts:
    37
    That will do nicely. Must have overlooked the video. Thank you.
     
    raoul likes this.
  26. CHEFerrol

    CHEFerrol

    Joined:
    Mar 31, 2016
    Posts:
    18
    Hi Raoul:
    I have a problema with de " error CS0246" when I try to generate an application for Windows.
    I use Unity 5.3.1 f1 Personal and EasyRoads3D v3.
    I have tried to solve it moving the Project to another drive into the PC, and too i have checked "Any Platform" into the "EasyRoads3D.dll" but the problema remains.

    Could you help me?. Thank you.
     
  27. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,011
    Hi CHEFerrol,

    What are your exact Build Settings? Windows Standalone or Windows Store?

    And what is the exact error message?

    In any case, because you mention "EasyRoads3D.dll", first thoughts are that you also have v2 imported in your project. "EasyRoads3D.dll" is not required for v3 projects.

    Thanks,
    Raoul
     
  28. CHEFerrol

    CHEFerrol

    Joined:
    Mar 31, 2016
    Posts:
    18

    Hi Raoul:

    The error: "Assets/EasyRoads3D_Pro/scripts/SideObjectInit.cs(2,7): error CS0246: The type or namespace name `UnityEditor' could not be found. Are you missing a using directive or an assembly reference?"

    Building settings: for Windows standalone.

    Yes, I used initially v2 and over this I have imported v3. Could be this the problem?.

    Thank you
     
  29. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,011
    Hi CHEFerrol,

    Yes, SideObjectInit.cs also is a v2 script. But in this case I belief you can safely remove the "Using UnityEditor;" part at the top of the script.

    The recommended way to import the v3 beta is by first downloading all files (also including the official v2 files) in a temporary project and import the v3 beta unityPackage afterwards in your development project.

    Or, use your development project to download the full package but deselect all assets first in the import window and afterwards only import the v3 beta 7.6.1 unityPackage asset at the top.

    However, v2 and v3 should work well together in a single project. But indeed v2 does not support builds for all platforms. V2 is an editor tool only, the scripts are not required at runtime. V3 does have runtime features and should work well on all platforms.

    Thanks,
    Raoul
     
  30. ghiboz

    ghiboz

    Joined:
    Sep 7, 2012
    Posts:
    447
    hi @raoul !
    how are you? I've got something in my mind to do with your plugin, but I've a big question: it's possible add the road points by a script? (i've the v3 beta)
    thanks in advance
     
  31. Smokas

    Smokas

    Joined:
    Mar 7, 2016
    Posts:
    115
    Hi,

    Regarding v3 - when finalise always getting 2 exceptions (Unity 5.3.4p2):
    1.
    InvalidOperationException: Operation is not valid due to the current state of the object
    System.Collections.Stack.Peek () (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections/Stack.cs:321)
    UnityEngine.GUILayoutUtility.EndLayoutGroup ()
    UnityEngine.GUILayout.EndVertical ()
    UnityEditor.EditorGUILayout.EndVertical () (at /Users/builduser/buildslave/unity/build/Editor/Mono/EditorGUI.cs:6871)

    2.
    MissingReferenceException: The object of type 'ERModularBase' 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.ODQODCQODO.OnDestroy ()

    And is it possible to get some tutorial/video/etc how to build bridge?
     
  32. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,011
    Hi ghiboz,

    I am very well, thank you! How are you?

    V3 includes a scripting API which you can use to create roads through code. The beta package includes a runtime scene with an example. You can use similar code inside the Unity editor on an existing Road Network game object in the scene.

    Let me know if you have further questions about this.

    Thanks,
    Raoul
     
  33. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,011

    Hi Smokas,

    I am not sure about the first error. It isn't pointing to a v3 script and looks related to drawing controls in the Inspector.

    The second error was a known issue that indeed appeared after removing the ERModularBase script. It was harmless by itself but in any case, this should be fixed in the latest 7.6.1 release. Are you using 7.6.1?

    I just double checked, indeed no MissingReferenceException on "Finalize" in 7.6.1 and no other error messages either on my end.

    You can add your own bridges in two ways, as part of the road, see the overpass examples in the main demo scene. The bridge will be a separate road segment. In this case you model the connections between the standard road and the "bridge" segment in a modelling app and import them into the system.

    Or as side objects, the Procedural Side Object type, activated on specific markers. The beta package includes two examples and more will follow.

    I am currently working on a new demo project for the final release (also including more bridges). New video tutorials will be created with full details based on elements in this demo scene. Meanwhile please ask if there is anything specific you have questions about, which part of building the bridge is not clear.

    Thanks,
    Raoul
     
    Last edited: Apr 8, 2016
  34. Smokas

    Smokas

    Joined:
    Mar 7, 2016
    Posts:
    115
    Yes, latest 7.6.1 on Mac OSX
     
  35. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,011
    That is strange. This error was related to code in OnDestroy() activated to update project info (possible road type changes etc.) when deselecting the road network. This code was also triggered when removing the actual game object including the scripting component. This is why that error appeared.

    Are you using the website version or the asset store version?

    These versions are not 100% in synch due to issues with the asset store package getting approved, hence the recent package contents change on the asset store. This MissingReferenceException fix was added only recently perhaps it is not part of one of these two builds.

    In any case, the error by itself is harmless. "Finalize" involves removing all EasyRoads3D script components which triggers OnDestroy(). This error should not appear in the next build.

    I only noticed your question about bridges after posting my initial previous reply and updated this post. Please review my reply in case you missed it.

    Thanks,
    Raoul
     
    Last edited: Apr 8, 2016
  36. Smokas

    Smokas

    Joined:
    Mar 7, 2016
    Posts:
    115
    I use version from asset store. Tried a lot of combinations - on finalise the exception always appear:

    MissingReferenceException: The object of type 'ERModularBase' 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.ODQODCQODO.OnDestroy ()


    I saw update about bridges - take look at it - thanks :)
     
  37. Smokas

    Smokas

    Joined:
    Mar 7, 2016
    Posts:
    115
    I found one interesting effect, when road segment is raised on flat (1,1,1) size terrain:

    Screen Shot 2016-04-08 at 11.37.45.png
     
  38. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,011
    Hi Smokas,

    Yes, OnDestroy(), that will be fixed for sure in the next build.

    Thanks,
    Raoul
     
  39. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,011
    Hi again,

    I see a road which appears to have a very low UV tiling value causing the bluriness and I see a road segment below the terrain.

    What exactly do you mean with a flat (1,1,1) terrain?

    What do you mean with "when road segment is raised"? Where is it raised? Is this at terrain Y = 0 matching the terrains game objects Y position? If you put two markers at Y = 0 and the 3rd marker at Y = 10, the nature of the spline curve is that between marker 1 and 2 the shape will go below y = 0. If your terrain is at y = 0 it is impossible to deform the terrain because unity terrain height values are stored in decimals between 0 and 1, you cannot apply negative height values. Is that what is happening?

    All this and more Terrain Deformation related info is mentioned in the Troubleshooting section of the manual.

    A way to deal with this is, to set the Controller Type for marker 1 to "Straight XZ" or "Straight XYZ" instead of the default "Spline Controller" or gradually increase marker heights near Y = 0 or make sure to flatten your terrain first at a specific "safe" height other than 0 so the terrain can be deformed downwards.

    Thanks,
    Raoul
     
    Last edited: Apr 8, 2016
  40. Smokas

    Smokas

    Joined:
    Mar 7, 2016
    Posts:
    115
    I mean plain fresh created terrain without any modifications. The road with 3+ markers and middle is raised.

    Thanks for advice how to deal with such situation :) RTFM as I recall :)
     
  41. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    1,389
    We noticed this in our earlier uses of ER and what Raoul says makes a lot of sense. In LB we always create our landscapes above a height of 0. It also makes it easier to say add a bridge and river in a road later when you are looking to add more detail to your road network.
     
    raoul likes this.
  42. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,011
    Hi Smokas,

    I am not sure if your problem is related to this but the manual has more information about this and can be useful in other situations too, that's all :)

    Can you give more info if it doesn't fix the problem, a screenshot with marker positions will be helpful.

    Thanks,
    Raoul
     
  43. ghiboz

    ghiboz

    Joined:
    Sep 7, 2012
    Posts:
    447
    thankyou!
    you sent me the beta v5 on january.. it's inside the scripting api?? i need to search better!!!
    see you soon!
     
  44. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,011
    Hi ghiboz,

    The runtime scene is located in: /Assets/EasyRoads3D scenes/scene runtime

    The example script is loacted in: /Assets/EasyRoads3D/Scripts.runtimeScript.cs

    It includes a lot of commented code because the scripting API wasn't documented in the manual during earlier betas. It is now available as well in the manual

    Thankws,
    Raoul
     
  45. Smokas

    Smokas

    Joined:
    Mar 7, 2016
    Posts:
    115
    Hi Raoul,

    RTFM was ment to me :) How to reproduce:

    1. Create terrain: GameObject > 3D Object > Terrain
    2. Create road network: GameObject > 3D Object > EasyRoads3Dv3 > New Road Network - press yes in dialogs
    3. Create new Default Road
    4. Check Terrain Deformation
    5. Shift click 5 times to create 5 nodes in the line.
    6. Rise 3 (middle node) substantially.
    7. Click on terrain button in ER Script (Inspector).
    8. Click on Build terrain.
    9. Click on Finalize.

    PS It is really rare situation - generally terrain areas are higher then Y=0. I just finally got time to start with EasyRoads3DPro I have bought quite a while ago - and started from plain terrain.
     
  46. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,011
    Hi Smokas,

    Do you mean you figured out how to deal with this?

    If not, this sounds exactly what I tried to explain and what sstrong confirmed.

    You create a road with 5 markers on a standard terrain, meaning the terrain height matches the terrains game object Y position so it is impossible to deform the terrain downwards.

    If all 5 markers are at Y = 0 and afterwards you raise marker 3 substantially, it means that between marker 1 and 2 and marker 4 and 5 will be slightly below the terrain. It is only a little bit but it is impossible to flatten the terrain.

    It is indeed a rare situation and it only happens on substantial height changes. Please check the workarounds I suggested, especially setting the controller type for marker 1 and 4 to something else then Spline controller.

    Also, as sstrong suggested, it is good practise to flatten your terrain first at a higher level before you start working on it. Try making a river on a standard unity terrain, it will not be possible to dig out the riverbed! You have to make sure there is enough space available downwards to do this.

    Thanks,
    Raoul
     
  47. Smokas

    Smokas

    Joined:
    Mar 7, 2016
    Posts:
    115
    Yes, Raoul I got your advice very well, and as I mentioned it is extremely rare situation :) - just as hardcore (not game) developer myself gave you the detailed test scenario. IMO it should be easy to fix - seems it is interpolation problem and checking for values (lerp) will let to avoid it.
     
  48. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,011
    I actually didn't mention this yet, but when this situation occurs, by default you will see red handles near the critical areas in Scene View. You can pay extra attention to these areas in Build Mode and check if the terrain indeed pops through the road and make changes if necessary.

    As for the fix, yes the code could smoothly interpolate just before the road disappears below the road as it is already checking for this situation, but I think these sort of details are more for 3.x. Solutions are already available to deal with this.

    Thanks,
    Raoul
     
  49. Smokas

    Smokas

    Joined:
    Mar 7, 2016
    Posts:
    115
    Yes - I saw red dots, was wondering what it is and got feeling that same kind of warning.

    BTW - the more I work with your product, the more I like it :)
     
    raoul likes this.
  50. jf3000

    jf3000

    Joined:
    Dec 31, 2013
    Posts:
    153
    Its really disappointing when you remove your application from the scene that some of the code still lingers behind or in the hierarchy. Also disappointed after a year that you have still not fixed an issue I brought up with you on multiple occasions.
     
unityunity