Search Unity

World Building EasyRoads3D v3 - the upcoming new road system

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

  1. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    687

    Yes. Exactly.

    So what you are saying is that I can have a separate "Road Network" for each sub scene? If so, awesome, that'll work for me

    And hello Raoul, Hope life is doing well for you.
     
  2. raoul

    raoul

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

    All good here, hope you are well too.

    I don't know if / how the road networks in the subscenes interact, that is why I suggested a separate scene to create the full road network and than split this road network scene / terrain tile specific.

    But it is indeed also possible to create scene specific separate road networks. In that case, if that is imported, it is not possible to connect roads objects between road networks because they are scene specific.

    Thanks,
    Raoul
     
  3. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi @cadmonkey33,

    The ERPrefab issue in the current v3.3 beta 12 is actually related to a similar issue that was already fixed for indeed Unity 2022 and newer. If this is holding you up I can prepare an update and already send it to you so you can test it.

    Thanks,
    Raoul
     
  4. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    687

    Goodness, NO RUSH. I am contemplating the next version of my map, and checking what options/issues I need to deal with.

    Have a wonderful evening
     
    raoul likes this.
  5. cadmonkey33

    cadmonkey33

    Joined:
    Jun 14, 2018
    Posts:
    9
    Hi Raoul,
    It's not holding me up at the moment, there are plenty of other things to work on. :)
    When do you think the next beta release will be?
     
  6. raoul

    raoul

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

    All packages are being updated at the moment, the focus at the moment is on the free demo package for the pro version. After that a new v3.3 beta will be prepared, hopefully it will be available by the end of next week.

    Creating a quick build for your specific Unity version is easy, that is why I suggested it so you can already test it.
     
  7. cadmonkey33

    cadmonkey33

    Joined:
    Jun 14, 2018
    Posts:
    9
    Well, if it's no trouble for you I'll be happy to test it. :)
     
  8. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    I will send an update directly to you today.
     
  9. dev_project

    dev_project

    Joined:
    Jan 31, 2020
    Posts:
    23
    Hi, another quick question. Is it possible to define multiple textures for the roads to introduce a bit more variation along the segments?
    E.g. let's say I've got some tileable textures (or a texture atlas):
    upload_2024-2-10_15-21-23.png

    I would like the road segments to use different ones rather than a single repeating texture. Ideally, having some control over the randomness and distribution of the tiles along the curve.

    upload_2024-2-10_15-32-7.png

    Thanks.
     
  10. raoul

    raoul

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

    In v3.3, available in betas on our website, more options are added to define the road shape. It also includes an UV Editor that can be used to set the UV coordinates for your texture atlas.

    So your texture atlas will work in v3.3, the same material can be used for different road types. And by connecting the different road sections with I Connectors (available near the bottom in the Road markers section) the spline curve will be preserved. So that is a way to create a "single" road with variation. Will that work?

    Thanks,
    Raoul
     
    JamesWjRose likes this.
  11. dev_project

    dev_project

    Joined:
    Jan 31, 2020
    Posts:
    23
    Thanks, I'd need to try it to understand. Will there be some sort of tutorial or a document describing this in details and explaining the step-by-step configuration process?
     
  12. raoul

    raoul

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

    The I Connector option is available near the bottom in the "Marker Settings" section, the "Insert I Connector" button.

    When the first or last marker of a road object is selected it will add an I Connector to that marker. Another road object with a different texture can be attached to the other end of the I Connector. This works the same as attaching road objects to intersections, similar handles are visible to which the road marker will snap when within range.

    Otherwise the road object will be split in two road objects at the selected marker. In that case the road type of one of the two road objects can be changed.

    Regarding the v3.3 beta, in the new "Road Type Profile Editor" section in General Settings > Road Types, there is a "Road Type UV Editor" button. This will open the UV Editor window where for each road types the UV coordinates can be set.

    Thanks,
    Raoul
     
  13. Ran_domdog

    Ran_domdog

    Joined:
    Jun 7, 2023
    Posts:
    13
    hi @raoul

    The error that occurred last time was resolved by overwriting the backed-up road mesh and rebuilding it using the Store Mesh Assets in Project Folder function.

    However, I discovered a new problem.

    Before building, I opened Gizmos and checked the road in the Scene tab, and it looked like the mesh was torn.

    Build Terrain seems to solve the problem, but I'm worried that it really does.

    The work workflow you asked about is literally,

    Add Road -> Build Terrain -> Store Mesh Assets in Project Folder ->
    Make Prefab ->
    AssetBundle Build -> Back To Edit Mode -> (Prefab) Apply All

    The reason for using it this way is to use the Road Network without finalizing it.

    Thanks.

    (Before build)
    upload_2024-2-13_14-5-8.png
    (After build)
    upload_2024-2-13_14-6-9.png
     
  14. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi @Ran_domdog,

    It is not entirely clear what the exact steps were? Is this what is visible in the first screenshot? What were the exact steps you took and when did the road mesh change in what is visible in the screenshot? I am asking that because you wrote that this was resolved when switching to Build Mode, during that process the road objects are refreshed so first thoughts are that something else is involved that changed the road objects.

    Are these colliders, can you see in the hierarchy to which objects they are assigned?

    On the previous page I mentioned that putting complete road networks in a prefab with the intention to still edit the road network is not recommended, it may not work well. I also mentioned the recommended way to use road networks across scenes, / projects in a way that they are still editable, by dragging the road network object from one scene to the other scene. Have you tried that?

    The steps for storing Mesh Assets in the project folder will work well when creating a prefab of the completed / finalized road network. Are you having issues with this?

    Thanks,
    Raoul
     
  15. Ran_domdog

    Ran_domdog

    Joined:
    Jun 7, 2023
    Posts:
    13
    hi @raoul

    I modified previously created road objects.
    The changes are the name and physics material.

    When I checked, the surface objects in the children of the road object were turned on.
    Turning this off seems to solve the problem in the previously posted before image.
    Is it okay to solve it like this?

    I'm not sure how to do that.

    No problem. :)

    Thanks
     
  16. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Are these the surface objects that are visible when the below option is switched off?

    EasyRoads3D toolbar in the Inspector > Scene Settings tab > Hide White Surfaces

    That is where the active state of these objects for all road objects can be controlled. They are by default switched off and they will only be visible in Edit Mode, not in Build mode or after finalizing the road network.

    Just for additional information, these objects visualize how the terrain will be adjusted to the road network.

    Thank,
    Raoul
     
  17. FriederL

    FriederL

    Joined:
    Jan 16, 2023
    Posts:
    8
    Hi there, I've downloaded the free ER package and I'm familiar with creating roads and side objects. But how can vehicles follow the road? (Hopefully it's also possible for free)
     
  18. raoul

    raoul

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

    The EasyRoads3D Pro package includes a scripting API which also gives access to the road spline data. This can be used to have vehicles follow the road. The Pro package includes a runtime demo scene in which a road object is created at runtime through the scripting API, afterwards an object follows the road. The Free version however does not include the scripting API.

    In v3.3, available in betas, all this is further expanded, it is possible to assign lane info to road types. Lane data will be generated accordingly, also on intersections.

    Thanks,
    Raoul
     
    JamesWjRose likes this.
  19. MetalInvador

    MetalInvador

    Joined:
    Oct 1, 2018
    Posts:
    8
    Hello,

    I am currently working on an open-world racing game and I am having an issue with baking light specifically on crossing connections. As you can see in the image below, the baked data is pretty distorted on the crossing road, whereas the light is baked as expected on the rest of the roads. Both the crossing and regular roads use the same material with the same settings (URP pipeline is used). I'd be happy to provide more information if needed.

    image_2024-02-14_175647356.png

    Apologies in advance if I am asking this in the wrong thread but I only found this one for EasyRoads related questions. And also apologies if someone has already had a similar problem solved. :D
     
  20. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    687
    Hello gang,

    I'm looking at terrain streamer assets (ie: World Streamer) and I'm curious if anyone has used one with ER3D. Thanks for any feedback.
     
  21. raoul

    raoul

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

    From an EasyRoads3D point of view, what is required is adding lightmap UV coordinates. The Unity scripting API is used for this, Unwrapping.GenerateSecondaryUVSet()

    These UV coordinates are generated when switching the road network to Build Mode, when the terrain is also updated. And specifically when "Calculate Lightmap UVs" in the Build options is switched on. I assume that is the case?

    Other than that there are no known issues with this for intersections. Does this always happen, and for all intersections?

    Thanks,
    Raoul
     
  22. raoul

    raoul

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

    Our worlds are relatively small, we do not use terrain streamer assets so I cannot give direct feedback. I have seen several project in which indeed World Streamer is used for this.

    Thanks,
    Raoul
     
  23. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    687
    Thanks Raoul, The price is only $60, so I'll give it a try and let everyone know how my experience goes.

    Have a good weekend
     
    raoul likes this.
  24. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    687
    In the "Marker Settings" section of a road, is there a way to select the next or previous Marker in the Inspector? (as opposed to finding in on the Road in the Scene)

    Thanks
     
  25. raoul

    raoul

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

    That can be done with the keyboard when the Scene View window has focus, the + and - keys.

    Thanks,
    Raoul
     
    JamesWjRose likes this.
  26. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    687
    Awesome, awesome, awesome. Thank you as always
     
    raoul likes this.
  27. MetalInvador

    MetalInvador

    Joined:
    Oct 1, 2018
    Posts:
    8
    Hey,

    Rookie mistake on my end, I actually forgot to switch Calculate Lightmap UVs. It is interesting that the issue persisted only on crossings but anyways, this solved the problem.

    Thank you for the fast response and keeping this thread and EasyRoads asset updated and alive!
     
    raoul likes this.
  28. marcell123455

    marcell123455

    Joined:
    Jun 18, 2014
    Posts:
    275
    Hey @raoul ,



    On the right side is a scaled plane mesh and on the left side a road made with easyroads. My shader behaves correctly on the plane mesh, but different on the road. Is there any uv setting I have to change in my road settings?

    Thanks!
     
  29. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi @marcell123455,

    Where in the video is the difference clearly visible?

    Which exact Mesh data, UV coordinate sets are used in the shader and in what way?

    Thanks,
    Raoul
     
  30. marcell123455

    marcell123455

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

    Thanks for your quick answer! At the right on the plane mesh, the lanes offset moves the lanes towards the center of the road, on the ER road mesh, the lane offset will move from the left to right. Having it move towards the center is the expected behavior. I only use the default UV channel.

    Here are some screenshots of that shader logic. Maybe it gives you a bettter understanding,
    Lane Offset 0

    Lane Offset 1

    Thanks!
     
  31. raoul

    raoul

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

    Which version of EasyRoads3D are you using?

    In v3.2 the UVs are in the 0..1 range just like a Unity plane primitive. In the v3.3 beta the UVs can be set in the Road Type Profile Editor section.

    Or is this related to the actual direction which can vary 0..1 or 1..0?

    And in that case, does this always happen? And is this actually an issue? In that case, does swapping the slider min max values fix that? Or swapping the coordinates in the UV Editor window?

    Thanks,
    Raoul
     
  32. marcell123455

    marcell123455

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

    I use the 3.3 beta. Yes, I already found UV Settings and played with the uvs / also flipped UVs. and swapped the both points in the uv editor window. I can also send you a unitypackage of my shader and material in a dm.
    Yes I think this is related to the uv space. it should be 0 to 1 .
     
  33. raoul

    raoul

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

    Yes, you can send the shader in a dm if you want.

    Thanks,
    Raoul
     
  34. TrueHumanStudios

    TrueHumanStudios

    Joined:
    Jul 19, 2017
    Posts:
    4
    Good day!
    When I shine a spotlight or my car's headlights on a dirt road, the road is colored like this, highlighting the hidden alpha channel. How can I fix this? Unity ver.2021.3.27f1

    upload_2024-2-24_13-1-23.png
     
  35. raoul

    raoul

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

    It seems this spotlight issue can indeed be recreated. To be sure, what render pipeline do you use so I can double check and send an update for you to test.

    Thanks,
    Raoul
     
  36. arcanereality

    arcanereality

    Joined:
    Feb 26, 2016
    Posts:
    12
    Hey there I'm having trouble with using HD Pro roads, the crossways don't seem to easily attach as the video shows. they just spawn in the middle of the node on top of the road. Any ideas?
     
  37. raoul

    raoul

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

    To see if this can be reproduced, what is the exact workflow?

    Because there are quite a few different intersection types in this package and to make sure the correct intersection is inserted, the recommend workflow is to select the desired prefab in the Inspector from the Connections tab (the 3rd tab from the left) And use Shift + Click to add it to the scene. Afterwards road objects can be attached to the itersection connections.

    Thanks,
    Raoul
     
  38. arcanereality

    arcanereality

    Joined:
    Feb 26, 2016
    Posts:
    12
    I'm doing the same thing I do with the default roads / default x crossing (which works with those assets). But the connectors don't seem to have any connection points setup in the HD Roads pack.

    No prefabs show up as an option in that 3rd tab when selecting a node on the road, unless I hit 'Instantiate New Connection Prefab'
     
    Last edited: Feb 25, 2024
  39. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    I will double check this tomorrow on Monday at work.

    Was the HD Roads package imported before or after importing the EasyRoads3D Pro package itself? The EasyRoads3D Pro package should be imported first.

    Thanks,
    Raoul
     
    Last edited: Feb 25, 2024
  40. arcanereality

    arcanereality

    Joined:
    Feb 26, 2016
    Posts:
    12
    I imported EasyRoads3D Pro first
     
  41. raoul

    raoul

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

    That is strange, as far as we know there are no known issues, but the package was updated recently. Which Unity version do you use?

    In any case, I will double check tomorrow, if there are issue with these intersection prefabs I will report back here, send a separate package which working prefabs directly to you and also update the package.

    Thanks,
    Raoul
     
  42. arcanereality

    arcanereality

    Joined:
    Feb 26, 2016
    Posts:
    12
    2022.3.19f1
     
  43. raoul

    raoul

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

    I just sent a package with working prefabs in a DM, please let me know if there still are issues.

    Raoul
     
  44. TrueHumanStudios

    TrueHumanStudios

    Joined:
    Jul 19, 2017
    Posts:
    4
    Thanks you for your reply! Im using Default (Standard) render pipeline, Unity version 2021.3.27f1
     
  45. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Thank you for the additional info, I just sent an updated shader in a DM, please let me know if you are still having issues with spotlights.
     
  46. arcanereality

    arcanereality

    Joined:
    Feb 26, 2016
    Posts:
    12
    That fixed it thank you! Now I'm having trouble when increasing road width and trying to connect a connector
    upload_2024-2-26_14-4-45.png
     
  47. raoul

    raoul

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

    Good to hear the intersection prefabs indeed do work now.

    EasyRoads3D built-in intersection types are based on road types and can auto adjust to road type width changes.

    The assets in the HD Roads Add On package however are intended as ready-to-use. The intersection prefabs are based on imported models so when changing the road width, the intersection prefabs should also be scaled up. This can be done in the same way as with ordinary Unity prefabs, using the Transform Scale option in the Inspector. Either the scale value can be calculated based on the new road width or the prefab can be scaled up manually in the scene so it matches the road width. Once the exact scale is known all matching prefabs in /Assets/EasyRoads3D/Rescources/custom prefabs/ can be scaled up using the same values. The intersection will now match the road width when instantiated in the scene.

    Thanks,
    Raoul
     
  48. TrueHumanStudios

    TrueHumanStudios

    Joined:
    Jul 19, 2017
    Posts:
    4
    It worked, thanks!

     
    raoul likes this.
  49. george_abashidze

    george_abashidze

    Joined:
    Jun 17, 2021
    Posts:
    21
    @raoul fix for this? unity version 2023
     

    Attached Files:

  50. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hello @george_abashidze,

    Looking at your Unity screen name, you also emailed us yesterday and today. Your project is an URP project. URP requires URP shaders otherwise objects will be pink.

    In my last email I asked to confirm which EasyRoads3D URP package is imported. That was asked because URP 16.0.5 (the current Unity 2023.2.11f1) is supported through the URP_16_0_5 package in /Assets/EasyRoads3D/SRP Support Packages/. Unless several EasyRoads3D packages were imported (overwriting shaders), this package should auto import in an URP project. Can you manually import it to make sure it is actually imported?

    Thanks,
    Raoul