Search Unity

  1. Click here to see what's on sale for the "Best of Super Sale" on the Asset Store
    Dismiss Notice
  2. 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. Mr_Dan_O

    Mr_Dan_O

    Joined:
    Oct 12, 2013
    Posts:
    347
    Yep, I have a separate Custom Prefab Editor window which is always open.

    BTW, I noticed the thumbnail generation is not working okay. It was okay until I added more custom connections and now randomly some of the thumbnails are not showing. I wonder how to could fix it - Image below.
    ERTP.png
    FYI: This is the latest ER but it used to happen in the previous versions too, Also note that when it loads/generates the thumbnails, it does load all the thumbnails but at the end, it will show blank thumbnails randomly as shown above.
    With that said, when I delete my custom prefabs from the "Custom Prefabs" folder of EasyRoads, everything goes back to normal!!
    EDIT: After I deleted my custom prefabs from the folder, I decided to restore the files one by one I noticed that the problem never showed up until I after restoring the 13th file, the problem reappeared. So if you have all the add-ons and demo files, if you add 13 more connections the problem starts to occur, apparently.
     
    Last edited: Apr 8, 2019
  2. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,298
    Hi D4N005H,

    I just tested creating a new Custom Prefab in the Custom Prefab Editor with the road network in Build Mode. This worked well without errors. I went to 10 pages back in this thread but I cannot find the original post related to the Custom prefab editor. What exactly was the problem?

    Regarding showing available prefabs as thumbnails, this uses the Unity API, GetAssetPreview() and was updated in a recent release. It should refresh the thumbnails when prefabs are added or when a thumbnail does not exist. And it should be able to display a lot more then 13 prefabs. For example, the Custom prefab I added above does display with a thumbnail. This is in the dev project which includes about 70 custom prefabs.

    Do you do scripting? just as a test, can you try clearing the dynamicPrefabPreview and customPrefabPreview arrays in the ERModularBase script attached to the main road network object. And afterwards open the Connections Prefabs tab?

    Which version of Unity do you use?

    Thanks,
    Raoul
     
  3. Mr_Dan_O

    Mr_Dan_O

    Joined:
    Oct 12, 2013
    Posts:
    347
    It was on page 127 or somewhere, that is okay though. It works well now.
    Regards to the other issue, That is also okay now just removed some of the unnecessary connection prefabs and it works like a charm. :)

    Thanks,
    Regards.
     
  4. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,298
    Glad to hear that. For the next update a refresh button is added anyway, just in case there are issues with these prefab thumbnails.

    Thanks,
    Raoul
     
    Mr_Dan_O likes this.
  5. Silveralby

    Silveralby

    Joined:
    Jan 14, 2018
    Posts:
    81
    Hi does anyone know if the "curb" side object of easyroad3D can be enlarged in size? thank's
     
  6. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,298
    Hi Silveralby,

    Which side object is this? Is this the curb in the HD Roads package?

    In that case, this is a procedural side object based on a source prefab in the project folder. An easy way to find it is to open the side object manager (2nd tab from the left in the Inspector), open the Props tab and select the specific side object from the Side Object dropdown. Then select the object in the Source Prefab slot, it will point to the prefab in the project folder. In this folder select the "curb2", this is the actual model, scale up the Scale factor in the Inspector. Afterwards remove and reassign the prefab "road_curb v2" to the Source Object slot in the side object manager. That should do it.

    Thanks,
    Raoul
     
  7. Silveralby

    Silveralby

    Joined:
    Jan 14, 2018
    Posts:
    81
    Hi Raoul. thank's for the reply. This is the curb but there is no way to enlarge it in the settings. It seems to me a little too strict with respect to reality but I would not like the regulation to be there by default and I can't find it. However, I will follow your procedure so you can post pictures about what you explained? Thank's

    Cattura.JPG
     
  8. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,298
    Hi Silveralby,

    That looks like the older v2 side object? Which packages do you have imported? The race track curb in the current v3 demo looks different.

    curb.jpg

    I belief the v2 side object was a shape type of side object, the shape can be edited / enlarged in the shape editor window.

    In general, the side object system is a framework, all provided side objects are only examples. You can create your own side objects and side object examples can be edited. In this case for example, a curb on a cart track will be smaller then a curb on a formula 1 race track.

    Thanks,
    Raoul
     
  9. SpaceRay

    SpaceRay

    Joined:
    Feb 26, 2014
    Posts:
    424
    Hello, please, I wonder if there is some way to select ALL the markers from a road, I mean that if I have a big road that has around 30 markers, is there a possible way to select all 30 without having to select them one by one?

    I want to move a big road I made, and the only way to move it, is by selecting ALL the markers, and there are lots of markers, and they are very small to see them, so is not easy to select them one by one, and would be really very tiresome and awkward to do it one by one.

    thanks very much for any possible help

    best wishes
     
  10. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,298
    Hi SpaceRay,

    Shift + Z, after selecting the first marker, does that.

    http://unityterraintools.com/EasyRoads3D/v3/html/shortcuts.html

    The size of marker handles can be adjusted in General Settings > Scene Settings

    Thanks,
    Raoul
     
  11. Silveralby

    Silveralby

    Joined:
    Jan 14, 2018
    Posts:
    81
    I would like to change the example curb to make it more similar to yours in the image, only if it's too complicated to do it's a problem because I'm a beginner.
     
  12. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,298
    It is still not clear which curb you use, which package is this?

    The one in the image in my previous post is part of the additional demo package. This package is free when logged in with the account used to get EasyRoads3D Pro.

    https://assetstore.unity.com/packages/tools/terrain/easyroads3d-demo-project-105045

    This demo scene includes featured zones with links to more info on our website. In this case:

    http://unityterraintools.com/tutorials/race_track.php#curbs

    Thanks,
    Raoul
     
  13. Silveralby

    Silveralby

    Joined:
    Jan 14, 2018
    Posts:
    81
    Raoul thanks for the suggestions. I modified the obj of the curb and now it's wider.
     
    raoul likes this.
  14. Silveralby

    Silveralby

    Joined:
    Jan 14, 2018
    Posts:
    81
    Hi Raoul If I wanted to create a side object, can I import it into easyroad? If possible, is there a tutorial? Thank's
     
  15. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,298
    Hi Silveralby,

    The side object system is a framework with different options. What type of side object do you want to make?

    The demo package I mentioned yesterday includes a wide range of different examples with tutorial links on our website explaining the setup and how they are used in the scene.

    Importing a model into EasyRoads3D to be used as a side object is a matter of assigning it to the "Source Object" slot in the Side Object Manager.

    Thanks,
    Raoul
     
  16. Silveralby

    Silveralby

    Joined:
    Jan 14, 2018
    Posts:
    81
    I don't know if you can see but a fence of this kind with the wire above.

    9c925e0e661ab5eab4d6f649e6937be057729e4080340_w630.jpg
     
  17. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,298
    That does look similar to one of the fences in the demo package



    It is a procedural side object based on an imported model. A distinctive top part can be added to the source model. Just make sure that when more then one material is involved, the mesh objects are separate child objects rather then submeshes. Preserving different materials on submeshes is not supported at the moment, that will be added in 3.3.

    Thanks,
    Raoul
     
  18. Silveralby

    Silveralby

    Joined:
    Jan 14, 2018
    Posts:
    81
    Excellent I hope it can also be of help to those like me who like to add objects and easyroad allows it. Thank's
     
    raoul likes this.
  19. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,298
    Experimenting with the different side object settings and options will help getting an idea of what is possible, how this system can be used.

    Let me know if you have further questions.

    Thanks,
    Raoul
     
  20. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,298
    V3.2 beta 5 is available on our website

    This is a small update with, among others, fixes for possible black triangles on the new Flex Connector due to wrong tangent data and pulling out new roads from crossings and other roads which was not working well in beta 4

    https://www.unityterraintools.com/v3beta.php

    Thanks,
    Raoul
     
    Last edited: Apr 12, 2019
    JamesWjRose likes this.
  21. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    482
    Oh boy oh boy oh boy! I will be giving this a try later today. Have a great weekend
     
    raoul likes this.
  22. marcrem

    marcrem

    Joined:
    Oct 13, 2016
    Posts:
    191
    Hi Raoul,

    1. How do I make a dynamic connection compatible with a road type?
    2. How do I make a connection match the size of a road?

    Thanks

     
    Last edited: Apr 12, 2019
  23. marcrem

    marcrem

    Joined:
    Oct 13, 2016
    Posts:
    191
    Also where do I find my serial number to have acces tp the betas?
     
  24. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,298
    Hi marcrem,

    The connections of a dynamic prefab are customizable. It is very much recommended to assign a road type to the connections. That way they will auto adjust after road types changes. There is a button "Create New Connection Prefab" in General Settings > Road Types. This will generate a new prefab based on the selected road type.

    The new Flex Connector in V3.2 will be generated automatically based on the involved road types.

    Can you send an email or PM with your asset store invoice number, we will register you for beta access.

    Thanks,
    Raoul
     
  25. nmbileg

    nmbileg

    Joined:
    Sep 29, 2017
    Posts:
    21
    Thank you! You're the MVP!
     
  26. lynx89_

    lynx89_

    Joined:
    Mar 1, 2018
    Posts:
    27
    You're welcome :)
    Now I also have figured out that you can keep that mip maps toggle on and adjust the "Mip Bias" value (typically by setting a negative value) according to your needs. To do this, make sure you enable the debug mode in the inspector, otherwise that field won't be visible.
    With this method you can gain a little performance boost compared to fully disablying the mip maps.
     
    nmbileg likes this.
  27. Barikli

    Barikli

    Joined:
    Jul 24, 2017
    Posts:
    6
    Hi raoul,

    how to change indent and surrounding value to 1?
    i am using Pro v3 3.1.5.
     
  28. Unity_LoDiCS

    Unity_LoDiCS

    Joined:
    Jan 29, 2019
    Posts:
    7
    Hello raoul.

    I created the Y intersection using custom prefab.

    Does the custom prefab not change according to the width of the road, like the dynamic prefab?

    I want to visualize it using road GIS data, and roads have different widths.
     
  29. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,298
    Hi Barikli,

    The Indent values require a minimum value based on your terrains heightmapscale (size vs heightmap resolution). This minimum values is needed so there are enough terrain points available and guarantee the best possible terrain deformation matching the road shape. What are your terrain specs and what is the lowest Indent value in your scene?

    There is no limitation for the Surrounding values, you should be able to set that to 1 regardless the terrains heightmapscale.

    Thanks,
    Raoul
     
  30. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,298
    Hi Unity_LoDiCS,

    Custom prefabs are based on the imported mesh. They will indeed not update to the width of connected roads. The idea behind the custom Connection system is to make it possible for artists to create their own intersection / connection meshes and use them within the system. In that scenario the width of the connections will probably already match that of the roads that will connect.

    The new v3.2 Flex Connector can be used for Y crossings with flexible angles and will be build based on the involved road types. v3.2 is available in betas on our website.

    Thanks,
    Raoul
     
  31. Unity_LoDiCS

    Unity_LoDiCS

    Joined:
    Jan 29, 2019
    Posts:
    7
    Thanks raoul.

    I want to create a Y-intersection of different widths. However, the dynamic prefab cannot create the Y intersection at runtime.

    Is there any solution in this case?
     
  32. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,298
    Different widths, does this involve two different road types or three?

    The new Flex Connector is indeed not yet available at runtime, but it can be added. Have you tested it in the Unity editor just to see if it does what you need? In that case I will make a note to update the scripting API for the next beta and add an option to turn a crossing into a Flex Connector.

    Thanks,
    Raoul
     
  33. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,298
    First of all please have a look at the new road type options. Nodes can be added that define outer line markings. This will be used on crossings and will deal with the ugly line shape at the road edges in the corners in your images. The Default road type in the beta demo scene can be used as a reference.

    Regarding the connection breaking, do you get error messages? Does the same happen in the demo scene? This bit should be fairly stable but it looks like the road type is not fully 3.2 ready. Which beta are you using?

    Thanks,
    Raoul
     
  34. Unity_LoDiCS

    Unity_LoDiCS

    Joined:
    Jan 29, 2019
    Posts:
    7
    I use Easyrods3D v3.2b5.

    This error message appears when I edit the intersection.

    Must be non-negative and less than the size of the collection.
    Parameter name: index
    System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgumentResource resource) (at <ac823e2b42b42b4679a453>
    System.ThrowHelper.ThrowArgumentOutOfRangeException (at <ac823e2b42b41bda67924a0173c3>:0)
    System.Collections.Generic.List'1[T].get_Item (System.Int32 index) (at <ac823e2b42b41bda67924a45a0173c3>:0)
    EasyRoads3Dv3.ERCrossings.ODOOCQCDQC (System.Boolean rebuildRoads) (at <5a923e59458f4b1086bcff3bca06d3>:0)
    EasyRoads3Dv3.ERCrossings.OCOODOOQOD (System.Boolean sidewallkSceneHandleFlag, System.Boolean rebuildRoads) (at [5a923e59458f4b10ccp3c03d)
    EasyRoads3Dv3.ERCrossings.Refresh (at <5a923e5458f4b1086cff3bca06d3>:0)


    I'll try the new road type options.
    Thanks raoul. :)
     
  35. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,298
    Similar errors were raised in beta 5 when pulling out new roads from an existing Flex Connector or from another road. This is fixed in beta 6 which was released last week.

    Using beta 6, I just tested similar steps:

    1. Add a T crossing and connect roads
    2. Turn it into a Flex Connector in the Inspector
    3. Move the crossing

    The crossing and attached roads update without errors. Could you try beta 6?

    Thanks,
    Raoul
     
  36. Unity_LoDiCS

    Unity_LoDiCS

    Joined:
    Jan 29, 2019
    Posts:
    7
    Thank you for your answer, Raoul.

    But I can't find Beta 6.

    The latest version of the homepage is v3.2.b5.

    version3.2.b5.png
     
  37. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,298
    Ah, sorry beta 6 is indeed not available yet.

    Can you reproduce the same problem using the steps in my previous posts? In that case the problem is perhaps related to creating the crossing and roads through the scripting API.

    Or, is the road in your image the original Primary road type in the demo package or did you create this road type using the same material? In that case, was this road type create using v3.1 or the 3.2 beta?

    The question in your last post is relevant for X, T crossings, it is not used for the Flex Connector.

    The alignment status in your screenshot is Off. The handle would be white and larger if it would be on. Or is it indeed toggled on after attaching the crossing through a script? What code do you use? For example:

    ConnectToStart(ERConnection connectionObject, int connectionIndex, bool autoAlign)

    autoAlign will toggle this option on.

    Thanks,
    Raoul
     
  38. 40detectives

    40detectives

    Joined:
    Apr 9, 2016
    Posts:
    74
    I've been searching a bit with no success, so I'll try to ask here:

    Is there anyway to calculate the best route/path of a road? If you have played some racing games you probably have seen them showing the best line you could follow in a given road to do the best trajectory.

    If not something inside EasyRoads3D maybe some ideas to help calculate it?
     
  39. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,298
    Hi Unity_LoDiCS,

    In the first image the outer line markings are still not smooth. I guess this is not using the v3.2 road type options that control this?

    The second image appears to be a standard T Crossing or perhaps a Flex Connector that was repositioned / rotated at runtime? Flex Connectors are not yet supported through the scripting API.

    Thanks,
    Raoul
     
  40. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,298
    Hi 40detectives,

    That is not inside EasyRoads3D. The tool is primarily a road creation tool, but with the AI options expanding in v3.2 something like this will also be added at some point. There must be resources available related to this both in general and Unity related. Have you searched on "racing AI" or something like that?

    Thanks,
    Raoul
     
  41. Barikli

    Barikli

    Joined:
    Jul 24, 2017
    Posts:
    6
    My Minimum indent and surrounding values are 5.

    heightmap resolution 513.
    terrain width and height are 250.

    when i changed heightmap resolution to 33, the minimum indent values increase to 11, so i changed heightmap to higher value but it's still always 11.

    i am trying to make supercross track.
    can u help me how should i do to make the minimum indent values to 1?

    thanks.
     
  42. KeithVRMC

    KeithVRMC

    Joined:
    Jan 24, 2019
    Posts:
    1
    Hi @raoul, can you check you PM for a question I have for you?
     
  43. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,298
    Hi Barikli,

    Heightmap resolution 513 and terrain width / height 250 should result in a fairly small minimum required Indent value. Are you perhaps looking at these values in the road type settings?

    General Settings > Scene Settings > Default Indent

    When entering 0 it will be set to the minimum required indent value, that should be somewhere between 0.5 and 1 with your terrain settings. When starting new road objects the Default Indent will be used.

    Thanks,
    Raoul
     
  44. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,298
    Hi Keith,

    I just replied to your email.

    Thanks,
    Raoul
     
  45. SamBillingsley

    SamBillingsley

    Joined:
    Mar 15, 2019
    Posts:
    1
    I need to add a 1.5 meter grass strip between my curb and the sidewalk. What would be the best way to accomplish this, side objects, custom connectors, or something else?
    Thanks,
    -Sam
     
  46. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,298
    Hi Sam,

    Easiest is probably to have the grass strip part of the sidewalk material. Custom connectors will give most control over the shape of the sidewalk and grass strip on crossings. Adding the grass strip as a side object is a good option if the grass strip will only be part of road sections, not on crossings.

    Thanks,
    Raoul
     
  47. Unity_LoDiCS

    Unity_LoDiCS

    Joined:
    Jan 29, 2019
    Posts:
    7

    Raoul, you're right.

    After changing to flex connector, I moved the intersection during runtime.

    And I think I did wrong on 3.2 road type. I'll watch the tutorial once again and work.
     
  48. Barikli

    Barikli

    Joined:
    Jul 24, 2017
    Posts:
    6
    General Settings > Scene Settings > Default Indent.
    this is the best way to solve my problem.

    Thank you so much.
     
    raoul likes this.
  49. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,298
    Hi Unity_LoDiCS,

    I will test this and make the new Flex Connector ready for the scripting API as well, including an option similar as the "Flex Connector" checkbox in the Inspector. This will be part of the next 3.2 beta.

    Thanks,
    Raoul
     
  50. DRRosen3

    DRRosen3

    Joined:
    Jan 30, 2014
    Posts:
    645
    It seems the "Add Shape to Terrain Splatmap" doesn't work properly. I've played with the values in all possible ways and combinations, and in no instance does the road ever properly "blend" its edges with the pre-existing terrain splatmap texture.
     
unityunity