Search Unity

World Building EasyRoads3D v3 - the upcoming new road system

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

  1. colin_young

    colin_young

    Joined:
    Jun 1, 2017
    Posts:
    243
    Probably should have included the "desired" state. I'm assuming the difference between mirror and rotate is that mirror is scaling by -1 on an axis, while rotate applies a 180 degree rotation around the y axis? I've attached an image showing the desired target state (using left and right side objects to achieve it here). The scene I emailed for the 3.3 beta issue I believe is set up to show the issue, but might need to have dual sided enabled on the "Angle Parking Curb - Right" side object (it may or may not have the "- Right" in the name depending on when I exported it). I figured since this was a non-beta issue, others may have encountered the same thing and might know what I'm doing wrong (if anything, but it's usually a safe assumption that I've caused the problem).

    In my case, rotating 180 degrees is unnecessary, but harmless since my parking curbs are symmetrical, so I would expect that option to have taken care of it, but instead it looks as though they are being mirrored (see image in previous post). They are not however, since mirroring also affects the material and I can see that changes between the two options. Based on your description of the lamp post behavior it sounds to me like when dual sided is selected, the opposite side is placed using a coordinate system pointing in the same direction on both sides, but for individual sides the coordinates appear to be pointing in the direction of the side of the road they are on (i.e. the z-axis on the left is the negative z-axis on the right).

    The interesting thing is the y rotation is almost exactly equal to original + 180 - 90. My objects are prefabs consisting of an empty game object with an attached rigid body. Nested in that object is my mesh, which is rotated around x by -90, although changing that doesn't affect things, not that I expected it to. I'm guessing the 90 degrees is just a coincidence.

    DualSidedSideObjects.jpg
     
  2. raoul

    raoul

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

    1) These marker related start and end level distance options are mainly useful for bridges. Meanwhile in v3.2 bridges can be auto generated based on rules where this is less relevant. But I will add options for this to the scripting API, that is fairly easy.

    2) The same for the "X Position" control :)

    Thanks,
    Raoul
     
  3. raoul

    raoul

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

    That depends on the side object type, the Mesh Object type is indeed scaled by -1

    I am sorry, I still find it hard to get a clear picture of the stuation, which makes it even harder to consider what may go wrong. Also because there are no known issues with the rotate / mirror option for side objects. The Unity package you sent is v3.3 beta new sidewalk offset related. It includes a single road with large negative offsets applied which is something that will most likely be locked, because the offset option is more intended for inward offsets, not outwards. But I will email you more about that. In any case, I don't think I can see this situation with mirrored side objects in this package.

    Thanks,
    Raoul
     
  4. Andefob

    Andefob

    Joined:
    Sep 17, 2018
    Posts:
    99
    Ok great to hear you can add the options to API, thank you!

    By the way can the new Flex connector in 3.3 be used with scripting API yet? (I couldn't find any 3.3 API information but maybe I should just get the beta and experiment...)
     
  5. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735

    That is possible, when roads are attached to all connections and the roads are based on a road type then a built-in intersection can be turned into a Flex Connector using IsFlexConnector() in the ERConnection class.

    Thanks,.
    Raoul
     
  6. colin_young

    colin_young

    Joined:
    Jun 1, 2017
    Posts:
    243
    I've created a repro with the standard rendering engine (fresh 2020.3.13f1 project) that demonstrates the issue. From left to right, for the labeled "Add Rotation Angle," the final rotation appears to be 180, 90, 0, 120. Using rotate 180, not mirror. It looks like the rotation is 180 - ("Add Rotation Angle" * 2)

    Repro project link sent via email.

    SideObjectDualSideRotation.jpg
     
  7. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Thank you Colin, I will look at it today.
     
  8. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    @colin_young,

    I see that these different angles 0, 45, 90, 30 are actually 4 different side objects with these specific angles entered in the "Add Rotation Angle" field.

    The result in your image is the intended result. The original side object is generated on the right side of the road, the object on the left side is generated by mirroring the object and inverting the rotation value.

    What do you want to have this look like using the example in the image in your last post?

    Thanks,
    Raoul
     
  9. Wolpertinger-Games

    Wolpertinger-Games

    Joined:
    Mar 4, 2015
    Posts:
    19
    Hi Raoul,
    currently using the ER3.3 beta with Unity 2021.1.4f and we get a hard crash when trying to update the road width in our road network.

    The network itself is built up from various, simple custom roads, Flex Connections (2 or 3 road types, T and X configuration) and some I-Connectors. When I try changing the road width for a road type in the Road Settings and want to "update scene instances", Unity crashes immediately - there's not even the "Unity problem solving" dialog.

    Is this a known issue and do you potentially know a workaround?
     
  10. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735

    Hi Wolpertinger-Games,

    There are no known issues with Unity crashing in the current v3.3 beta. Do you have the latest v3.3.b2 imported?

    Is this a large scene? Are side objects auto activated for these road types? Are beta 2 sidewalks involved?

    What was the previous width and what is the new width? Imagine a Flex Connector with a sharp angle including a short road section with a similar Flex Connector on the other end. Considerable road width changes can cause issues when there is no room left anymore for the short road section, that is known. But Unity crashing because of that is unknown.

    The easiest way ro resolve this is by sending the scene or road network object. That would also be very much appreciated because we will be able to see what the issue is and fix it without having to recreate it which often is quite difficult in this type of situations. On your end, what can be done is duplicate the scene and in the backup, look for these situations that might be critical, disconnect roads from these connectors and see if that fixes the problem.

    Thanks,
    Raoul
     
  11. colin_young

    colin_young

    Joined:
    Jun 1, 2017
    Posts:
    243
    I assume you mean rotated 180 degrees, then applying the inverse rotation angle since I picked the "rotate 180 degrees" option, not mirror. Which is fine and and may be what people would intuitively expect, but I'd relabel it as simply "Rotate" and drop the "180 degrees". When a rotation angle is explicitly given you kind of expect your object to be rotated by that many degrees. The way I think of it is that if something is rotated other than 0 or 90 degrees it probably has some relation to how it is aimed relative to the traffic direction and you would want it aimed the same way relative to the travel direction on each side of the road (e.g. angled parking stalls).

    Maybe a third option, "Rotated relative to traffic direction" is needed that would rotate by rotation angle + 180. What do other people think? Or am I the only weirdo doing this sort of thing?

    For now I just need to create 2 traditional 1-sided side objects which isn't a huge deal, but it would be nice to be able to manage it all in a single place.
    Screenshot_7_21_21__09_37.jpg
     
  12. Wolpertinger-Games

    Wolpertinger-Games

    Joined:
    Mar 4, 2015
    Posts:
    19
    Thanks for these guides. I was actually looking into "fragile" connections or edge cases, but that didn't seem to solve the issue. I also tested just slight increases (0.01) in width change which still causes the crash.

    I saw, tho, that some crossings do not reflect updates until they are touched, sometimes breaking completely. Maybe this is a problem with the way they are created? Some Flex Connectors were built using the workflow of creating a dynamic crossing first, then converting it to a FC. Others were built "directly" by intersecting two roads. With this, we saw problems with sidewalks aswell (see below).

    The scene is not huge, but definitely big. I will send you a link to the scene via mail so you can potentially use it for debugging.

    We did run into problems with sidewalks aswell, so we left them out until we're happy with the basic road layout. We got sidewalk meshes that were no longer updating to node changes, when you intersect an existing road with active sidewalks (the new beta ones) with a Flex Connector. Seems like the sidewalks want to still update the whole road, although the road is now split into two separate roads, leading to "ghost sidewalks" that will remain in the scene.

    For the time being, we can work around the issues. Just wanted to provide feedback for the next potential update for 3.3 beta.
     
  13. raoul

    raoul

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

    Yes, that will require a 3rd option. "Rotated relative to traffic direction" is probably more for v3.3 which supports lane info and traffic direction info. But I will add this in a way so the end result is the same.

    Thanks,
    Raoul
     
    colin_young likes this.
  14. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    @Wolpertinger-Games

    Thank you very much. Just to check if the results are the same, I see there are 20 road types. Should this be tested for a specific road type or does this happen on all the road types?

    Thanks,
    Raoul
     
  15. colin_young

    colin_young

    Joined:
    Jun 1, 2017
    Posts:
    243
    I've been working with 3.3 for so long that I keep forgetting the lane feature wasn't introduced until then :) Speaks to how stable it is.
     
    raoul likes this.
  16. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Looking at this, there is something not fully functional here.

    This is actually already setup to work with v3.3 lane data and taking into account both lane direction and left- or right-hand traffic. But this is currently only implemented for auto generated side objects, the new v3.2 feature. It is used for the two "Sharp Turn Sign Post" side object examples in the demo package.

    I will make sure that this additional angle rotation works in a similar way for manually activated side objects.

    Thank you for reporting this :)
    Raoul
     
    colin_young likes this.
  17. Wolpertinger-Games

    Wolpertinger-Games

    Joined:
    Mar 4, 2015
    Posts:
    19
    Currently, I can only reproduce it constantly with "Residential Two Lane + Side" and "Road One-Way Parking"
     
  18. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Yes, I can recreate this. It is Flex Connector related, the road type update is causing a StackOverflowException in some of the Flex Connectors. I will look further into this and send a v3.3 beta update to you when fixed so you can also test on your end.

    Thanks again for sending the scene.

    Raoul
     
    Wolpertinger-Games likes this.
  19. raoul

    raoul

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

    Glad to hear you like the tool.

    What is the history? Which packages were intially imported? EasyRoads3D Pro or the Demo package? And which package update did you import?

    Do you see red error messages in the console?

    Although that should not be necessary, have you tried restarting Unity?

    Also, if there are no error messages, can you try the small demo scene. Is the road network in this scene fully functional, can you selected and move road markers?

    Thanks,
    Raoul
     
  20. Wolpertinger-Games

    Wolpertinger-Games

    Joined:
    Mar 4, 2015
    Posts:
    19
    Thanks a lot, great support!
     
  21. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi Wolpertinger-Games,

    The issue is fixed. I am currently looking into another reported v3.3 beta issue. When fixed I will prepare an update, I will probably send it to you on Monday. But let me know if you are stuck and need it urgently I can already prepare it now in that case.

    Thanks,
    Raoul
     
    Wolpertinger-Games likes this.
  22. matchbox

    matchbox

    Joined:
    Jun 14, 2016
    Posts:
    30
    Hi, I am new to EasyRoads 3D and did a lot of testing the last days. I like the tool a lot and it looks rather powerful. But I have a question which I wasn't able to solve yet. Hopefully you can help me.
    I have one Unity project in which I did a lot of testing and worked on the track, especially fitting the road points to the terrain, removing too many points, making smooth curves, etc.
    I started another Unity project with the same terrain and want to import the Road Network from the first project into the new project, but I don't just want to import the mesh, I want to import the whole road network so that I am also able to continue making changes to the track in the new project.
    How can I move the road network from the old project to the new Unity project? Thanks a lot!

    Best regards,
    Marco
     
  23. raoul

    raoul

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

    Glad to hear you like the tool.

    Unity stores dynamically generated meshes, the roads in this case, in the scene file. So the easiest way to move the road network from one project to another project and preserve the exact state is the following:

    1. Create a Unity package from the scene in the original project. Optionally you could duplicate the scene first and in the duplicated scene remove all objects except the road network object. And create a package from this duplicated scene. This will also make sure that scene files in the target project do not get overwritten.

    2. Import this package in the target project.

    3. Open both the target scene and the imported scene in the hierarchy.

    4. In the hierarchy drag the road network object from the original scene to the target scene and save the target scene.

    That is it, you should now have a copy of the exact same road network object fully functional.

    Best regards,
    Raoul
     
  24. matchbox

    matchbox

    Joined:
    Jun 14, 2016
    Posts:
    30
    Using the package manager sounds like a really good idea Raoul! Thanks a lot, I will try this.

    Best regards,
    Marco
     
    raoul likes this.
  25. claudius_I

    claudius_I

    Joined:
    May 28, 2017
    Posts:
    254
    Hello.

    I want to update the default offset (sometimes worked), but now i want to update to "0" and didn't worked

    Thanks
     

    Attached Files:

  26. raoul

    raoul

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

    Is this related to markers already having an offset value? This indeed needs work. This currently only works when the offset value is 0. This is done to avoid that customized offset values are updated as well. Imagine a side object being active on many roads with custom offset values on a number of sections. Then in a later stage you decide to change the default offset. These customized offset values should probably not update.

    The latest build includes a new Side Object refresh icon in the bottom right of the Scene View window when a road is selected. This will force all offsets to update to the new value.

    Thanks,
    Raoul
     
    claudius_I likes this.
  27. Wolpertinger-Games

    Wolpertinger-Games

    Joined:
    Mar 4, 2015
    Posts:
    19
    Hi Raoul, it's me again :)

    Is there already a way to add lane data to our custom crossings in ER3.3 beta?
     
  28. raoul

    raoul

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

    Not yet. This will either be added as a new tool to create curves for both lane data and side objects on connection objects in the Custom Connection Editor window. Or it will be added as an option in the Unity prefab editor system. That will be easier as similar code can be used as for built-in connections with additional options to control the shape of the curve / lanes.

    Thanks,
    Raoul
     
    Wolpertinger-Games likes this.
  29. claudius_I

    claudius_I

    Joined:
    May 28, 2017
    Posts:
    254
    Thanks Raoul :)

    I have another question.
    What is the best form to export a "Road object" to another project? (i need edit the road object in the new project)
    Thanks
     
  30. raoul

    raoul

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

    A similar question was recently asked the other day here on the forum, this is the recommended workflow

    https://forum.unity.com/threads/eas...-new-road-system.229327/page-194#post-7362440

    The same steps can be used for a single road. Just move the specific road object in the hierarchy from the original scene to the road network object in the target scene.

    Thanks,

    Raoul
     
    claudius_I likes this.
  31. claudius_I

    claudius_I

    Joined:
    May 28, 2017
    Posts:
    254
    thanks :). Sorry, I didn't see it
     
  32. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Just a coincidence :) I didn't expect you to see it. I just thought I link to that post instead of repeating these steps.
     
    claudius_I likes this.
  33. SnaiperoG

    SnaiperoG

    Joined:
    Apr 6, 2015
    Posts:
    66
    Hi, i have multiple terrains in my game. After sculpt i will export terrain as mesh with lower poly count which means that result mesh will be different rather original. Because of it i want to project or add extra thikness to roads after export.
    So first question is it possible with easy road?
    And second question, can easy road split whole meshes in a parts as terrains or mesh terrains goes? Because i dont want to have one single mesh on all my terrains, i want split roads by sizes of my terrains, because now i have 64 terrains and its doesnt make any sence to load one single road mesh for whole map
     
  34. raoul

    raoul

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

    In the current version the roads will be flat by default and that is also what is supported by the built-in connection system for intersections.

    But in the current version custom road shapes can be created by importing a model with the custom shape in the system. This model usually is an intersection type of model, connected roads will inherit the shape, in your case the shape with thickness.

    Also, v3.3, available in betas includes an upgrade tot he road type system. Custom shapes with thickness are supported and the v3.3 Flex Connector also supports these shapes. All this is fairly stable, certainly when all connected roads are of the same road type. The v3.3 beta and these Flex Connectors are already used in the additional demo package.

    Regarding your second question. All roads are separate objects and two roads can can connect with the I Connector to preservce the original road shape. Or a road can be split in two objects by inserting an I Connector. This can for example also be done for roads that cross terrain tiles. That way the final road network can also be split per terrain tile for streaming if that is what you will do.

    Thanks,
    Raoul
     
  35. hauwing

    hauwing

    Joined:
    Dec 13, 2017
    Posts:
    69
    Hi,
    This is the wall country side, is there a way to avoid the wall from seeing through between each section? Thanks.


    upload_2021-8-4_22-17-45.png
     
  36. raoul

    raoul

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

    Is this side object preset using the original settings?

    New Side Object video tutorials is being worked on. The first was uploaded earlier this
    week. The scene in the below image is used for this tutorial series. It is the new v3.2+ demo scene. This wall side object preset is used in the previous v3.1 demo scene which is still part of the demo package.

    So I imported this side object preset in the v3.2+ demo scene. It seems to import and work well.

    wall.jpg

    There is actually a tutorial for this side object on our website

    https://www.easyroads3d.com/tutorials/side_objects.php#wallFarm

    Can you check the last part, the part about the Mesh Editor Window and the "Open Mesh Editor Window" and check whether the Start / End offset handles are correctly positioned like in the image on that page. These blue dots are draggable, they will snap to vertices when within snapping range. These offset positions should be accurate, exactly at the vertex position that divide the mesh in start, middle and end sections. Otherwise gaps like in your image may appear.

    The Part 2 side object video will cover this type of side object. It will be available next week.

    Thanks,
    Raoul
     
    Last edited: Aug 4, 2021
  37. hauwing

    hauwing

    Joined:
    Dec 13, 2017
    Posts:
    69

    Thanks Raoul, I solved the issue by moving the blue dots a little bit. Thanks.
     
    raoul likes this.
  38. GoldFireStudios

    GoldFireStudios

    Joined:
    Nov 21, 2018
    Posts:
    160
    I added a new road network to a scene in Unity 2021.2.0b6 and the inspector won't show with a variety of issues. Is this expected to work on 2021 or not yet? Or is there something else going on here that I'm not seeing maybe?

     
  39. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735

    Hi GoldFireStudios,

    The Unity 2021.2 beta does indeed have critical changes. The current v3.2.0f5 on the Asset Store will not work.

    But we are monitoring this and a preview update for the current Unity beta is actually available. If you want I can send it to you.

    Thanks,
    Raoul
     
  40. GoldFireStudios

    GoldFireStudios

    Joined:
    Nov 21, 2018
    Posts:
    160
    That would be great, thanks! Should I email you or get it some other way?
     
  41. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735

    I just sent the package in a private conversation post

    Please let me know if you still run into issues in Unity 2021.2 with this build

    Thanks,
    Raoul
     
  42. Ward101

    Ward101

    Joined:
    Mar 22, 2016
    Posts:
    52
    Raoul, I would like to thank you for the new set of videos on Youtube.
    One of the best Unity asset video tutorial I've ever used. Wonderful add-on for this great asset.
    Although I've been working with ER for a couple of years, this new material is invaluable, for new features, and as reminder of less frequently used features. Recommended for ER rookies and pros.

    By the way, I already downloaded V3.3b2
    Is this the latest beta available? I'm testing 2021.2

    Thanks!
    Eduardo
     
    Last edited: Aug 15, 2021
    raoul and hopeful like this.
  43. raoul

    raoul

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

    Thank you for using the tool and also for your review, I just saw it :)

    Yes, v3.3b2 is the latest version. A new beta will be available soon with among others, improved triangulation of Flex Connectors especially secondary toad related. Please let me know if you are having issues or if you are waiting for soemthing specific.

    I see you are using the 2021.2 beta. That will probably not work well, is that why you are asking this? If you need this urgently I can also prepare a v3.3 beta preview package for 2021.2.

    Thanks,
    Raoul
     
  44. Roboserg

    Roboserg

    Joined:
    Jun 3, 2018
    Posts:
    83
    Using the demo V3.2+ package + Unity 2020.3.16f1, loaded the scene, got errors. Is it supposed to be like that? Also is there Discord avaivble?

     
  45. Roboserg

    Roboserg

    Joined:
    Jun 3, 2018
    Posts:
    83
    Tried using Unity 2021.1.17f1, same issue as in Unity 2020.3.16f1 - open a new project, import the Demo Project asset, open 3.2v+ scene. Click gameobj -> EasyRoads -> New road network and nothing happens.

    Do I have to import the Pro version as well? In the video tutorial you dont.
     
  46. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735

    Hi Roboserg,

    It is not necessary to import the main EasyRoads3D Pro version when the demo package is imported.

    You mention that you opened the 3.2+ demo scene. This scene already has the road network object in the hierarchy.

    Main Menu > GameObject > 3D Object > EasyRoads3D > New Road Network

    This step is to create the road network object in your own scenes.

    The polygon warnings appear in more recent versions of Unity. These are related to additional demo scene objects, they are not related to the tool itself.

    The missing tree warning is related to copyrighted trees in the demo scene that are not included. The readme file in the EasyRoads3D root directory includes info and the asset store link where these trees can be downloaded. But this is optional, the road network is fully functionmal without this package.

    Thanks,
    Raoul
     
  47. Roboserg

    Roboserg

    Joined:
    Jun 3, 2018
    Posts:
    83
    Doing the tutorial, showing the connections as thumbnails, as in the video, doesnt work.
     
  48. Roboserg

    Roboserg

    Joined:
    Jun 3, 2018
    Posts:
    83
    Thanks, yea, this step didnt work, because I already had "Road Network" in my scene. The video does not mention deleting it and there is no message from the EasyRoads that I already have a network existing. This was confusing as a beginner, a warning message would help :)
     
  49. Roboserg

    Roboserg

    Joined:
    Jun 3, 2018
    Posts:
    83
  50. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735

    I am not at work at the moment. I will double check. But the screenshot shows that a road is selected in the scene based on the primary road type. Is that related? Does this work without a road selected?


    This should actually show a dialog box. I will check that too.

    I belief this prefab is not used in the v3.2+ demo scene. The shaders are updated in v3.2. It shows the Internal/HiddenErrorShader message. These materials should use the "ER Road Decal" shader.

    I will check this too.

    Thanks,
    Raoul