Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

World Building EasyRoads3D v3 - the upcoming new road system

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

  1. bac9-flcl

    bac9-flcl

    Joined:
    Dec 5, 2012
    Posts:
    829
    Tried to follow the custom road network video, and I ran into a bug and multiple questions.

    - I created a simple mesh meant to be used as a custom connection between an asphalt road and a dirt road. Not much of a looker, just something to test the custom connection workflow with:



    - I dragged the mesh into custom connection creator tool and hit "Create Connection Prefab" button.
    - I already had two road types set up in the project, as you can see here:



    - The "Default Road" is a road type shipped with core ER package, and "Ground Road" is a custom road type I created by hitting "Add New Road Type" button, with it's only difference from "Default Road" being a different material.

    - According to the video, I have to select the road type and do a rectangular selection to mark vertices associated with a road type to configure a connection. That's where I hit the first problem - nothing is presented for selection in the Road Type dropdown of the prefab creation window. I have no idea why, since the project evidently has two road types.

    - Since I'm unable to select any of the road types, the only available option is to hit "New Road Type" next to that empty dropdown. Doing so opens a small pop-up window asking me to name a custom road type. Upon finishing that and confirming creation of new road type, I get an argument out of range exception.



    No idea what it means, but presumably nothing good. After this, a custom road type becomes available for selection. I'm able to drag rectangles around the wireframe, but this seems to accomplish nothing, nodes don't get highlighted. Not sure how to proceed here. I just want to create a connection between the two existing road types.

    - Trying to hit "Align with Road" toggle out of curiosity got me another argument out of range exception.

    __________

    Questions beyond that:

    - Custom Road Networks video shows roads with custom modeled profiles, not just a strip of quads textured in a certain way, but I don't see any way to define the profile mesh or configure road shape otherwise in the road type settings - how was that accomplished?

    - What is exact workflow for creating a custom I-connection model with smoothly blended road materials? What UVs should be used, which end should connect to which connection ID?

    - When connection vertices are selected in the video, a seemingly randomly positioned green sphere is shown on the connection mesh wireframe. What is it signifying?

    - At the same point, several deep blue spheres are also shown in the same viewport. What are they signifying?
     
  2. l33tbmb

    l33tbmb

    Joined:
    Jun 19, 2017
    Posts:
    3
    Are there any recommendations for using a texture with a more defined pattern in an intersection? The UV gets pretty distorted with my stone road material.
    upload_2018-3-10_17-43-45.png
     
  3. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    Hi rafvasq,

    This looks like z-fighting. Which material/shader is used on the road. Most of the EasyRoads3D shaders have an offset applied that deal with this.

    This offset is not really required on flat terrains like in your screenshot. Simply ignore what you see while working on the road network in Edit Mode, optionally you can activate the highlight options in General Settings > Scene Settings. That way the road shape will be clearly visible when selected.

    After switching to Build Mode (middle mountain tab) you see options to raise the road network, a small raise of about 0.02 should be sufficient.

    Does that indeed solve the problem? Otherwise, all this is covered on the Troubleshooting page in the manual including explanations of other situations where the terrain might be visible through the road. But your screenshot appears to be z-fighting related. if the road is indeed 100% flat.

    Thanks,
    Raoul
     
  4. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    Hi bac9-flcl,

    As mentioned I am away for a long weekend. I will try to answer briefly otherwise I will explain better when I am back.

    Matching road types will only appear in the dropdown after making a vertex selection. After that the connection is known and the road type drown can be populated with possibly matching road types.

    I will fix that error, but a new road type should only be added after making the connection vertex selection.

    Please follow the steps in the second customized road network video.

    I a not sure what you ask in the first additional question. The custom prefab system allows you to import models. Within limitation this can be any model. Can you give an example?

    For blending roads, please check the demo package, it includes various examples of dirt tracks blended with asphalt textures.

    The green sphere should point inwards and acts as a reference that the connection is setup properly.

    Blue points refer to vertices used for terrain deformation.

    Let me know if you still have questions, I will answer them later tomorrow when I am back,

    Thanks,
    Raoul
     
  5. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    Hil33tbmb,

    The Y crossing coming in 3.2 will handle that better. To some extend you can make this look better by tweaking the UV tilling of the connection. But you probably will still not get the look you are after. Are you familiar with shaders? Meanwhile you can try a shader that uses the UV4 coordinates and a matching texture. The UV 4 coordinates are intended to, for example, blend tire tracks in various directions but it will also work well for this type of textures.

    Thanks,
    Raoul
     
    Last edited: Mar 12, 2018
    hopeful likes this.
  6. kittytrillah

    kittytrillah

    Joined:
    Jan 1, 2013
    Posts:
    16
    Hello again!
    I've noticed one weird thing using custom crossings.
    Shortly: terrain deformation working wrong using custom crossings and roads inherited from it. I did everything like in tutorials and actually got no errors in console or something, it just works wrong.
    So what I noticed is the road just "slice" terrain from the last point of it to the crossing itself.
    Screenshot of scene before building terrain:
    2018-03-13_00-04-29.png
    After:
    2018-03-13_00-07-53.png
    And the settings of crossing just in case (everything was done just like in tutorials):
    2018-03-13_00-12-55.png
    2018-03-13_00-13-27.png
    Thanks
     
    Last edited: Mar 12, 2018
  7. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    Hi kittytrillah,

    How many custom crossings did you test? The demo package incudes at least 5 or 6 custom prefabs with working terrain deformation. The previous beta package still available in the root directory includes several other custom prefabs. Do you have issues with these prefabs?

    The connections in the last two images seem strange. Can you show a screenshot what this crossing looks like in the scene?

    bac9-fici asked in one of his post what the green dots represent. I replied that they should point inwards. In the 4th screenshot 4 green dots are visible, 3 on one line, what does this connection look like?

    Are all connections added in clockwise direction?

    Or can you create a package of the generated prefab in /Assets/EasyRoads3D/Resources/custom prefabs/ incuding all dependencies and email it to me so I can clearly see the setup and test it?

    Thanks,
    Raoul
     
  8. kittytrillah

    kittytrillah

    Joined:
    Jan 1, 2013
    Posts:
    16
    I've tested different custom crossings from models from asset store (so basically the idea is to use the crossings of any shapes, not only from demo package). I had no issues with already adjusted custom crossings from beta for example, but I can't create my own because of this issue.
    In editor everything looks fine though, everything on place and stay nice until building terrain when terrain deformation just works wrong. With all shapes actually there is an issue with terrain deformation.
    Screenshot:
    2018-03-13_01-07-11.png
    In editor everything (except of textures, I just haven't set it up yet) is fine:
    2018-03-13_01-08-49.png
    Yes, all connection was added in a clockwise direction.
    Sure, I will sent both of these prefabs now.
    Thanks
    P.S. I was looking for cases when this issue happens. Turns out even on custom crossings came from EasyRoads3D package it happens when the road is curvy. So it actually looks like the end of the road is stiched with the crossing. Also if in custom prefab editor I turn this feature (terrain deformation) off the problem is gone. Anyway, I noticed this issue only in the latest version of EasyRoads3d. It never happened before, so I will look how it will work in beta tomorrow.
    Screenshot:
    2018-03-13_02-33-45.png
     
    Last edited: Mar 12, 2018
  9. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    Hi kittytrillah,

    Yes, I understand you like to use your own custom crossings. I mentionend the demo package examples as working so you can test. But the system is not limited to the examples in the package.

    So far there are no known issues with terrain deformation for custom crossing prefabs in general. When there are issues, it is either related to the specific mesh or the workflow for integrating it in the system.

    The only requirement when importing the model in the system is adding the connections clockwise. Mesh requirements are limited as well, the pivot point should be inside the mesh bounds, ideally near the center which is the case in your screenshots. And edge detection must work accurately. The black dots highlight vertices found for edges. This isn't entirely clear from the screenshots because connections are already added.

    Yes, the road materials and UVs can be assigned in the custom prefab editor window.

    Which package are you using? The roundabout in the last image is one of the previous beta package prefabs, it is no longer part of the demo package unless you imported the previous beta package?

    This is what it looks like on my end, beta 8.7. The white surfaces around the road are generated correctly, the terrain deformation in the second image matches these surfaces.

    customPrefabs.jpg


    I didn't receive the prefabs yet. It would be good to be able to look at them to eliminate possible reasons why you get different results.

    Thanks,
    Raoul
     
  10. kittytrillah

    kittytrillah

    Joined:
    Jan 1, 2013
    Posts:
    16
    I solved the issue eventually. It was my fault, sorry.
    So I forgot to grab points of mesh from the front view in custom prefab window.
    If everything is adjusted right the terrain deformation will "see" the whole crosshing model instead of just top of it.
    Screenshot of working crossing and it's setup:

    2018-03-13_16-10-05.png
    2018-03-13_16-10-48.png
    And to show the difference. This is the wrongly adjusted crossing, so you can see the broken terrain deformation in this case.
    2018-03-13_16-15-17.png

    Thanks
     
    hopeful and raoul like this.
  11. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    So, all works fine now?

    I was just looking at the package you sent. First thing I noticed was the vertex selection. 10 vertices are selected for the wider bottom connection. When zooming in, it shows that the two inner vertices at both sides are selected as well. Only vertices that will connect to the attached road should be selected.

    Thanks,
    Raoul
     
  12. MythicalCity

    MythicalCity

    Joined:
    Feb 10, 2011
    Posts:
    420
    Any tips on how to best use Easy Roads to create an airport runway? Where the markings at one end (ie: runway number) are different then the lines along the length of the runway.
     
  13. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    Hi capitalJmedia,

    Do you mean line markings not exactly following the runway? This could be done as decals using side objects as separate objects on top of the runway. So similar as the line marking on the oval track in the demo scene but then on a new object on its own spline curve.

    Thanks,
    Raoul
     
  14. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    v3.1 beta is available

    For those who like to try the v3.1 beta, it is now available on our website.

    This update includes the following workflow changes:

    1) The list of available connection prefabs to attach to the start or end of the selected road has moved to the connection prefab tab. Instead of all available connection prefabs, it will list matching prefabs for the selected road. You can still quickly switch to the full list of connection prefabs.

    2) A new "Rotate Connections" button has been added for the selected prefab. That way you can quickly swap connections which can be useful for T crossings

    3) For dynamic crossings you can quickly switch beteen X and T crossings

    4) Connection prefabs can be inserted at any marker. So need anymore to first split the road etc.

    5) The start or end of a road can be snapped to the same road or any other road as long a matching connection prefab is available.

    It is recommended to always work with road types. Although the new options work fairly well for roads with no road type assigned, there are still some limitation.

    Here is a quick video showing the new options


    This update also includes support for Vegetation Studio.General Settings > Terrain Management > Vegetation Studio for global settings and General Settings > Road Types > Vegetation Studio for road type specific settings.

    One thing that needs to be added is auto updating the heightmap data for Vegetation Studio after switching to Build Mode. For now this can be done by selecting the Vegetation Studio object: Debug > Refresh heightmap

    vs1.jpg
    vs2.jpg

    As always, please backup your project first before importing the update.

    The update requires the full EasyRoads3D Pro package import present in the project.

    Please let me know if you experience any issues with the new v3.1 features.

    Thanks,
    Raoul
     
    Last edited: Mar 14, 2018
  15. zKici

    zKici

    Joined:
    Feb 12, 2014
    Posts:
    438
    Hello Raoul,

    Can you please help me with this (on custom prefabs)

    A source prefab is still in the scene.Please Save / Delete this prefab first before continuing work on the road network itself.

    I keep getting them, what am I doing wrong?

    Thanks
     
  16. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    Hi zKici,

    This message appears when you select the main Road Network object while there still is a source prefab in the scene.

    Source prefabs are the prefabs in:

    /Assets/EasyRoads3D/Resources/dynamic prefabs/

    and

    /Assets/EasyRoads3D/Resources/custom prefabs/

    You mentioned "custom prefabs", is this indeed a custom prefab you created from a model and did you drag it in the scene from the project folder?

    These prefabs can be dragged in the scene for editing purposes but they should not be used in the road network that way. After editing they should be removed from the scene. Source prefabs can be instantiated and added to the road network in the scene through the connections tab in the Inspector, the 3rd tab from the left. Select the prefab and shift + click in the scene.

    Thanks,
    Raoul
     
  17. zKici

    zKici

    Joined:
    Feb 12, 2014
    Posts:
    438
    Interesting... I thought that is what I did,

    Message is gone for now, I'll keep you posted if something changes.


    1. Can you please add the option to SHIFT+J 2 roads even if they are of a different type? This will drastically improve my game flow.

    2. If I shift click a roundabout, and remove some of its connections, then connect my road to it (on 1 connection), the roundabout can no longer be selected with its own yellow marker, to move/rotate etc. Only way is via manually selecting it in the hierarchy, how to fix this? I sometimes notice difficulties with other custom prefabs as well, but never non select-able so far.

    3. Performance question, say I have a level finished, is it better now to export everything as .obj, or keep it as ER in the level, what is better performance and storage wise?
     
  18. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    Yes please let me know, if this happens again. These prefabs are parented to a temporary object "Temp Crossing Prefabs". That is how you can identify them.

    What type of roads are involved here? Especially with custom connection prefabs the road can have any shape. How should the system join different shapes? Alternatively I connectors can be used to join two different road types.

    I am unaware of selection issues for roundabouts. I just double checked this in the demo scene. Added a roundabout, selected it, removed connection 3 and 4. Attached roads to connection 1 and 2. The roundabout is still selectable and can be moved. The same when removing for example connection 1 and 3. Does this always happen for any roundabout? Do you get error messages?

    The system uses ordinary unity game objects, mesh filters, renderers, etc. Exporting to .obj and reimporting the .obj will result in the same. The export options are more intended in case you want to make changes in a modelling app.

    But you can finalize the road network if you do not need access to the scripting API at runtime. Finalizing will clean the road network up, all script components will be removed. It is recommended to first backup the scene. That way you can still make changes in a later stage.

    Thanks,
    Raoul
     
  19. emmcd3

    emmcd3

    Joined:
    Dec 16, 2012
    Posts:
    26
    Hi Raoul,

    A while ago there was a significant between JOKaija and yourself regarding adding a waypoint functionality to EasyRoads3D. It seems to have passed away in 2015. Was anything successful then or does something along these lines exist?

    Cheers
     
  20. emmcd3

    emmcd3

    Joined:
    Dec 16, 2012
    Posts:
    26
    Hi Raoul,

    I'd like the same favor if you could! Since it was removed from the latest Version, there must be a couple of issues with its implementation. What should I be concerned about?

    I'm guessing it is probably the intersections.
     
  21. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    Hi emmcd3,

    Is this indeed related to the previous waypoints option in the Inspector? There were no issues with it but meanwhile all this can be done through the scripting API with more options. To free up some space in the Inspector the previous waypoints option was removed.

    If you still like to use it, attached is an editor script that simulates it. Please drop it in /Assets/EasyRoads3D/Editor

    It will add a new menu in the top menu: EasyRoads3D > Waypoints

    It works similar as the previous method, select a road in the scene by selecting a blue marker handle and run “Waypoints” from the above menu. Just like the previous option, the waypoint game objects will be added as childs to the selected road in the hierarchy.

    You can set the waypoint distance in the script near the top: float distance = 10;

    Indeed this is for roads only, not for intersections. More waypoint functionality with lane control will follow in v3.2 or 3.3 as part of extended road shape control for built-in road types /crossings. By assigning road types to intersection connections it will also be possible to generate lane specific waypoints on crossings. Meanwhile for intersections waypoints can be added manually to the source prefabs in the project folder.

    Thanks,
    Raoul
     

    Attached Files:

    Last edited: Mar 16, 2018
  22. zKici

    zKici

    Joined:
    Feb 12, 2014
    Posts:
    438

    I was trying to join a road with a road with sidewalks, ah I will use I connectors then to make life simpler.

    As for the roundabout issue I will re-import yours in case I've tampered with it, all I remember changing was its materials or textures on them.
    Yes I am getting many error messages depending on what I'm trying to do. I'll re-import and have screenshots for you with the log.



    Thanks for all the information,


    - Can you please add ER settings option to disable the message pop up for New Terrain(s) detector notice, so that it doesn't keep asking me if I want a back up.

    - Perhaps this is related to my current roundabout issue, however I've created a roundabout with 3 connectors, When I instantiate the roundabout, add roads to it etc. then another one, and I make changes to the last one it applies to the previous roundabouts (of same type ex roundabout with 3 connectors)... example I added a connector, is this normal? Do I need different roundabouts for say, 1 connector, 2 connectors, 3 ...4..

    Thanks
     
  23. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    Yes, that is better when sidewalks are involved. Either v3.2 or v3.3 will also have extended options for sidewalks which will make it possible to add sidewalk end caps on roads. That way you can indeed use an I Connector between the road with sidewalks and the road without sidewalks.

    Yes, that is on the list. But it is recommended to use these backup options, just in case...

    That sounds as if source prefabs are being used in the scene. Or did you duplicate scene instances? Because in that case the Meshfilter of all these duplicates will use the same mesh asset. Making a change to one of them will update all other game objects in a similar way. That is why new scene instances should always be added through the connection tab (3rd from the left in the Inspector) and Shift + Click. You can repeat Shift + click to add multiple instances at once.

    It is not necessary to create different source prefabs for each roundabout type. However if you need several instances of these different types then it is recommended to create different source prefabs for each type so you can quickly reuse them instead of having to edit each roundabout.

    Thanks,
    Raoul
     
  24. zKici

    zKici

    Joined:
    Feb 12, 2014
    Posts:
    438
    Great news on the updates coming.

    I did indeed use the tab and Shift+Click to instantiate the first, 2nd and so forth, connected roads to it etc. Then I used the same process to instantiate another one and when adjusted all others adjusted as well. However this could possibly be due to the previous issue with the original roundabout, perhaps something's totally broken now and I will re-import shortly, re-create and see if I can find any issues and how to re-produce if so.
    I saved the scene as "Blank" It's my go to test scene, and now I have a Level_1 scene that is saved from the blank scene.

    Am I supposed to start a new road network per scene?

    When I am creating a new prefab, I used the settings option in ER, however I also did try to duplicate a prefab and changed the name, its settings but similar effect it updated all previous prefabs as well on the original for the duplicate.

    It is probably all connected with something I must have done with the roundabout.
     
  25. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    This functionality/workflow has been part of v3 since the first betas. It has never been reported before that updating one crossing instance updates other instances in the scene as well so I wonder what is causing this on your end. If you want you can email me the project so I can look at it.

    Each road network is unique so for every scene a new road network object needs to be created in the hierarchy. However, road types, new connection prefabs and side objects are available across scenes/ road networks.

    Do you mean General Settings > Crossing / Connection Prefabs? That is the correct way to create new source prefabs.

    Duplicating source prefabs in the project folder and change one of them should ideally be avoided. Each source prefab has a unique id, that way it is possible to update scene instances sharing the same ID after changes to the source prefab, for example after adding props to the source prefab. When duplicating these source prefabs both will have the same ID. The props will be added to all scene instances with that ID, including the instances of the duplicated and changed source prefab.

    Thanks,
    Raoul
     
  26. TchPowDog85

    TchPowDog85

    Joined:
    Dec 29, 2015
    Posts:
    124
    Rauol. I have created my road system, worked great and was fast - Thanks! One last thing I need to do. My entire road network is a subdivision and I was able to add a custom curb mesh to the edge of the road as a procedural mesh side object, as you can see in this image:


    However, I do not know how to do this for my crossing:


    Is there currently a way to do this? If so, how do I go about this?
     
  27. zKici

    zKici

    Joined:
    Feb 12, 2014
    Posts:
    438
    I re-imported the roundabout, then downloaded the new beta version, opened a new scene imported that as well.

    Start a new road network, instantiate a roundabout 4, add 4 roads from it.
    Instantiate (S*** +click again) another one, delete 4th connection, deletes on both roundabouts, and continues for each deletion.

    Link to video in your pm.

    What am I doing wrong?
     
  28. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    Hi LSUTiger85,

    Thank you, glad to hear the tool works well for you.

    Side objects are not supported directly on crossing prefabs. In your case, the reasonably narrow curb, it could work but generally this will not work well because side objects follow the spline curve. This is generally not what you want for objects like sidewalks unless the corner radius is wide enough.

    Have you tried doing this with the built in sidewalk system? The width and shape can be adjusted to match your curb shape.

    Thanks,
    Raoul
     
  29. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    Hi zKici,

    I watched the video. I was able to replicate this on older roundabouts in the development project. It appears that the mesh asset is not repleaced fo a new mesh asset if it already exists. The current roundabout example in the package does not have a mesh asset attached and when creating a new roundabout source prefab no mesh asset should be attached either. Can you check this in /Assets/EasyRoads3D/Resources/dynamic prefabs/ ?

    In any case I will make sure that mesh assets are always unique, also when a mesh asset is already attached to the source prefab.

    Meanwhile, what you can do is select the roundabouts in the project folder and manually remove the mesh asset from the mesh filter component. That should fix the problem unless no mesh asset is actually attached.

    Thanks,
    Raoul
     
  30. JonDadley

    JonDadley

    Joined:
    Sep 2, 2013
    Posts:
    139
    I'm very interested in purchasing EasyRoads for procedurally generating road networks at runtime. One question I have; is it possible to use the scripting API to get the tangent of a road spline at a specific distance along the spline? I see there is a function for getting positions on the spline at distances but cannot see one for tangents. This would be very useful for rotating objects (such as cars) to the align with the spline.
     
  31. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    Hi JonDadley,

    That is not available at the moment, it can be added.

    In any case, it is simple to calculate. The scripting API gives access to all the spline points exactly mathing the road shape. Based on these positions the tangent can be calculated.

    Thanks,
    Raoul
     
  32. TchPowDog85

    TchPowDog85

    Joined:
    Dec 29, 2015
    Posts:
    124
    I was able to get the result I wanted by manipulating the sidewalk profile. This works great on T and X crossing:


    But I am having and issue with the Roundabout. The sidewalk width is not working the same. And it seems as though no matter how I set it and save, I cannot connect a road to it. Even if I turn off sidewalk for the roundabout, I cannot connect a road to it.
     
  33. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    Initially the sidewalk option was not optimized for curbs like in your screenshot. This was added later and should indeed work fine for X and T crossings.

    I will double check this on roundabouts tomorrow. But it is a little bit hard to see the curb shape for roundabouts. It seems there are two shapes, or the outer part starts on the inside.

    Thanks,
    Raoul
     
  34. TchPowDog85

    TchPowDog85

    Joined:
    Dec 29, 2015
    Posts:
    124
    Ok, quick question: if I modify a connection prefab, how do I update all instances of that connection in my scene?
     
  35. br0kenp0ly

    br0kenp0ly

    Joined:
    Jun 3, 2008
    Posts:
    481
    It appears as if the last spline point is inaccurate. Do you have more custom crossing prefabs and is this indeed related to this specific prefab? The other side of the prefab looks like a similar connection. Does the same happen on that side?


    This happens with all of my custom prefabs and it seems to happen very randomly.


    Since you mentioned end offset, this must be the end of the road. Does this happen regardless whether it is the end or the start of the road?


    It always happens at the end splinepoint of the road. I tried adjusting the control type of the spline and adding another splinepoint very near to the last one, but the weirdness still occurs.


    Indeed adjusting the start /end offsets of these side objects a little bit for the involved road marker should fix that. After which action does it reset?


    It happens very randomly. Sometimes it happens after i build the terrain and sometimes it happens when I move points on the road.


    UPDATE:

    It seems like I can solve the issue if I enter a tiny value into the "Sideways Distance" setting:


     
    Last edited: Mar 19, 2018
  36. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    Two buttons are displayed in the Inspector after selecting the source prefab in the project folder. "Update Childs in Scene Instances", this will add additional props to scene instances. And "Refresh Scene Instances", this will update the crossing settings. I belief this does need more work, it is not added yet for roundabouts and the behaviour should also depend on the possibly connected roads. For instance if you have an X crossing with 4 roads connected and the source prefab is changed to a T crossing, it will obviously not be possible to accurately update that scene instance.

    Thanks,
    Raoul
     
  37. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    When adding values for "Sideways Distance" the side object will be generated on its own spline curve relative to the main road spline curve. It is more intended for fences, walls, etc. moving away and towards the road. So it uses different spline info.

    It appears to be related to the connection, does the issue indeed disappear when deconnecting the road from the crossing? The strange thing is that it happens randomly.

    In the previous images you posted, it appeared as if there was also an Y offset involved. In the video this doesn't seem to be the case. Can you see a pattern in this? Could it be that the last left and right spline points are reversed?

    Thanks,
    Raoul
     
  38. br0kenp0ly

    br0kenp0ly

    Joined:
    Jun 3, 2008
    Posts:
    481
    I could be wrong when I said it happens randomly. It seems to happen all the time now, but it is solved by adding a supersmall value to the Sideways Distance. Could it be that I set up my connection prefabs the wrong way? hmmm..

     
  39. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    That is actually good to hear, things happening randomly is always more complicated to debug...

    It seems indeed that these last spline points either are reversed or the right spline pointis the same as the last left spline point. Because the blue surface representing the road surface use the same data and it doesn't look right either. Before connecting the road the blue surface exactly matches the road shape. After connecting it, one "triangle" is missing and that is most likely because the left vector is the same as the right vector3.

    I will do some tests with custom connections to see if this can be recreated. Do you do coding and are you familar with the scripting API? In that case you could write these spline points to the console and compare the last values of ERRoad.soSplinePointsRight and ERRoad.soSplinePointsLeft.

    Thanks,
    Raoul
     
  40. br0kenp0ly

    br0kenp0ly

    Joined:
    Jun 3, 2008
    Posts:
    481
    Thanks for the quick feedback! I am no programmer I`m afraid, but I could send you a package with some of the assets if that could help you in the debugging process?

    Cheers,

    Roald
     
  41. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    I did some tests with various custom prefabs, both side objects and these blue surfaces are generated correctly for connected roads.

    So yes, it would be very helpful if you could email a package with the custom prefab in the video in: /Assets/EasyRoads3D/Resources/custom prefabs/ including all dependencies or at least also including the source model. That way I can test the same setup as on your end, how connections are added how roads connect.

    Thanks,
    Raoul
     
  42. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    @LSUTiger85, I can't recreate the situation in your screenshot, but too small sidewalk width values relative to the curb width value will result in overlapping triangles and wrong triangulation.

    Initially the sidewalk with had a min value of 1. This was changed to 0.1 to also support curbs. However the max curb width is still 0.5 (this will be updated). This can cause issues, this value should always be smaller then the Sidewalk Width value / 2.

    What are the sidewalk settings for the curb in the screenshot? This for example works well:

    curbSettings.jpg

    Thanks,
    Raoul
     
  43. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    Hi br0kenp0ly,

    Thank you! I will have a look at it today.

    Raoul
     
    Last edited: Mar 20, 2018
  44. SveinEven

    SveinEven

    Joined:
    Sep 25, 2014
    Posts:
    99
    Hello again Raoul!

    I have finaly got my hands on the pro version of this, and I am trying to get what we discussed a while ago, where the road is imported through osm.
    I currently have big terrain that I have done quite a bit of work on, and would like to get some roads on this.
    Though I could not find any documentation on this on your website. If there is and I could not find it, would you link it for me?
    If not, would you be able to assist me, and guide me through the steps I need to take to be able to import the roads into my scene?

    Thanks!
     
  45. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    Hi SveinEven,

    OSM data is based on longitude / latitude coordinates. Do you know these coordinates for your terrain?

    Below is a link to the docs explaining the workflow:

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

    Thanks,
    Raoul
     
  46. SveinEven

    SveinEven

    Joined:
    Sep 25, 2014
    Posts:
    99
    Actually, after browsing around the settings I came across what I were looking for. The possibility to generate roads with the support of Real World Terrain. Although, as far as I could see, I had to regenerate the world in order to do this.
    Will it be possible to copy the road, and import it on to a different terrain, and still apply all terrain deforming etc?
    If not, is there a way to generate the road with the info from Real World Terrain after the terrain has been created?
    I have done a lot of work on the terrain I already have, so I would loose many hours if I had to redo all that work :p
     
  47. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    The road network is not part of a terrain. It is created on top of the terrain(s).

    You can drop any terrain in the scene, it will be deformed according the road at that position.

    So you can first generate the roads with Real World Terrain and replace the real world terrain for your own terrain but that workflow is outside the scope of support I can give, you will be using the implementation of Real World Terrain, not the built-in OSM import options.

    Thanks,
    Raoul
     
  48. TchPowDog85

    TchPowDog85

    Joined:
    Dec 29, 2015
    Posts:
    124
    I got this to work by doing what you said, making the curb with <= half of the sidewalk width. This allowed me to connect a road to a roundabout and a T. Only problem now is that I can't update all instances of my crossing prefabs. When I select the prefab, the "Update child's.." button shows in the inspector, but it is grayed out and I do not see another button.
     
  49. TchPowDog85

    TchPowDog85

    Joined:
    Dec 29, 2015
    Posts:
    124
    I used real world terrain with easy roads, works for me. Just import your terrain through Real World, add a road network and start building your road. The result of real world terrain should be no different than any other standard terrain.
     
  50. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,722
    Glad to hear that indeed fixed the issue you were having!

    The "Update Child's" button is intended for updating scene instances after you added additional props to the source prefab in the project folder, for example lamp posts etc.

    Updating scene instances is not yet added for roundabouts. v3.2 will have a new sidewalk presets option in General Settings. Instead of creating them as part of setting up source prefabs you can simply assign sidewalks/curb presets to crossings roundabouts. We like to focus on implementing these improvements. But if being able to update scene instances of roundabouts is wished we can move that up in the priority list.

    Do you have many roundabouts in the scene? You can create a new preset the way it is currently done, when editing crossings or roundabouts. And assign these presets to the instances in the scene.

    Thanks,
    Raoul