1. Help us improve the editor usability and artist workflows. Join our discussion to provide your feedback.
    Dismiss Notice
  2. We're looking for feedback on Unity Starter Kits! Let us know what you’d like.
    Dismiss Notice
  3. We’re giving 2017.1 beta testers a chance to win t-shirts and a Nintendo Switch. Read more on the blog.
    Dismiss Notice
  4. We want to know how you learned Unity! Help us by taking this quick survey and have a chance at a $25 gift card
    Dismiss Notice
  5. Unity 5.6 is now released.
    Dismiss Notice
  6. Check out all the fixes for 5.6 on the patch releases page.
    Dismiss Notice

EasyRoads3D v3 - the upcoming new road system

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

  1. Marco-Sperling

    Marco-Sperling

    Joined:
    Mar 5, 2012
    Posts:
    516
    Yep, that is the intended use of such shader in our case.
    Thanks for sending your package anyway, I like to see another approach.
     
    raoul likes this.
  2. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    2,742
    While going through some older projects over the weekend I noticed an experimental shader covering all this as well. It uses decal:blend resulting in full transparency while shadows are still visible.

    Below is a test after updating the shader to Unity 5 "Standards". Please ignore the dirt texture quality, this is from the development project. The right side edge blends with the terrain.

    dirtshadows.jpg

    Thanks,
    Raoul
     
    Last edited: Jun 13, 2017
    Marco-Sperling likes this.
  3. HansKPersson

    HansKPersson

    Joined:
    Nov 19, 2016
    Posts:
    4
    hello,
    I'm kinda curious what next update for V3 will bring, and is it possible for a more detailed video Tutorial? still don't understand the custom Prefabs for X and T crossings would like a Dual X crossing for dual 2way highway. and maybe texture for Crossing with the Lines and stop lines? have lots on my wish list but its mostly an city generator that helps with the road :)

    Many Thanks again for a Great addon
     
  4. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    2,742
    Hi HansKPersson,

    At the moment almost all the work is done on the new demo project which will include examples of everything you can do with v3. New proper video tutorials will also follow based on this new demo project.

    What exactly do you mean with custom prefabs for X and T crossings? The custom prefabs system involves importing your own mesh assets into the system. These can have any type of shape, not necessarily X or T crossings. The Custom Road Network videos in the manual (or for example here) show this process.

    The dynamic crossings system will be further expanded with more options for X and T crossings and for example an Y connector. But that will happen after the public release. Meanwhile you can do specific crossings for your project using this custom prefab system. It was one of the first things that was implemented so you do not rel on what is part of the system itself. There are so many different type of situations...

    Thanks,
    Raoul
     
  5. HansKPersson

    HansKPersson

    Joined:
    Nov 19, 2016
    Posts:
    4
    Sound good,

    sorry for the bad clarification of what I'am asking about its the Easyroad 3D Application to make custom prefabs, think i seen the video part about 50times and no stick, looks easy but all i'm able to do is broke copy's of existing, but will try to challenge it more. but often easier with speech in tutorials.

    other then that Im good.

    many thanks for quick reply
     
  6. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    2,742
    Creating new dynamic X T crossings so you can quickly resuse them is done through:

    General Settings > Crossing Connection prefabs

    Below is the link to the section in the manual that covers this process:

    http://unityterraintools.com/EasyRoads3D/v3/html/general_settings.html#sceneprefabs

    and the corresponding video:




    Could you give more details of what goes wrong on your end?

    Thanks,
    Raoul
     
  7. HansKPersson

    HansKPersson

    Joined:
    Nov 19, 2016
    Posts:
    4
    Many thanks for the video, did miss that Preset and did think was weird I only had 2x2 highway road to pick, and some things is easier to learn then others and thing i never learn is to use Pictures then asking about something, ES.jpg
    it this thing I would want an crash-course in, preferable from quick create to make it possible to use as an connector, but now my lazy natures is showing, but this item is not an priority at this moment can do most of my planed things with existing items. and already learned 95% of the things i was missing. many thanks again Raoul,
     
  8. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    2,742
    As mentioned in my previous post, when it comes to roads and crossings, there are so many different situations. It is impossible to offer everything at once. The system is flexible, you can create your own road types: General Settings > Road Types

    What you see in the provisional beta package are examples of road types, dynamic crossings, custom prefab connections based on imported meshes. The final package / separate demo project with additional side objects will include a lot more, it needs to be cleaned up but the size of the project at the moment is 6GB.

    That screenshot is actually the custom prefab system I refered to in my first post. This is based on imported meshes.





    http://unityterraintools.com/EasyRoads3D/v3/html/general_settings.html#customcrossings

    This system makes it possible make any type of road network you want. It is recommended to start with a simple mesh model, perhaps even a quick Unity plane primitive. Add some connections by selecting vertices and test it in the scene. Once you are familiar with these steps you can try more complex meshes.

    Is there anything in the videos you have further questions on?

    This was in your first post. More on this will follow, but the crossing prefabs are ordinary Unity prefabs. You could add stop lines as decals. Or create your own crossing meshes.


    Thanks,
    Raoul
     
    Last edited: Jun 13, 2017
  9. mprivat

    mprivat

    Joined:
    Oct 12, 2014
    Posts:
    5
    I apologize if this is a question with an obvious answer but is the current beta for v3, 8.5.1? I just want to make sure I test with the latest possible.
     
  10. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    2,742
    Hi mprivat,

    That is right, 8.5.1 is the current version.

    There are a couple of small issues which you may run into when digging deeper in the tool. Those who reported these issues are working with up to date alpha builds with fixes. We can release an update but we try to focus on releasing v3.

    So, in general for anyone, with regard to updates please report issues you are having. If that doesn't happen I assume all is good. :)

    Thanks,
    Raoul
     
    mprivat likes this.
  11. claydamron

    claydamron

    Joined:
    Jan 31, 2017
    Posts:
    6
    Hey Raoul,

    Someone asked earlier if it was possible to update the resolution on a pre-existing road. You offered the following script as a solution:

    1. var roadNetwork = new ERRoadNetwork();
    2. ERRoad road1 = roadNetwork.GetRoadByName("Default Road 0022");
    3. road1.SetResolution(4);
    How would I go about using this to update resolution? By attaching it as a script somewhere?
     
  12. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    2,742
    Hi Clay,

    That script is for when you are using the scripting API, for example for runtime road creation or when you are writing extended editor functionality. It seems that is not what you are doing, or are you?

    Inside the editor itself you can change the resolution for the road type in General Settings > Road Types. You can also change the resolution of the selected road road directly in the Inspector, look for the "Resolution" field near the top and you may want to experiment with the "Angle Threshold" value just below the Resolution field, this can be used to reduce triangles while preserving the overall quality.

    Thanks,
    Raoul
     
  13. claydamron

    claydamron

    Joined:
    Jan 31, 2017
    Posts:
    6
    Changing the resolution/angle threshold from the Road Types section doesn't seem to update the existing road in the scene. In the Road Types section there is only one entry titled "Default Road."
     
  14. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    2,742
    What are the values?

    When I change these values, the verts and tris stats near the top in the Inspector below the road name update accordingly. Does that not update for you?

    You can use the Road Types section to create your own road types so you can quickly reuse them in the scene. The beta package comes with a selection of road types. It seems you clicked "No" when you were asked whether you want to import the example Road Types and side objects when you created the Road Network object. You can still import them by pressing the "Add Project Road Types" button.

    Thanks,
    Raoul
     
    claydamron likes this.
  15. claydamron

    claydamron

    Joined:
    Jan 31, 2017
    Posts:
    6

    Awesome, worked perfectly!
     
    raoul likes this.
  16. tryptic

    tryptic

    Joined:
    Nov 13, 2012
    Posts:
    27
    Hello Raoul,

    Sorry it took a while to get back to you, but this is the first of a few repro cases I want to give you for problems I'm having in 8.5.1 beta and Unity 5.6.1p2.

    Issue 1 - Dynamic crossing snaps to world 0,0,0 when added to road.

    Repro Steps:

    1) Create new project, import EasyRoads3D beta package 8.5.1.
    2) Create new terrain, set to 200x200m, center in world (X -100, Z -100)
    3) Create new road network, choose yes to all prompts, set to Default Road, width 10, and add.
    4) Draw U shaped road on terrain.
    5) Select marker at one end of the road U, and add T intersection (Connect to Dynamic Prefab).
    6) Turn off sidewalks on T intersection by clicking green markers at corner and sides
    7) Select marker at other end of road U
    8) add T intersection, it shows up at world 0,0,0 and stretches road behind it.

    No console error is generated.

    [​IMG]
     
    Last edited: Jun 19, 2017
  17. tryptic

    tryptic

    Joined:
    Nov 13, 2012
    Posts:
    27
    Issue 2 - "X" Crossing dynamic prefab does not appear in "Connect to Dynamic Prefab" list.

    Repro Steps:

    1..4) Same steps 1-4 from above post (3516)

    5) See Connect to Dynamic Prefab, "Default X Crossing" does not appear in list.

    (attached screen)
    [​IMG]
     
  18. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    2,742
    Hello triptic,

    Thank you for the clear repro. That is strange, all works fine with sidewalks on. But after switching sidewalks off indeed the T crossing is added near (0,0,0) when attaching the prefab directly to the selected road.

    I will check what causes this. Meanwhile, you can instantiate crossings exactly where you want though the 3rd tab from the left instead of directly attaching them to the selected road.

    Thanks,
    Raoul.
     
    hopeful likes this.
  19. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    2,742
    The road is a a little bit zoomed out, it is not clearly visible what the shape is.

    In general, by default all crossings should be visible for a new road. Once the road is attached to a crossing only those prefabs with connections that match the shape of that road will be visible. Does that explain your situation?

    Does it appear in the list for newly added roads like mentioned above? I just tested this and it does on my end.

    Thanks,
    Raoul
     
  20. tryptic

    tryptic

    Joined:
    Nov 13, 2012
    Posts:
    27
    Hi Raoul,

    I'm sorry can you clarify how that works? I click on the dynamic prefab, then click in the Editor but no prefab appears.

    I guess that's the part I don't understand. This was a new Default Road set to 10 width as described in the repro steps. My assumption would be that I could then connect T or X to either end. But in this simple example the Default X Crossing does not appear.

    Thanks,
    Heinz
     
    Last edited: Jun 20, 2017
  21. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    2,742
    Hi Heinz,

    On which dynamic prefab do you click, which object do you have selected in the hierarchy? What I meant was, if you have the main road network object selected in the hierarchy you will see the main EasyRoads3D toolbar in the Inspector. The 3rd tab from the left, the one with the X crossing icon, lists all available dynamic and custom prefabs in your project. Select one and do shift + click in the scene where you want to place that crossing.

    You can now attach matching roads to one of the crossing connections and/or you can pull out new roads from these connections.

    Can you try the above and instantiate the X crossing in the scene, can you attach the road to one of the connections?

    There is one small glitch known resulting in what you describe. Sometimes straight after creating a new road indeed that specific list with available crossing prefabs is empty, the list you mention, not the one in the crossings toolbar tab. A simple road deselect / reselect fixes that. It is not entirely clear when that happens, it didn't happen yesterday when I tested all this. Could you try that?

    Thanks,
    Raoul
     
    Last edited: Jun 20, 2017
  22. tryptic

    tryptic

    Joined:
    Nov 13, 2012
    Posts:
    27
    My apologies, the issue was shift-click that was my mistake. :) It worked and I could attach the road to it.

    Just deselect/reslect did not make the X intersection appear. However if I instantiated the X Crossing prefab & connected a road to it, then it started appearing on the list from there on.

    Thanks as always for your prompt responses!!
     
  23. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    2,742
    Ok, then this is indeed purely related finding connection prefabs matching the road.

    I tried some things. This seems to happen when creating a road with no road type selected from the dropdown. When doing that the list of matching crossings is not populated, neither upon reselect. Does that match your situation? I will check why this happens. Meanwhile you can use the other approach you tested, instantiating prefabs directly in the scene.

    In general it is good practise to work with road types which will illiminate this issue. You can also create new dynamic crossings with that road type selected for the connections. This way you can both easily create new roads of that road type in the scene and you can reuse the specific crossings.

    Thanks for reporting this!

    Raoul
     
  24. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    2,742
    Ok, then this is indeed purely related to finding connection prefabs matching the road.

    I tried some things. This seems to happen when creating a road with no road type selected from the dropdown. When doing that the list of matching crossings is not populated, neither upon reselect. Does that match your situation? I will check why this happens. Meanwhile you can use the other approach you tested, instantiating prefabs directly in the scene.

    In general it is good practise to work with road types which will illiminate this issue. You can also create new dynamic crossings with that road type selected for the connections. This way you can both easily create new roads of that road type in the scene and you can reuse the specific crossings.

    Thanks for reporting this!

    Raoul
     
  25. tryptic

    tryptic

    Joined:
    Nov 13, 2012
    Posts:
    27
    Hi Raoul,

    Ok this is my 3rd issue and is the most important of them.

    Summary: I built a large road network which was fine until it reached a certain size, but then as more roads were added it would no longer build completely, and build results were not consistent.

    I have made a short video with narration that shows the specific problem, as the project is too large to easily share. Please let me know if I can provide any additional information as this is blocking me on a project currently.



    Thanks as always for your time and help thus far!!
     
  26. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    2,742
    I don't think this is directly related to the size of the road network. There are no known issues with that, the new demo project for example, has over 150 roads and they all build well.

    At this point there are three things to check:

    1) Terrain Composer: It is not clearly visible from the hierarchy what the terrain setup is and I am not 100% familiar with Terrain Composer. But TC has an optional control to lock the terrain heightmap. I would think this is a universal setting and I cannot really match this with sometimes one area not being flattened and other times another area, but perhaps something to verify?

    Is this indeed a single terrain? Because you do have a specific terrain selected in the Build Settings instead of All Terrains. It seems this too is unrelated but just checking...

    2) Can you switch off "Hide White Surfaces" in Scene Settings and check these surfaces for the involved roads. Are they build correctly in Edit Mode, following the shape of the roads?

    3) When exactly does that error appear? Do all crossings look alright, especially those in critical areas? This is also with regard to the white surfaces.

    One strange thing in the video is that the terrain near the road that has focus in Scene View updates well. Was that coincidence or does this always work that way? I can't match this behaviour with how this works.

    Thanks,
    Raoul
     
  27. tryptic

    tryptic

    Joined:
    Nov 13, 2012
    Posts:
    27
    Turning off "Hide White Surfaces" checkbox seems to have fixed terrain building in those bad areas. And the console error no longer appears when selecting "Back to Edit Mode".

    If that was the issue all along, I'm going to lose my mind haha!
     
    Last edited: Jun 20, 2017
  28. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    2,742
    "Hide White Surfaces" should not affect terrain building by itself but it can be used to visualize how the terrain will be flattened. Is that where things do actually go wrong on your end? Do you still have the same issue when turning this option back on?

    Thanks,
    Raoul
     
  29. tryptic

    tryptic

    Joined:
    Nov 13, 2012
    Posts:
    27
    Sorry, to be clear, when I uncheck "Hide White Surfaces" and build the terrain/roads, they build correctly vs. they don't when this option is checked.
     
    Last edited: Jun 21, 2017
  30. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    2,742
    Yes, I think we are saying the same thing :)

    It is still strange though, that option has been there since the first beta. No issues with that have been reported before.

    We have an alpha build that includes some optimizations to the terrain building process. Could you email me or send a pm with your email if you like to try that.

    Thanks,
    Raoul