Search Unity

World Building EasyRoads3D v3 - the upcoming new road system

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

  1. sheffieldlad

    sheffieldlad

    Joined:
    Oct 9, 2013
    Posts:
    154
    Is there anything in particular in the inspector that you would like to see?
    I'll get you a better screenshot over the weekend, I'm away from home this evening.
     
  2. raoul

    raoul

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

    The part above the Terrain Splatmap section is important.

    From the screenshot you posted yesterday you can see the full section is disabled. It would be interesting to see the Inspector above this section, where controls start to be displayed disabled.

    Thanks,
    Raoul
     
  3. NordstroemSAAB

    NordstroemSAAB

    Joined:
    Aug 3, 2017
    Posts:
    50
    I had trouble with the unmodified heightmap being saved when I saved the terrain to asset bundle, but it appear that we're saving the TerrainData before we create the roads and build the road network. I thought that perhaps the modified heightmap was kept in the ERTerrain, but that doesn't really make sense. I understand that it must be holding a backup of the original data.

    My colleague wrote the original code for turning terrains into asset bundles and I'm just modifying it to also use EasyRoads3D. Therefore I start looking in the wrong places when trouble arise. :oops:
     
  4. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    That indeed will probably not work well.

    In any case, no need to dig into the terrain data that EasyRoads3D stores. Saving the TerrainData to the asset bundle after creating the road network should indeed solve the problem.

    Thanks,
    Raoul
     
  5. Mxill

    Mxill

    Joined:
    Jul 25, 2017
    Posts:
    61
    Whats the right way to store the road in the project folder ?(creating a prefab makes the road disappear)

    The total road distance is 5km, there's one long road that's about 800m long and has 2 intersections from start to finish. No side objects just the road itself. Indeed the demo scene loads nearly instantly.

    I did a test with my road on an empty scene and that's where my concern is. I don't want you to spend time going through my scene as I've been using easyroad before the asset store, I love the asset and I respect the developer's time but if you have any general tips I'll happily absorb them.

    Thank you!
     
  6. raoul

    raoul

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

    Unity stores procedurally created meshes like the roads in the scene file. Unity prefabs require the mesh asset to be phisically present in the project folder. The "Store Mesh Assets in Folder" button in Builld Mode does that.

    Did you check a Finalized scene? Other then that, really, there are no differences between the game objects when you would import the roads.

    Thanks,
    Raoul
     
  7. blitzvb

    blitzvb

    Joined:
    Mar 20, 2015
    Posts:
    284
    Hey, I am still wondering how could have I missed your asset!

    Few questions:

    - does all the fonctioanlities are avalaible at runtime? I plan to procedurarly generate road on top of terrain/mesh hexagone tile.
    - for a connected road is this one draw call or is it by road segment?
    - do you have demos of the runtime road creation?
    - does river support RAM?

    Thanks in advance and congrats for this awesome asset.
     
  8. raoul

    raoul

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

    Glad to see you found it :)

    The main road creation functionality is available in the scripting API. The focus has been on releasing v3. This is done now. we will continue improving the tool further with new features etc. That includes the scripting API, if there is anything you need urgently that is not available yet, please let me know.

    Roads are marked as static by default so they will be batched. Side objects have a combine option, this may also be introduced for roads. But roads also have a LOD system and you may want separate road sections anyway for occlusion culling. In these cases combining road sections is not what you want.

    The main EasyRoads3D Pro package includes a simple runtime demo scene. A road is generated and afterwards an object follows it. More API examples will follow.

    I have been in contact with the developer of RAM. As mentioned, we were occupied with releasing v3 the last months. We will now also look further into support for other packages and/or providing examples how to use the tool with other packages, that includes RAM.

    Thank you very much!

    Raoul
     
    blitzvb likes this.
  9. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,154
    I've tried the free version of EasyRoads3D and I'm thinking about taking the leap to the paid version, but I have a question. I have this incomplete map here:



    As you can see in the northeast quadrant, there's a sort of triangular connection of roads. Would it be possible to implement this using T-intersections or do T-intersections require the use of 90-ish degree angles?
     
  10. HeadClot88

    HeadClot88

    Joined:
    Jul 3, 2012
    Posts:
    736
    Hey @Murgilod - Quick question - How big is that map?

    Just curious as I want to know how well EasyRoads scales with very large maps :)
     
  11. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,154
    Haha, a bit too big for practical purposes; from side to side it's 10km and I'm struggling to fill it. I'm trying to find some decent map editors that can export to OSM, since apparently EasyRoads can import from them in the pro version.

    As for how well it scales, so far it does pretty well, though I'm not sure how well it'll perform in the largest of scenes. We'll see, I guess.
     
    HeadClot88 likes this.
  12. HeadClot88

    HeadClot88

    Joined:
    Jul 3, 2012
    Posts:
    736
    What is the location? IE Dubai or whatever. :)

    Either way let me know how it goes. Really curious to see the results in regards to large maps.
     
  13. raoul

    raoul

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

    The T intersection is flexible but isn't suitable for stronger angles like these 3 connections at the top in your image. Currently we are working on an Y Connector which is what you need here. A prototype for the mesh creation is ready but will be developed further to support more complex road shapes.

    If you need this urgently you can look into the custom prefab system. It allows importing your own crossing/connection models in the system.

    Thanks,
    Raoul
     
  14. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,154
    I'm not averse to making my own custom prefabs if need be. I'll give the documentation a look and then probably end up buying or not buying depending on how well that goes. Thanks for the reply!
     
  15. raoul

    raoul

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

    EasyRoads3D creates geometry. You can control the resolution, there is support for LOD levels and you can cut long roads in segments for occlusion culling etc. So it all depends on how it is used :)

    Thanks,
    Raoul
     
    Last edited: Jan 15, 2018
    HeadClot88 likes this.
  16. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Resources for this are the two provisional “Customized Road Network” videos on this page http://unityterraintools.com/EasyRoads3D/v3/html/quick_start.html and the manual.

    Thanks,
    Raoul
     
  17. blitzvb

    blitzvb

    Joined:
    Mar 20, 2015
    Posts:
    284
    thanks a lot for your detailed answer. I appreciate.

    I installed the demo and it's working great in the editor.

    First of all, is this asset working with Mesh instead of terrain? If you need a height-map and splats-map I have those. Ultimately I plan to use TerraFirma which from what I have been told will have an API very similar to Terrain API.

    Do you plan to support Terrafirma? if not, is your code for splatmaps and heightmap on a single file and relatively easy to change?

    At first, what I need is :

    - Add and modify roads and intersections based on a location array that I give to the road API.

    By the way: In the demo I was not able to add an intersection in the editor but I believe it's because of the free demo. right?

    - Conform to the underlying mesh or terrain. Not perfect at first will work for me. Furthermore I can eventually help with megafiers.

    Later, once you add more Feature for the runtime API, I would expect :

    - change the splatmap bellow and around the road.
    - add and remove section of the road or change a road at runtime
    - use it for river and electricity pole without road.

    Thanks in advance.

    Vincent
     
  18. raoul

    raoul

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

    With "Demo" do you mean the Free version? The free version currently indeed does not support intersections yet. The scripting API will not work either with the free version.

    What issues do you have with conforming the terrain? From your comments further below it seems it doesn't work at all. Are you looking at this in Edit Mode? In that case, Build Mode (middle mountain tab) > "Build Terrains's" button.

    The tool does work with terrain meshes but the mesh will not update, instead you can have the road snap to the terrain when the terrain mesh shape is relatively smooth. Regarding TerraFirma, of course we like the tool to work well with other assets, but it also depends on demand. Requests can aways be submitted here, survey

    That is already available

    That can already be done

    That can already be done

    Thanks,
    Raoul
     
    blitzvb likes this.
  19. MrG

    MrG

    Joined:
    Oct 6, 2012
    Posts:
    368
    I would think a roundabout (included) would be much closer to what you want there.
     
  20. MrG

    MrG

    Joined:
    Oct 6, 2012
    Posts:
    368
    Y-connectors for roads and railways would be much appreciated. Rail connectors need a switch too.
     
  21. blitzvb

    blitzvb

    Joined:
    Mar 20, 2015
    Posts:
    284
    Yep the free version.

    Well, I assumed it would not work on meshes and only on terrain. Maybe I am wrong....

    When I use the word terrain I am talking about unity terrain and for mesh i am thinking of a landscape that is just mesh. Do you support that or do you need unity terrain?

    For all the runtime API already there, it’s great!
     
  22. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Looking at the other short road sections in the image, it seems this particular area covers a reasonably large area, larger then roundabouts usually take, hence why I mentioned Y connectors.

    Thanks,
    Raoul
     
  23. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Railroads are not integrated in the system, they can be simulated like the example in the demo project. More railroad specific connectors can be added but that too depends on demand, survey :)

    Thanks,
    Raoul
     
  24. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    A mesh terrain can be assigned in General Settings > Scene Setttings. This will act as a replacement for the Unity terrain object. Road markers will snap to this mesh terrain, but the terrain will not update to the road shape like the Unity terrain object does.

    The API does not yet fully support all the side object options available inside the editor. But when setting up new "road types" for power lines and rivers with these specific side objects activated and the new "road type" marked as a side object (no road will be generated), new objects of this road type will build accordingly through the scripting API

    Thanks,
    Raoul.
     
    blitzvb likes this.
  25. blitzvb

    blitzvb

    Joined:
    Mar 20, 2015
    Posts:
    284
    Wow! Awesome. You know, I could do myself the deformation of the mesh if needed. Unless I am mistaken, I don’t think the mesh support is written in the description of the asset.

    Does all your answers about the API also apply with a mesh ? No splats no height-map change but everything else is working or will work?
     
    Last edited: Jan 15, 2018
  26. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    This has been added to the feature list on our website :)

    The functionality will be the same, so you can generate side objects as described. However, for rivers, part of the process is adding the riverbed shape to the terrain. This will not be possible for a mesh terrain at the moment.

    Thanks,
    Raoul
     
    blitzvb likes this.
  27. unity_Z2EvxablmT_wSw

    unity_Z2EvxablmT_wSw

    Joined:
    Dec 12, 2017
    Posts:
    8
    Hey Raoul,

    I would like to ask, if the several different road types are included in the Pro version, because I dont seem to find them, at least I can only choose from different road types (not only 1 default) when I import the Demo pack. However importing that onto Pro most likely messes up some scripts, and things dont seem to work properly (I wrote it in an earlier post, it was the issue with the tangents not being calculated by default) If I import pro on it again, all the road types disappear from the settings.

    I might not understand something here, but I would love to have all the different road types and the asset working well at the same time. Or do I have to do something in addition to get them in my project?

    Thank you in advance
     
  28. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hey unity_Z2EvxablmT_wSw,

    The black roads issue can be fixed easily:

    - General Settings > Scene Settings > Calculate Tangents in Edit Mode
    - Build Setttings (middle mountain tab) > Calculate Road Tangents

    When both checkboxes are on the roads will no longer be black. This will be the case by default in the next demo project update.

    Please check this page: http://unityterraintools.com/tutorials/so_import_export.php

    It explains how to export / import demo project road types and side objects in your own development project with the main EasyRoads3D Pro package imported. It is based on standard unity packages including the required road type / side object data. That way you have a clean project with only those assets you want to use.

    Additionally you can also create a Unity package from connection prefabs in /EasyRoads/Resources/dynamic prefabs/ and /EasyRoads/Resources/custom prefabs/

    But you can use the demo project as well. To prevent that presets get overwritten when importing the v3.0 main EasyRoads3D Package in this project, deselect the full resources folder in the import window. Also make sure to open the demo scene first and select the road network object. This will automatically create a data file of all road types and side objects in the demo scene so you can use them in other scenes as well.

    This data file does not exist by default to prevent that your own possibly updated data file (with new road types and side objects) gets overwritten when importing future updates. New road types and side object examples in future updates will be added to this data file after opening the updated demo scene.

    Thanks,
    Raoul
     
  29. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,154
    Okay, I took the plunge and bought the asset and so far everything seems perfect! It imports perfectly from the maps I'm making with a few exceptions. I notice that intersections and the like aren't dynamically created (though I didn't expect them to be, if we're honest) but thankfully, the asset itself is so easy to use that I can easily just insert them myself. This is all going to save me a lot of time, as previously I was making all my roads in segments in blender, which takes forever.

    Unfortunately, the reason I'm using wide curves like that is because roundabouts require a massive size if you're approaching them at high speeds. The game I'm making is particularly drift heavy and involves speeding through city streets. A roundabout just wouldn't really fit in with what I'm going for.

    It's just a fictional seaside city I'm working for. After I bought the pro version, I tested importing a map based around Los Santos from GTAV, which filled out about 75% of the 10km x 10km area. I found no real performance issues to be had, despite the amount of roads and road complexity. It seems that EasyRoads scales really well to large sizes.
     
    HeadClot88 likes this.
  30. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Glad to hear all works well so far.

    The current system does indeed work with separate intersection prefabs. Roads adjust to the intersection connection settings. In practice this is a faster workflow. Try creating 4 roads and connect them to an X crossing. Then drop an X crossing in the scene and pull out new roads from the 4 connections. The second approach is a faster.

    The next major update will include additional options to define road types. It will make it possible to have crossings adjust to road types which by itself makes auto inserting crossings also possible. Auto inserting intersections may already be available in an earlier update for intersections involving the same road type or based on available intersection presets.

    Thanks,
    Raoul
     
    blitzvb likes this.
  31. Deleted User

    Deleted User

    Guest

    Hi,

    We have encountered a problem, when we scroll near to road it views terrain on road.
    See the screenshot attached.

    Thanks in advance.
     

    Attached Files:

  32. raoul

    raoul

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

    That looks like z-fighting. What is the Raise level of the road? This is displayed at the top in the Inspector aftert switchi g to build mode.

    And which material are you using? It looks like the motorway texture in the older beta demo project. The standard shader version includes an offset that will also deal with this. But on flat roads like in the screenshot a Raise level of 0.02 should already be sufficient.

    Additionally, depending on the focus status, the scene view cam is not always reliable for this. Please check this in game view as well.

    Thanks,
    Raoul
     
  33. MrG

    MrG

    Joined:
    Oct 6, 2012
    Posts:
    368
    @raoul If I import the Demo Package from the Asset Store into a new empty project and then import the latest ER3D V3 from the store after, is there anything I should deselect on the import to avoid breaking the Demo Project?
     
  34. raoul

    raoul

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

    The current EasyRoads3D Pro package includes a ERSideObjectsLog asset that ideally should not be there. It will probably overwrite the one in the demo project. The required assets are those in /EasyRoads3D/Editor/ and /EasyRoads3D/lib/. All other folders can be deselected.

    But the full package can be imported too. Opening the demo scene afterwards and selecting the Road Network object will update the overwritten log file with the road presets and side objects in the demo scene. These presets will now be available in other scenes as well.

    Please let me know if you are having issues this.

    Thanks,
    Raoul
     
  35. MrG

    MrG

    Joined:
    Oct 6, 2012
    Posts:
    368
    Please see PM. Thanks.
     
  36. raoul

    raoul

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

    I sent two replies yesterday.

    For anyone who have or want to import the v3.0 build in the demo project, There are some shared assets with different GUIDs. What I have noticed is that this results in two materials types losing their shader reference. This is related to the following two shaders:

    ER Road Transparency: all roads in pink
    ER Dual Blend: two pink I Connector transition prefabs

    Reassigning the respective shader to the material component will resolve that.

    This GUID issue between packages has been fixed for the next update.

    Thanks,
    Raoul
     
  37. deliberative

    deliberative

    Joined:
    Dec 22, 2016
    Posts:
    12
    Hello! Quick question -- apologies if I have simply missed this in the documentation or elsewhere. Is there any way to assign sidewalk meshes to a different layer than the rest of the road system? I'm using a decal projection system which supports layer masks, and I'd like to be able to project a decal onto the sidewalks only, and not the roads.

    Thanks!
     
  38. raoul

    raoul

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

    Indeed sidewalks are currently part of the same mesh obejct as a submesh, so that is not possible with the mesh asset as it is.

    Road shapes and sidewalks are currently being expanded with more options. An option to have sidewalks build as a separate object including layer options can be added.

    Meanwhile, what could be done is write an editor script that will go through all road objects. Get the mesh asset from the mesh filter, extract the sidewalk data by going through the specific submesh triangle indexes and recreate the sidewalk accordingly as a new gameobject on its own layer.

    Thanks,
    Raoul
     
  39. deliberative

    deliberative

    Joined:
    Dec 22, 2016
    Posts:
    12
    Okay -- makes sense. Thanks!
     
  40. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    As can seen by the assigned materials,the first sub mesh is always the road. Additional sub meshes are sidewalks. Let me know if you have more questions..

    Thanks,
    Raoul
     
  41. Wenamun

    Wenamun

    Joined:
    Jan 9, 2015
    Posts:
    14
    I am having this exact same issue, I tried exporting as an OBJ and reimporting it, ditching the original road system etc. It didn't work, the visual texture glitch persists. I've tried using the standard shader, to no effect. I am beyond stumped at this point and could use some help. These visual errors are really ruining an otherwise great asset.
     
  42. raoul

    raoul

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

    The info in the post is a little bit limited.But I think this is related to longer roads not cut in segments or split by crossings and it starts to appear after a while, is that right?

    In that case it is very likely related to uv floating point inaccuracies on specific devices. I will send you a little editor script you can try.

    Thanks,
    Raoul
     
    Last edited: Jan 19, 2018
  43. vertigostudios

    vertigostudios

    Joined:
    Oct 1, 2012
    Posts:
    101
    Hi Raoul, does the system allow for creating berms. Im sure this question has been asked before but I cant seem to find anything related to it.
     
  44. raoul

    raoul

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

    Can you show an example image of what you like to do.

    I would think this can be done using the side object system. But it depends on the shape, should it make changes to the terrain object?

    Thanks,
    Raoul
     
  45. vertigostudios

    vertigostudios

    Joined:
    Oct 1, 2012
    Posts:
    101
    Hi again, please see the following link. Hopefully the image will show what I mean. https://images.nbcolympics.com/www.nbcolympics.com/olyberm-usatsi_6471346.jpg

    I guess the angle would be done by using the rotation gizmo within Unity.

    Cheers
    Deano
     
  46. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    That is something different then what I had in mind :)

    The new demo scene includes a bike track that can be compared with this. It is actually based on a shape type of side object snapping to the ground on the left and right side. This approach is used because the track shape with the bumps is impossible to added directly to the terrain object unless thye terrain has a very small heightmapscale.

    You might want to have a look at this in the demo scene. This tutorial is related.

    Thanks,
    Raoul
     
  47. vertigostudios

    vertigostudios

    Joined:
    Oct 1, 2012
    Posts:
    101
    Hi again, thanks for the reply Raoul - Ill take a look at the tutorial.

    Thanks again.
     
    raoul likes this.
  48. unity_Z2EvxablmT_wSw

    unity_Z2EvxablmT_wSw

    Joined:
    Dec 12, 2017
    Posts:
    8
    Thank you very much!
     
  49. ghiboz

    ghiboz

    Joined:
    Sep 7, 2012
    Posts:
    465
    hello @raoul
    I'm trying again to build some stages for my rally simulator... and I tried to drive into your demo scene...
    I have a question that should not be strictly relative to EasyRoads, but maybe you can help me...

    I created an assetbundle with the road, to be loaded with my rally engine... if I load it in debug into unity I see this:

    and as you can see the terrain is ok, exactly like your demo scene..

    but if I load from the .exe I obtain this:

    the road, trees, objects are still the same, but the terrain seems that the quality is lost..

    have you got an idea??

    I tried to add some meshes with the terrain textures, and are imported correctly...

    some other stages (not by easyroads) with the terrain are imported correctly...

    thanks in advance!
     
  50. raoul

    raoul

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

    This is indeed more terrain object related. But I just tested this, the terrain looks the same as in the Unity editor in a build.

    In your screenshots it seems as if the terrains basemap texture is used instead of the tiled terrain splat textures. You could check the terrains Base Map Distance settings in the build.

    The material on the road in tleft bottom corner doesn't seem to use the original material / shader with transparency, it looks like it uses Opaque render mode.

    Also, the demo scene is more intended as a resource to get familiar with the tool and you can optionally export rioad types and side objects and use them in your own projects. The scene itself is not intended for final builds.

    Thanks,
    Raoul