Search Unity

World Building EasyRoads3D v3 - the upcoming new road system

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

  1. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    It seems that an image is missing with the location is missing?

    I just tried the "CT_Inter_4L_X_SW_ER" prefab, no errors.

    marcell.jpg

    Is indeed the latest build I sent still imported in this project? The error in the link is also side object related and looks similar as the one you posted last week.

    Thanks,
    Raoul
     
  2. marcell123455

    marcell123455

    Joined:
    Jun 18, 2014
    Posts:
    275
    Hi Raoul,

    Yes, the lastes build is correctly installed, I checked it again.
    The image I mentioned was that one from your post.



    I just can´t imagine why you can´t replicate this...

    Well, I have no other ideas yet. However, it is still possible for me to use the tool besides the errors, it still seems to generate the roads and sideobjects correctly. For new created roads at least.

    When I switch the roadtype of one of my exiisting "4L_Road_Sidewalk" roads and switch it back, my dual lampposts sideobject x position does not apply correctly for the first or last object.


    Also as I mentioned earlier, when you expand a enabled sideobject at a road it shows two "X Position" settings.

    This is everything I noticed. Now I have no more ideas...

    Thanks
     
  3. marcell123455

    marcell123455

    Joined:
    Jun 18, 2014
    Posts:
    275
    The dual lamppost sideobject seems to use the left x offset also for the right object... but only for the last one.
    I also found a other small thing. My busstop end offset is set to -20. This seems to be more than the space between the second last and last node here, and if it doesn´t have the space, it seems to snap to the end. This seems not correct. and sorry I recorded Spotify too ^^

     
    Last edited: May 17, 2021
  4. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Yes, that is what I am doing, creating new roads. So you are saying that actually works well for you too?

    If this happens with existing roads, then which specific roads?

    The double "X Position" control does not cause any issues, changing one also changes the other, but I will check that.

    I mentioned this in another post, your side objects are set up to not spawn any mesh object. Instead it spawns objects empty game objects with scripts attached. I quess the actual objects are spawned later through code. It makes it hard to test what you are showing in the video. Can you provide exact steps of what I have to do to actually see the spawned objects?

    Thanks,
    Raoul
     
  5. marcell123455

    marcell123455

    Joined:
    Jun 18, 2014
    Posts:
    275
    Hi Raoul,

    I still get index out of bounds errors when creating new 4L_Road_Sidewalk or 2L_Road_Sidewalk and placing nodes, but the generated road and it´s sideobjects seem fine(if the road is long enough?), so I can live with it for now. It happens only with these road types. Adding new nodes to already existing roads isn´t a problem, but the sideobjects are not updated. for these roady yet.

    Ok I maybe found the cause:

    I mean. These errors started to appear after I changed the start and end offset of my dual lamppost, hydrant and busstop spawner sideobjects.

    I did a other test right now and I would say the errors only appear if the nodes are very close to each other. If they have a decent amount of space, they wont cause errors. As you could see in my video from the last post, The busstop object was snapping to the end if the end offset was big enough...maybe this has something to do with it...

    Short space between nodes causes errors. Big space works.


    To see the actual props you can press play and drive arround or search for the "Sphere" gameobject in the hierarchy (that is a child of the car gameobject) and move it in playmode. All sideobjects will be active within this area.

    Thanks
     
  6. raoul

    raoul

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

    See below the last test with short marker distances following what you wrote, all good.

    marcell.jpg

    Short node distances. I changed both the start and end offset to larger and smaller values. There are no errors.

    I sent an email earlier today. Last week we instantly fixed the issue after I was able to check the error. Can we do that again by looking at the scene? Otherwise can you give exact steps for a specific road in the current scene what I should do to reproduce the problem?

    Thanks,
    Raoul
     
    marcell123455 likes this.
  7. Lautaro-Arino

    Lautaro-Arino

    Joined:
    Sep 18, 2013
    Posts:
    93
    Hello Raoul!

    Thanks for a great product! Im switching to your solution in the middle of a project because the previous tools did not seem to work as they should. However after reading the documents and tutorials i still have some confusion. What i need to do is this:

    1. Simple flat road with no height differences
    2. Different road segments with different decours on the sides like street lamps, buildings or overhangs (Just prefabs with meshes really)
    3. Procedurally add to the road in front of the player and removing after the player
    Ive managed to make a road longer by code so that seems to work. I looked at the ER Runtime demo scene. Ive also learned to do different road types with different side objects. So one type has street lamps. The other has buildings... etc
    Now what is left is a couple of doubts.

    1. When i add a segment by code like in ER Runtime demo, can i use one of the road types i have made in the editor? Or do i have to program the road types i want to use programatically?
    2. Same question as #1 but with side objects. Can i configure the side objects in the editor but use them through code?
    3. Is it possible/reasonable to create new road procedurally? Maybe its to demanding. Will the side objects be instantiated or can they be reused?
    4. If its not reasonable performance wise to add to a road at runtime and create new segments by road type maybe it would be possible to have prepared a couple of roads and move one of them to the end of the road when the player is getting close and then keep doing that as the player advances?
     
  8. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi Lautaro-Arino,

    Thank you, glad to hear you like the tool.

    That is possible by using the road network object that is already in the scene. In your code the new road network constructor will create a reference to this already existing road network. GetRoadTypeByName(string name) in the ERRoadNetwork class can be used to get the road network.
    The same for side objects, GetSideObjectByName(string name).
    Yes, that is possible although of course it is more demanding, generally you want to avoid for example creating Procedrual side objects along very long roads. The new v3.2 auto generate option based on the road shape and terrain profile can be useful here.

    And side objects can also be activated for the specific road type inside the Unity editor. With that setup there is no need for side object specific runtime code.
    I would first try the above and see if that works. If it is not reasonable you could try what you suggested but that will not involve the EasyRoads3D API, the terrain will not be adjusted to the roads.

    Thanks,
    Raoul
     
  9. Lautaro-Arino

    Lautaro-Arino

    Joined:
    Sep 18, 2013
    Posts:
    93
    Thanks for the quick reply!
    I have a confusion though. My idea was to create a base track in the editor and then add to it programatically. But i cant seem to get a hold of the network and road object unless they are created by code at first. If i create everything by code i know how to do it, but if its already created in the editor in dont know how to since they are not monobehaviours.
     
  10. Lautaro-Arino

    Lautaro-Arino

    Joined:
    Sep 18, 2013
    Posts:
    93
    Another question, this may seem a bit silly but im working on something that has retro 80s style racer mechanics and as such im not really using the physics, only to detect collisions. As triggers. Or that was my idea. But a quick try now gives unexpected results since i think most of the autogenerated road, side objects and such are meant to be used in a traditional unity way using its physics simulation. So maybe i am better off switching to doing it like that instead?
     
  11. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Have you tried this:

    Code (csharp):
    1. ERRoadNetwork roadNetwork = new ERRoadNetwork();
    2. ERRoad road = roadNetwork.GetRoadByName("road name");
    3.  
    4. or
    5.  
    6. ERRoad road = roadNetwork.GetRoadByGameObject(object);
    By default MeshColliders are attached to the roads, that is probably what you want, but you are free to remove them or change this in any way you like.

    Thanks,
    Raoul
     
  12. dschu

    dschu

    Joined:
    Dec 10, 2019
    Posts:
    5
    Hey there!

    I recently bought ER3D and really like the tool & its workflow. However, one thing I don't understand is how to update a dynamic prefab that has already been instantiated.

    What I do is:
    - Place some roads and connect them using a Dynamic X Crossing Prefab
    - Decide to add some details, like traffic lights to the dynamic crossing prefab:
    -- Open the prefab, place the new objects, hit save
    -- Select the root object of the prefab to find the 'ER Crossing Prefabs' Script.
    -- Hit "Refresh Scene Instances"

    After hitting that button, a process bar appears, indicating that something is happening. However, the child objects are not updated / created. The only thing that happens is, that all roads that once were connected to that prefab are disconnected after hitting that button.

    Is there something wrong with my workflow / roads?
    Right now, once I've updated the prefab, I go all around the terrain to remove the crossings and re-add them.

    Thanks for the tool! I'm very happy with the feature set!
     
  13. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735

    Hi dschu,

    Glad to hear you are happy with the tool and the feature set!

    "Refresh Scene Instances" will update all scene instances accroding crossing specific changes like the corner radius.

    Above this button there is a "Update Childs in Scene Instances" button. This will do exactly what you are looking for. Have you tried that?

    Thanks,
    Raoul
     
  14. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    hopeful and dschu like this.
  15. Formina

    Formina

    Joined:
    Jun 9, 2015
    Posts:
    1
    Hi Raoul, thanks for a fantastic asset and the updates so far on it. I bought it several years ago; and have tried to update it to 3.2.0f3 from the asset store, however, it seems to only want to download an older version despite my asset store download page stating that it's 3.2.0f3. The beta version included in the package seems to be older as well. Is there something else that I need to do in order to get this latest version? See pic below for what my asset store download page looks like. The version that keeps downloading is v3.1.9f6.

    upload_2021-5-23_0-2-48.png
     
  16. raoul

    raoul

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

    Thank you, glad to hear you like the tool.

    I don't know what the status of that currently is because I have not seen this happening lately, but what you describe is / was a known issue of the Package Manager import.

    Can you try removing the the v3.1.9f6 version from your local folder. On windows this is the location:

    C:\Users\[accountName]\AppData\Roaming\Unity\Asset Store

    or

    C:\Users\[accountName]\AppData\Roaming\Unity\Asset Store-5.x

    And then import the latest version once again.

    Raoul
     
  17. claudius_I

    claudius_I

    Joined:
    May 28, 2017
    Posts:
    254
    Hi

    i have a problem, I dont know how to modify the connection for my new road.

    I want to keep the original size


    thanks
     

    Attached Files:

  18. raoul

    raoul

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

    Are you using road types? When the road on the right is based on a road type, it is possible to create a matching connection prefab. This is done in "General Settings > Road Types", the "Create New Connection Prefab" button below the material options. The connection will inherit the road type settings including the width. And this way the connection prefab can auto update according possible changes to this road type in a later stage.

    Thanks,
    Raoul
     
    claudius_I likes this.
  19. PrimusThe3rd

    PrimusThe3rd

    Joined:
    Jul 3, 2017
    Posts:
    69
    Hello, the new 3.2 version looks awesome. I have a quick question. How can I place walls ob both sides of the road? I have made a nice wall example (see attached picture, but now I can not replicate the same settings any more. Can somebody help me, please, > How to make a (left/right) wall beneath the mountain road...Thx.
     

    Attached Files:

  20. raoul

    raoul

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

    Did you make this side object or is it based on the Retaining Wall example in the demo package?

    The example in the demo packages uses the new v3.2 options. "Dual Sided", this option is visible in the Side Object Manager when the side object is positioned relative to the left or right side of the road instead of to the center.

    This works for both auto generated side objects based on rules as for manually places side objects. For manually placed side objects two sets of controls will be available in the road settings, for the left and right side.

    Does that match your setup? Are you walls manually placed or auto generated based on rules, the terrain profile?

    Thanks,
    Raoul
     
  21. mtdev01

    mtdev01

    Joined:
    May 17, 2017
    Posts:
    10
    Hello Raoul

    I am attempting to understand ConnectToStart / ConnectToEnd and have made a fair amount of progress over the last few days. However, it seems that the road is connecting all of its vertices to 1 vertex on the connector. Can you advise how to correct this?

    Thank you
     

    Attached Files:

  22. PrimusThe3rd

    PrimusThe3rd

    Joined:
    Jul 3, 2017
    Posts:
    69
    Hi, yes I've started completely from the scratch..haven't look Demo scene at all. Will investigate more... but more I learn more it gets complicated. So at the moment I'm happy with my first results..but still no clue how I done it there (doy ou know which wall prefab was used..to start exploring from that part). I have just made an export build and then start mixing with other samples in the project ... but obviously it could be done. :) Regards.
     
  23. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hello mtdev01,

    It seems a custom connection is involved here, a connection based on an imported model, is that correct?

    In the image a standard road shape is visible, probably two nodes, and a connection with sidewalks.

    Inside the Unity editor it is not possible to connect roads and connections that do not match. You are using the scripting API to connect roads and connections. Please make sure to use similar logic and only connect roads to connections when the two shapes match.

    What does the connection look like? Are the sidewalks part of the connection? How is this used in your road network? Do all connections / roads have these sidewalks? In that case, please create a new road type in the Custom Connection Editor window with one of the connections with sidewalks active. The connection shape will be stored in the road type. Then in your code create the road using this specific road type.

    Thanks,
    Raoul
     
    mtdev01 likes this.
  24. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735

    Hi PrimusThe3rd,

    I will need more details to give exact feedback. The new demo package includes a "Retaining Wall" side object that looks like the one in your screenshot. You can check the setup. Especially the "Position" control which is set to "Relative to the right side of the road", that way "Dual Sided" below this control is enabled. It is checked.

    This side object is set up to be auto generated, so that is what will happen when activating it on a road. But if you look in the Side Object Marker Settings of the road you will also see the two sets of controls for both sides of the road. Toggle off "Dual Sided" and you will only see one set of controls.

    Let me know if you cannot get this working on your wall side object.

    Thanks,
    Raoul
     
  25. tredpro

    tredpro

    Joined:
    Nov 18, 2013
    Posts:
    515
    hello! so i this is probably my favorite road building asset but having to set up simple traffic system afterwards is a pain. cidy2 has it integrated and i have found myself using it even though i prefer roads from here. there are times where i still use this but was hoping you could integrate simple traffic system so i can save some time and go back to building most of my roads with this.
     
  26. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hello tredpro,

    v3.3, in beta and available on our website and already used in the additional free demo package, includes new road type options. Lane info can be set, the lane count and the direction of each lane. Lane data will be created accordingly on both roads and intersections.

    The beta also includes a simple AI script. And there are already several traffic systems on the Asset Store that support this new system.

    Thanks,
    Raoul
     
  27. tredpro

    tredpro

    Joined:
    Nov 18, 2013
    Posts:
    515
    sorry i dont understand. are you saying you already have simple traffic system integrated?
     
  28. tredpro

    tredpro

    Joined:
    Nov 18, 2013
    Posts:
    515
    https://assetstore.unity.com/packages/tools/ai/simple-traffic-system-159402
     
  29. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735

    A simple AI script is included in the beta package :) I received your request for access to our website downloads and just replied to it. The beta on the downloads page includes a small demo scene. In Play Mode you will see objects following the roads.

    On the Asset Store it is at least supported by :
    https://assetstore.unity.com/packages/templates/systems/its-intelligent-traffic-system-23564
    https://assetstore.unity.com/packages/tools/ai/ultimate-traffic-controller-110492

    Thanks,
    Raoul
     
  30. tredpro

    tredpro

    Joined:
    Nov 18, 2013
    Posts:
    515
    Yes but simple traffic system is a more up to date and affordable traffic system and is the one im using. So what I was asking was if you could add integration with it? My traffic system is a higher priority for me over my road tool so I've been having to cut this tool out as I can get a lot more work done using cidy as it handles the traffic for me.
     
  31. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Generally it works the other way around. Since v3.3 is still in beta we are not actively contacting Traffic system developers yet, but if they already want to add support then we will help where we can.

    So, if STS is the one you want to use, then you may want to contact the developer if you have not already done that.

    Also, the solutions in my links are either similarly priced or more affordable and, looking at release dates, well maintained.

    Thanks,
    Raoul
     
    Last edited: May 31, 2021
  32. tredpro

    tredpro

    Joined:
    Nov 18, 2013
    Posts:
    515
    I understand. Ive been trying to contact both sides on this since I made the choice to go with sts. I will probably still use er3d for my non city roads though. It has a lot of features I really like
     
    raoul likes this.
  33. tredpro

    tredpro

    Joined:
    Nov 18, 2013
    Posts:
    515
    Also could you maybe add a feature that when you final build your roads you can have it center the pivot of each piece? With parts being at 0,0,0 i have to go through and alter ever piece so its pivot is actually on the road. Otherwise the road won't load unless player is at 0,0,0.
     
  34. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    This option is available in the scripting API in the ERRoadNetwork class, CenterPivotPoints(). I will make a note to also add it to the Build / Finalize options inside the Unity editor.

    And apologies, I didn't realize you already was referring to STS in your first post, I read it as if you were looking for a simple traffic system.

    Thanks,
    Raoul
     
  35. tredpro

    tredpro

    Joined:
    Nov 18, 2013
    Posts:
    515
    Oh my. I must have over looked that. I literally spent multiple hours doing this manually. Thank you
     
  36. hakankaraduman

    hakankaraduman

    Joined:
    Aug 27, 2012
    Posts:
    354
    Hi raoul, is there a video that showcases how to import open map road data and generate roads automatically on the terrain? Thanks
     
  37. raoul

    raoul

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

    There is no video, but it is simple:

    1. Download the map from www.openstreetmap.org

    2. The roads data will be generated relative to the terrain bounds. When the terrain bounds does not match the road data bounds, the terrain bounds can be entered in the respective latitude longitude fields

    3. EasyRoads3D road types can be assigned to OSM road types

    4. Open the OSM file, the roads will be generated

    Intersections are not yet auto inserted because real world situations can be quite complex. This is being worked on in v3.3

    Are you looking for something specific?

    Thanks,
    Raoul
     
  38. lilacsky824

    lilacsky824

    Joined:
    May 19, 2018
    Posts:
    171
    Hi! Can I hide specific part of road?
    Because I want use side object to spawn stair mesh in specific part of road. But I can't hide road.
    Any good idea?:p
     
  39. raoul

    raoul

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

    What exactly should this look like?

    The below two options could work.

    Use different vertex colors per marker and a shader that will tale the the vertex colors as input and make parts of the road transparent.

    Or, I Connectors can be inserted for road sections that should be hidden. This will cut the road object in sections preserving the original road shape and the terrain will still be adjusted to the road shape. The meshfilter / meshrenderer component can be removed for those sections that should be hidden.

    Thanks,
    Raoul
     
    lilacsky824 likes this.
  40. PrimusThe3rd

    PrimusThe3rd

    Joined:
    Jul 3, 2017
    Posts:
    69
    Hi,
    yes I see the wall in demo scene...but no Retaining wall in my scene! But it was there (obviously as it is in my exported build and seen in my previous posts). Regards.
     
  41. PrimusThe3rd

    PrimusThe3rd

    Joined:
    Jul 3, 2017
    Posts:
    69
    Here are the screenshots..one from demo scene and one from my scene. Thx.
     

    Attached Files:

  42. raoul

    raoul

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

    Do you mean, the specific Retaining Wall is not available in your road network?

    What is the history of this scene? If you imported the demo package after creating this road network then indeed the demo package side objects will not be available by default in this road network.

    Side Object Manager > Add Project Side Objects

    Is the Retaining Wall side object visible in this list and, in that case, can you add it ?

    Thanks,
    Raoul
     
  43. victorkin11

    victorkin11

    Joined:
    Apr 20, 2013
    Posts:
    175
    Hi

    I do want to buy this asset, since my tight budget, I would like to know is there any discount coming?
    if this month isn't any sales, then I will going to buy it now! Thank you!

    victor
     
  44. PrimusThe3rd

    PrimusThe3rd

    Joined:
    Jul 3, 2017
    Posts:
    69
    Hi, retaining wall is only ready to be removed (screenshot)..but not availabla to be used in the scene.
    I don't understand why "demo side objects will not be available by default in this road network" if I imported demo package after creating road network. I don't remember the procedure, though..but might be the case...
    Regards, Primoz
     

    Attached Files:

  45. raoul

    raoul

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

    We always join promotions by the Unity Asset Store. But I am not sure when the next one is.

    Thanks,
    Raoul
     
  46. raoul

    raoul

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

    In your image the title of the window says "Manage Project Side Objects". In this window side objects can be removed from the project.

    In my previous post I mentioned "Add Project Side Objects", the button above "Manage Project Side Objects".

    That may not be what you want especially in projects with many scene specific side objects. Do you want newly imported side objects to be added to each road network automatically in that case?

    When creating a new road network, you will be asked if you want to import all side objects. That is why I asked about the history of the scene.

    Thanks,
    Raoul
     
  47. PrimusThe3rd

    PrimusThe3rd

    Joined:
    Jul 3, 2017
    Posts:
    69
    Yes... now it's there, back again! I don't remembering removing it. If it is there for removing it, then should be there for using it as well. :)
    Retaining wall is indeed on of the best walls. Many thanks Raoul!
    PS
    I would like to add a bike texture on the road to indicate the road to be a bike path. I guess it is quite easy task in this version. Any guide how to do that?
    Regards,
    Primoz
     

    Attached Files:

  48. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Glad to hear that worked!

    Regarding the bike texture, it depends on how this will be used. Will it always be part of the road? In that case you probably want to add it to the actual road texture.

    Alternatively it could be added as a side object on top of the roads similar to the road shoulder side objects for the motorway in the demo package.

    Thanks,
    Raoul
     
  49. PrimusThe3rd

    PrimusThe3rd

    Joined:
    Jul 3, 2017
    Posts:
    69
    Hi, I'm thinking about adding decals (biker icon) onto the road textures. No clue how to do that, yet. Any video tutorial would be great. :)
    Regards,Primoz
     

    Attached Files:

  50. raoul

    raoul

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

    For adding the bike track as separate objects, please check my previous post, the road shoulder side object :)

    Thanks,
    Raoul