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
    Hi Fr2,

    Ok, 8.1 will probably be available by the end of the coming week.

    Thanks,
    Raoul
     
  2. raoul

    raoul

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

    Is that indeed the original concrete barrier part of the beta package (used on the race track example)?

    In that case could you do the following:

    1) Check the rotation values of the source prefab (both the parent and child object) in the assets folder? The rotation values should be 0

    2) Open the Mesh Editor window for this side object. Move the blue start / end offset handles so they snap to the respective vertices like in the below screenshot.

    3) Click "Apply"



    Does that solve the problem?

    Thanks,
    Raoul
     
    Last edited: Sep 4, 2016
    jimmikaelkael likes this.
  3. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    796
    Yes, they weren't exactly snapped to vertices. Problem solved, thank you very much sir! ;)
     
    raoul and hopeful like this.
  4. kaenna1

    kaenna1

    Joined:
    Feb 21, 2014
    Posts:
    4
    Hi, can rivers be created with the beta?
     
  5. raoul

    raoul

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

    The main demo scene in the beta package includes an example of how you can create rivers with v3 using the side object system. This uses target prefabs which can be Unity water prefabs or water prefabs like AQUAS on the asset store.

    Thanks,
    Raoul
     
  6. joe_ftg

    joe_ftg

    Joined:
    Nov 9, 2015
    Posts:
    50
    Hi, in 8.0 beta, changing the road width value of a selected road acts strangely. The inspector value always appears as 10, even though the road mesh looks like it has changed. If I actually set the inspector value as 10 though, the road mesh appears as 1m. Any thoughts?
    Cheers, Joe
     
  7. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735

    Hi Joe,

    I couldn't initially recreate this but after doing several tests I think this can be partially recreated. It seems to be related to changing the width and changing it back to the original width. This seems to fail, the road does not update (although Undo back to the original road width works fine). Was your original road with 10 and does a value of for example 10.001 indeed update the road? I will check this anyway.

    I cannot recreate the part where the Road Width value always stays the same (10 in your case). The value displayed in the Inspector always shows what is entered.

    Thanks,
    Raoul
     
  8. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    796
    Hi @raoul,

    One thing I'd like to ask:
    I'm currently trying to reproduce a real life race track, and in some curves it has asphalt plane aside the road.

    Is it possible to handle such a plane shape (following road shape and inclination) like the picture below with side objects and how ?

    curve.jpg

    I know it could be painted on terrain itself but I'd prefer to do this outside the terrain as the splatmap resolution isn't high enough to draw such things...

    Suggestions are welcome :)
     
  9. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735

    Hi jimmikaelkael,

    The new demo project includes examples how to do that.

    You can use the shape type of side object for that. You probably only need two nodes, laid out horizontally starting at (0,0) and aligned with the left / right side of the road.

    The B Key toggles on/off position handles at the shape nodes for the selected marker. By changing the node positions in Scene View you can create a shape like in your image.

    Use Path Normal for the Terrain Alignment for that side object so it aligns nicely with the track itself.

    Thanks,
    Raoul
     
    jimmikaelkael likes this.
  10. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    796
    Once again thank you very much for support! ;)
    I'm unable to locate this demo project... Where could I find it ?

    EDIT: Maybe there ? http://www.unityterraintools.com/downloads.php

    However I'm unable to get a serial number, EasyRoads never asked me to generate it as on the documentation and I can't find where to generate it...
    Is it possible that I send you my UAS invoice number in PM in order to get a serial ?
     
  11. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735

    Sorry, with "new demo project" I meant the final v3 demo project. It is not available yet. That is why I included further info on how to achieve that.

    You can get a serial number, just conatact me through a PM or email, including your email and asset store invoice number.

    Thanks,
    Raoul
     
    jimmikaelkael likes this.
  12. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    796
    No worries ;) I've sent you my serial request by PM just in case I need it later.

    The shape object method you described is just perfect:
    curve.jpg

    Another question, how do you insert a new marker between 2 existing markers ?
     
    raoul likes this.
  13. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    I just sent you a PM back.

    Good to see you already figured out how to do that :).The N key does the same for the road object itself. You can use it to make the track wider in some areas.

    To Insert a marker, select the road, move to the insert point and hit the I key. The shortcuts & Scene Operations section in the manual has more useful information on this type of operations.

    Thanks,
    Raoul
     
    Last edited: Sep 6, 2016
    jimmikaelkael likes this.
  14. joe_ftg

    joe_ftg

    Joined:
    Nov 9, 2015
    Posts:
    50
    Yes, 10.001 works so I think that is the case.

    I can recreate this easily in the example scene_main with these steps (Unity 5.4f03): add a new road of type Default_road, place it, change the width value, and then tab away from that value (it doesn't change while the value is highlighted in the inspector).

    A separate question, but at what point do the splatmaps get applied to the terrain?
    For example, with these settings (in the example scene_main), I would expect to see Splat 2 applied around the road when I press Build Terrain(s), but it doesn't appear to be happening.
    splatmap_snip.PNG
    splatmap_snip2.PNG

    Thanks, Joe
     
  15. raoul

    raoul

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

    Yesterday at one point I was experiencing something similar, no matter what you type, the value was reset to 5 all the time, again the initial value when creating the road object. I have to double check this today but it seems this has been fixed.

    Splatmaps indeed get applied when switching to Build Mode. Does the terrain get flattened according that road shape? This depends on the status of the "Terrain Deformation" control for that road. If this is off, this road mostly likely is part of a bridge segment or so, therefor no splatmapping will be done either. The splatmap controls should actually be disabled when that is the case, I will change that.

    Thanks,
    Raoul
     
  16. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    796
    To get back on this, have one marker which doesn't want to show it's shape nodes...
    Tried to insert a new marker to replace it and removed the problematic marker but it doesn't change anything I'm unable to access the nodes despite the fact it's toggled on.

    The problematic marker, I've only hidden terrain for the screenshots:
    Capture1.JPG

    The adjacent markers aren't problematic:
    Capture2.JPG

    Any idea ?

    Another thing I've noticed is that it does not seem to update the material after the inital setting...
     
  17. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735

    Hi Michael,

    That is strange, there are no errors or warnings?

    Did you insert the marker after or before that specific marker? Apart from the position, the inserted marker will inherit the settings of the previous marker.

    It is 11pm over here, tomorrow I will send you a script that will output additional info.

    Do you mean that changing the material of that Shape Side object in the Side Object manager has no affect after updating the scene instances? I will check that.

    Thanks,
    Raoul
     
  18. joe_ftg

    joe_ftg

    Joined:
    Nov 9, 2015
    Posts:
    50
    Hi Raoul, I've checked and the Terrain Deformation control is on and terrain does get flattened in build mode, so I'm not sure why the splats aren't changing in the example scene. (I added a second splat to the terrain object as the example scene only has one splat type - grass). It prints out "splatmaps" in the console though, as well as an error about failing to remove detail objects (even though that box isn't ticked). I assume I don't need to finalize to see the splat maps?

    Is there anything else you could suggest I try? Thanks, Joe
     
  19. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    796
    There's nothing in console.

    The marker replacement was inserted before the problematic one.

    Yes it's exactly that, other properties like uv tiling are updating fine.
     
  20. raoul

    raoul

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

    Indeed there is no need to Finalize.

    Yesterday before posting I double checked this in the Build project. The terrain indeed only has one texture assigned but you can add another /Assets/Standard Assets/Terrain Assets/Terrain Textures. That is what I did yesterday. After creating a new road networtk in the Test scene, I added a road, made sure that Terrain Deformation for the road is active, activated the splatmap feature and selected the newly added splat texture. The road shape was added to the terrain after switching to Build Mode. Could you check that in a new scene?

    And what is the exact warning message regarding detail objects?

    Thanks,
    Raoul
     
  21. raoul

    raoul

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

    I will send you a script today that will hopefully give more debug info.

    Regarding the material issue, I will check that, for now you can either deactivate/reactivate the side object for that road object or delete the specific game object in the hierarchy (child object of the road object). Change the road a little bit to rebuild the side object.

    Thanks,
    Raoul
     
  22. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    796
    Deactivate and reactivate it doesn't update the material, it's odd. The only way I've found is to create a new side object...
    In any case, I still can adjust the material after the road is built so I can live with it.

    The marker that won't show shape object nodes is more problematic :)
     
  23. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Yes, strange, even when creating a new road object and assigning this side object with the new material, the old material is still used.

    Regarding the shape nodes, I tried to recreate this but no luck so far. When you change the shape node positions on the markers before and after the critical marker, is the final shape between these two markers adjusted to those two markers as if the critical marker between the two is skipped?

    Thanks,
    Raoul
     
  24. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    796
    Nope it's not skipped... If I set the nodes at 10 meters on the 2 adjacent markers the critical markers still apply 0 at its node. So the node seems to be there despite the fact I can't access it.

    Any way I can export and give you my road ?
     
  25. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Ok, in that case this seems more an issue of displaying the handles in Scene View. If you want you can email me a download link for the project or a unity package with this specific scene stripped to this road only so I can look at it. That would be much appreciated.

    Thanks,
    Raoul
     
  26. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    796
    I've sent you a repro project by PM. Thank you very much!
     
  27. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Thank you, much appreciated!

    Indeed the node handles are not displayed but it does look different from the screenshots you posted.

    It seems the handles are all at (0,0).



    Anyway, I will check this.

    Thanks again,
    Raoul
     
    jimmikaelkael likes this.
  28. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    796
    As a temp fix and as a feature too, it would be great to get a combo with available nodes for a specific shape object when it's selected for a marker.

    I tend to prefer to set the values manually than with the visual nodes (especially when terrain is above road you can get hard time to select the nodes).
     
  29. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    You can already set the values manually in the Inspector (below the side object marker settings), but indeed you have to select the specific node first in Scene View. I can add a dropdown for node selection in the Inspector.

    That will indeed also solve this issue. It is related to the global shape node positions used to draw the handles. For that specific marker these values are calculated relative to the next marker (which obviously is wrong), that is why you cannot see them. Move the cam close to the next marker and select that critical marker, now you can probably see the handles.

    This issue is related to the controller type of that next marker (circular). If you change it to one of the other controller types the problem is fixed. This seems to be a bug in general that can be reproduced.

    Thanks,
    Raoul
     
    Last edited: Sep 8, 2016
    jimmikaelkael likes this.
  30. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    796
    That's funny because circular type on the next marker wasn't intentional (not in that place of the track at least), and as you mentioned as soon as I set it back to spline controller the node handles are back :). So for this part of the track it's solved, however I'll need it for other turns when circular type is used.
     
  31. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Yes, at first sight the circular segment seemed unnecessary for that section but I thought perhaps you were recreating a specific race track shape and the circular segment did what you needed :)

    This issue seems to be resolved but I have to do some more testing and code checking whether this affects other situations. Hopefully a new build will be available tomorrow or over the weekend, and I can always send you an alpha build if urgent.

    Thanks,
    Raoul
     
    jimmikaelkael likes this.
  32. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    796
    No rush ;) I'm concentrating on other aspects for now.
    Thank you very much for support!
     
  33. artistpetemac

    artistpetemac

    Joined:
    Sep 8, 2014
    Posts:
    19
    Hi Raoul,
    I'm having some difficulty working with multiple terrains and multiple Road Networks in the same scene. The goal is to have a tile set of terrains each with a road going through it, which connect up cleanly with any other tile, so we can build an endless road out in front of you by just adding another random tile as you move down the road.

    The challenges are that EasyRoads doesn't seem to want there to be multiple Road Networks in the scene, I have to disable all the current ones in order to add a new one. It also seems to force the road network to the origin, which means I can't move the tile after I create it. I need to be able to bake lighting on all the terrains at the same time, which means I need them all laid out in a grid in the scene, so building them all at the origin isn't going to work. Do you have any tips for work-arounds that will let me do something like this?

    Thank you,
    Pete
     
  34. joe_ftg

    joe_ftg

    Joined:
    Nov 9, 2015
    Posts:
    50
    Ah okay, after deleting the existing RoadNetwork in the example scene, and creating a new one, it now works as expected. Thanks!
     
    raoul likes this.
  35. raoul

    raoul

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

    I am not entirely sure if I understand the problem? Why exactly do you need multiple road network objects?

    Can you expand on this?

    Do you need all these processes during creating the road network? Otherwise, if that is what you prefer, it is fairly easy to place the origin of each road at the center of its bounding box and with a simple script you can reparent roads / crossings to your terrain tiles.

    Thanks,
    Raoul
     
    artistpetemac likes this.
  36. IFL

    IFL

    Joined:
    Apr 13, 2013
    Posts:
    408
    Hey Raoul,

    Did you ever take a look at the minimum value for roundabout sidewalk width?
     
  37. artistpetemac

    artistpetemac

    Joined:
    Sep 8, 2014
    Posts:
    19
    Hi, thanks for the response. I think I figured it out. I was under the mistaken impression that each road needs to remain a child of the Road Network. I've since found that I can have one road network and parent each individual road segment, and it's associated terrain to the same parent and move them together. It seems to be working out well enough.

    Thanks!
    -Pete
     
  38. raoul

    raoul

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

    Which version are you using? I am pretty certain you can go lower than 0.5 on roundabouts in beta 8.0

    Thanks,
    Raoul
     
    Last edited: Sep 9, 2016
    IFL likes this.
  39. raoul

    raoul

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

    Yes, but I am not entirely sure if at some stage the road will reparent back to the road network. That is why I asked whether you need all this during creating the road network.

    Otherwise you can use a script that will look at the bounding box of the roads, check this against the terrain tiles and auto parent to the matching terrain tile if that is what you want. You could also instantiate these roads and remove the scripts purely for testing (with the road network itself disabled/hidden) so the original road network remains as it is. Another script can clean up the instances after testing.

    Thanks,
    Raoul
     
    artistpetemac likes this.
  40. artistpetemac

    artistpetemac

    Joined:
    Sep 8, 2014
    Posts:
    19
    Good Idea! Thanks, yeah, one of the challenges is that it seems like the roads do need to be children of the Road Network while I am editing them...Leaving them there and instancing them to the tiles in script would probably be easiest. So far I have been re-parenting them manually whenever I need to work on them.

    -Pete
     
  41. IFL

    IFL

    Joined:
    Apr 13, 2013
    Posts:
    408
    Thanks Raoul! :oops: You're correct. I thought I had imported beta 8, but I had not. My apologies for wasting your time, and thank you for having such great support.

    Cheers
     
    raoul likes this.
  42. Gphysono

    Gphysono

    Joined:
    Jul 24, 2015
    Posts:
    21
    I'm new to EasyRoads and hope this is a simple question - how do you join two roads (without using an intersection object) in v3?

    Thanks!
     
  43. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Let me know if you need help with this. It sounds like it is fairly easy to setup a coded solution which allows you to quickly switch quickly between testing your specific hierachy requirements and creating the Road Network.

    Thanks,
    Raoul
     
  44. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735

    Hi Gphysono,

    I now see you also posted here, I just replied to your same question in the v2 thread :) , see copy below:

    You can join 2 roads in v3 when they are of the same road type. If you select the start / end markers of both roads that you want to connect you will see a "Join Roads" button in the Inspector (or Shift + J). That should connect both roads. What is required is that the geometry of both roads matches, also regarding possible sidewalks switched off / on.

    Thanks,
    Raoul
     
  45. Gphysono

    Gphysono

    Joined:
    Jul 24, 2015
    Posts:
    21
    Got it - Thank you!
    I apologize for posting the question in the V2 fourm. I didn't realize it until after I'd posted it and didn't know how to delete.
     
    raoul likes this.
  46. OneManBandGames

    OneManBandGames

    Joined:
    Dec 7, 2014
    Posts:
    207
    Hi, I purchased Easy Roads 3D pro and I am currently experimenting with the v3 Beta 8.0. Loving it so far, looks like exact the thing I need.

    I ran into a bug / issue with shape side objects that I wanted to report: It looks like when using shape side objects on a road, you can run into an error when trying to create a circular connection on a intersection. In this case the shape object is not created properly anymore, and the console shows the following error:


    ArgumentOutOfRangeException: Argument is out of range.
    Parameter name: index
    System.Collections.Generic.List`1[UnityEngine.Vector3].get_Item (Int32 index) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/List.cs:633)
    EasyRoads3Dv3.OQCDCDCOQQ.OODOQCQODQ (UnityEngine.GameObject go, EasyRoads3Dv3.SideObject so, EasyRoads3Dv3.ERModularRoad roadScr, EasyRoads3Dv3.ERSORoadExt soData)
    EasyRoads3Dv3.OQCDCDCOQQ.OQCDQOCODC (EasyRoads3Dv3.ERModularBase scr, EasyRoads3Dv3.ERModularRoad roadScr, EasyRoads3Dv3.SideObject so)
    EasyRoads3Dv3.OQCDCDCOQQ.ODCDDCQCCD (EasyRoads3Dv3.ERModularBase scr, EasyRoads3Dv3.ERModularRoad roadScr, Boolean isSideObjectFlag)
    EasyRoads3Dv3Editor.OQQOQCCCCQ.UpdateSideObjectsInScene (EasyRoads3Dv3.ERModularBase scr)
    EasyRoads3Dv3Editor.OOOQCOQCOQ.OnSceneGUI ()



    Once this error has occured on a road element, it seems that it somehow is corrupted and it will not be possible anymore to get shape side elements working on this element. This error can also then occur on other road elements as well.

    This is not very tragic since it is beta & I can work around this issue at the moment, but it would probably good if it would be fixed for the final version.

    Steps to reproduce the problem from an empty Unity project:

    1. Add a terrain with default settings
    2. GameObject > 3D Object > EasyRoads3Dv3 > New Road Network
    3. "Yes" to all questions
    4. Add a road with default road type, Shift click a couple of times to place
    5. Add the "River Surface" side object, the river surface should be visible now
    6. Add a Default T intersection to the scene by freely placing it with shift+click after selecting it from intersection menu
    7. Connect both sides of the road we created earlier to the intersection

    The error should occur now, the error message should show up in the console & the river surface side object should disappear.
     
  47. raoul

    raoul

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

    Glad to hear you like the tool! And thank you very much for reporting this.

    From what I see this is related to Shape type of side objects (no issues with Mesh and Procedural Mesh type of side objects on my end) and T crossings and when "Activate Bending" for the T crossing is toggled on, which is the case by default. With "Activate Bending" switched off the shape side object builds well. This will be fixed.

    Thanks,
    Raoul
     
  48. OneManBandGames

    OneManBandGames

    Joined:
    Dec 7, 2014
    Posts:
    207
    Thanks for the quick reply!

    Can confirm this only appears for shape type side objects. I removed "Activate Bending" for now from the T crossings and the issue is gone. Now I can continue my experiments without worrying that I'll run into that error and the side object is gone, thank you very much!
     
  49. MrIconic

    MrIconic

    Joined:
    Apr 5, 2013
    Posts:
    239
    If you don't mind can you explain in greater detail how to potentially get Easyroad3D to work with Map-ity? (Such as generating roads on the lines mapity creates)

    I've seen your post here but I didn't quite understand how to make it work and the creator has not yet responded about the official support for EasyRoad.

    Note: I've tried creating a road network with EasyRoads OSM but the roads are not the same as how Map-ity portrays them so I cannot align the various pieces of data that way.
     
  50. raoul

    raoul

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

    I cannot speak for the Map-ity part but I assume you have access to the coordinates through Map-ity.

    Creating a road from that data:

    Which part is unclear?

    The runtime demo scene also includes a script for creating roads from code.

    Regarding the built-in OSM support, provided that you assign matching lon/lat bounds for the terrain if those bounds do not match the bounds of the osm data, the results should be correct. You can test that by using matching (also regarding the projection) satellite imagery to the terrain, the generated roads will match the roads visible on the imagery.

    Thanks,
    Raoul