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
    Updates are always announced here in this thread :)

    Thanks,
    Raoul
     
  2. AndrewBeers

    AndrewBeers

    Joined:
    May 28, 2015
    Posts:
    13
    Your response about using one material and setting up the texture worked. Thanks for the help!
    upload_2017-10-25_17-31-19.png

    upload_2017-10-25_17-30-30.png
     
    raoul and hopeful like this.
  3. Corvwyn

    Corvwyn

    Joined:
    Nov 15, 2013
    Posts:
    114
    @raoul
    I need to create medieval roads on a unity terrain, like paved, dirt and cart roads, and it seems like this asset would be perfect.

    I noticed this on the asset store page of EasyRoads3d Free: "Full Version V3 Pre Sales OFFER - 50% OFF". How do I get this offer?
     
  4. NordstroemSAAB

    NordstroemSAAB

    Joined:
    Aug 3, 2017
    Posts:
    50
    Hello, Raoul.

    The package comes with several materials, models and other assets in the Standard Assets folder. It contains assets that our project doesn't already have and some that are different from the ones we have. My colleague is worried that overwriting the things we already have might ruin something else, but is more open to including the things we don't already have. However, I would prefer to not risk anything and simply skip it all if possible. So I have some questions regarding that.

    Are the standard assets that comes with the package used for more than just the example scenes? Also, can I safely delete the folder with the example scenes?
     
    Last edited: Oct 26, 2017
  5. raoul

    raoul

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

    Yes, you can do all that. And for paved roads you can use planar UVs so textures on roads and crossings will seamlessly connect. This could be useful depending on your texture style.

    The Pro package has always been $90, it still is on our website. At some point during beta the price was dropped to $45 on the asset store (50% off) as an incentive to get the package now, during beta, with all the initial bugs etc. The price is still $45. It seems that meanwhile prices of major packages have dropped as well more towards this price range. As the v3.0 release is very close I will have to look around again and see in what price range this package belongs.

    Thanks,
    Raoul
     
  6. raoul

    raoul

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

    What is important is the EasyRoads3D folder structure, the dll's, the GUI textures in the "textures" folder and the two prefabs in "/Easyroads3D/Resources/standard prefabs/". And also the 4 prefabs in the Resources folder itself!

    All other assets in the EasyRoads3D folder and the assets in the folders /EasyRoads3D scenes/ and /Standard Assets/ are only there as examples for road materials, dynamic connection prefabs, custom connection prefabs and side objects. You can remove all these assets if you want. You can do a test in a new project with only EasyRoads3D imported.

    As it looks now the final package will only have the bare minimum of assets. The new demo project will be uploaded as a new package, free if you have a Pro license, the asset store team has confirmed this is possible. You will be able to import the assets from the demo project in your own project if you want.

    Thanks,
    Raoul
     
  7. NordstroemSAAB

    NordstroemSAAB

    Joined:
    Aug 3, 2017
    Posts:
    50
    That's good news. I guess I'll worry about that stuff after the release then, so that I don't have to worry about it.

    On a separate issue, I just read the top paragraph in the release notes about importing package updates. It says not to delete the EasyRoads3D folder because you would lose user created prefabs. Why not simply place the user created prefabs in a separate folder? Something like "EasyRoads3D user content". You already have separate folders for the scenes and the models. That way they would remain even if you delete the EasyRoads3D folder and you just know that people are going to delete that folder if they get a bug that they suspect can be solved by reimporting the EasyRoads3D package.
     
  8. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Indeed that would be possible nowadays, you can set up a package that way now. And I do think that will work well for the majority of users.

    There are however users that will move around packages which is also possible with the EasyRoads3D folder. Doing this while there are important assets located outside the EasyRoads3D folder hierarchy may break things unless an option is added to enter the root location of these assets. But is that making things unnecessary complicated?

    Users may remove the package if the initial import does not work, no created contents yet. But will users simply remove a complete package folder in a later stage after already building scenes? Do users nowadays generally remove a full folder package before upgrading to a newer version?

    V3 is in beta for quite some time now, no poblems with the current structure have been reported so far. But if this is generally considered as something that can/should be improved please let me know.

    Thanks,
    Raoul
     
  9. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,560
    I Love EasyRoads - thank you for making it. I've been using it since Unity 4.

    Can I move a road from one network into another? or import it somehow?

     
  10. NordstroemSAAB

    NordstroemSAAB

    Joined:
    Aug 3, 2017
    Posts:
    50
    Nah, nah. I don't have an issue with it. It just struck me as odd, but you raise some good points about it.
     
  11. raoul

    raoul

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

    Thank you very much :)

    That should work just fine, other then that road objects are parented to the "Road Objects" game object in the hierarchy of the main road network object, they are not linked to a specific road network in another way.

    Unless the road is connected to crossings and these crossings remain in the original road network. That is probably not a good workflow.

    Thanks,
    Raoul
     
    protopop likes this.
  12. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    I do see what you mean, this can potentially happen. But as mentioned I think it is unlikely someone will remove the full folder in a later stage after having used the tool for a while and being familiar with what creating new dynamic prefabs and custom prefabs actually does. It is probably impossible to make this bullet proof anyway. There is always a chance assets will get deleted.

    An it is not that removing these assets is fatal. The user created road types and side objects log can be rebuild by opening a scene with these road types and side objects. And if necessary an option can be created to restore the above mentioned dynamic and custom source prefabs using a scene instance.

    And it is very much recommended to backup projects anyway. Unity is a lot more stable now so maybe it is not done so much anymore by other users, but after losing work through crashes and corrupted projects in the early days, we still backup at least twice a week.

    Thanks,
    Raoul
     
  13. blumeCG

    blumeCG

    Joined:
    Nov 17, 2015
    Posts:
    1
    Hey, I'm quite new using your tool. I build a road network.
    3 of ~25 roads seem not attenched to the spline cuve anymore. First I used Ctrl+d to duplicate the crossings, placed the roads afterwards and finaly connected them with the crossings. Everything worked fine, but suddenly as I tried to adjust the roads some of them wont follow the path anymore.


    Edit:
    I rebuild all involved roads, and till now they worked fine
    Edit2:
    Happend again, but if I disable and enable the sidewalk it seems like to fix the problem
     

    Attached Files:

    Last edited: Oct 27, 2017
  14. raoul

    raoul

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

    That is not how this works. By using Ctrl + d, all instances will have references to the same crossing data including possibly connected roads.

    If you first want to add multiple crossings to the scene , you simply select the crossing from the connections tab (3rd from the left) and use Shift + click in the scene where you want to add the crossings. As long as you have not made any other actions like selecting another crossing or road, Shift + click will add new instances of that same crossing. This is also a faster and easier method then using ctrl + d for new instances.

    Are these roads connected to one of the duplicated crossings?

    That sounds as if the roads are indeed attached to these crossings.

    Can you try the workflow I described?

    Thanks,
    Raoul
     
  15. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Beta 8.7 is now available for download from our website

    This update mainly includes fixes for recently reported bugs, also bugs here on the forum.

    It also includes some Inspector updates. The Inspector for the selected road now has foldout options for each section. Closing the general road settings and main marker section foldouts will for example improve the workflow when working on marker side objects for which the controls are located lower in the Inspector and by default not visible when all road controls are displayed.

    @tri-stratos, the transparency "EasyRoads3D/ER Road Transparency" shader is part of this update, with an example in the demo scene.

    The asset store update has also been uploaded and is pending approval by the asset store team.

    Next is the new demo project with tutorials and also including new assets such as road textures, side objects.

    Thanks,
    Raoul
     
  16. tri-stratos

    tri-stratos

    Joined:
    Jan 29, 2013
    Posts:
    152
    @raoul,

    Could you please upload images in this thread, from this road with transparency shader example, while we wait unity asset store for approval?

    Last but not least:
    - What about speed? How slower is this shader vs an ordinary standard one?
    - May one create a more deformation rich road surface than a flat one ? If so may this be done procedurally? Or are we only left to exportbit to a modeling package and then reimport it? Feasible?

    Please keep us posted
     
    Last edited: Oct 28, 2017
  17. k-i-a

    k-i-a

    Joined:
    May 15, 2015
    Posts:
    17
    Hi everyone,

    1) is it possible to use a blendshader with multiple layers of textures for the roads, to paint different textures on different parts of the road? for istance to paint water puddles on asphalt or gravel on dirt tracks? Maybe megasplat or other shaders work on easyrods3d meshes?
    2) is it possible to use decals on the road to add cracks or writings?...
    3) there is a way, sort of a "spline decal" to create skidmarks on a track that follows cars trajectories?
     
  18. CDUnityDev

    CDUnityDev

    Joined:
    Jan 31, 2017
    Posts:
    25
    Hi Raoul, we recently upgraded to Unity 2017 and we're getting some compile errors related to EasyRoads. Here's a sample:




    We have tried rebuilding the project and upgrading to newest version from asset store.

    All the errors are pretty much all "X is not a member of Y."
     
  19. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi tri-stratos,

    It is the same shader as used on the image below which is from the upcoming new demo project. In the 8.7 update it is used on the dirt track that is blended with the asphalt track.

    transparencyShader_.jpg

    The shader is fairly simple in the current state, it uses decal:blend. I am not a shader expert in the sense that I know exactly how each aspect of what Un ity provides affects performance. But I would think it is fairly fast unless decal:blend by itself is performance heavy. https://docs.unity3d.com/Manual/SL-SurfaceShaders.html

    The current default road is flat. The custom prefab system allows you to bring in any road shape you want. After the v3.0 release, dynamic crossings will be upgraded to support subdivision. Once that is done, built-in road shapes can also be more complex.

    Thanks,
    Raoul
     
  20. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi K-i-a,
    The upcoming new demo project includes an example of that. https://forum.unity.com/threads/eas...g-new-road-system.229327/page-74#post-3211925 The mountain road in the top two images uses this shader. But no painting tool is provided yet.

    In any case, ordinary game objects with a mesh renderer are used. You can assign any material / shader you want.

    I started on this but it needs more work. There are several approaches for cracks, different UV sets can be assigned which can help with adding cracks more realistaclly directly in the road shader. Writings can be done using decals. The crossings act like unity prefabs so you can enhance them that way. A simple example of this is also part of the upcoming new demo project. Writings / decals on roads that form a specific pattern could be added as side objects. Examples of this are also part of the new demo project, double middle line markings in bends and a start grid on a go karts track.

    Thanks,
    Raoul
     
    Last edited: Oct 28, 2017
  21. raoul

    raoul

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

    These errors/warnings are all related to v2 scripts. It seems you imported the full package in your project, please remove all assets in the EasyRoads3D folder apart from the v3 beta unity package and double click this package to import v3. Or if you are already using v3, remove all scripts in /EasyRoads3D/scripts/ and EasyRoads3D/Editor/ apart from the dll's. Please backup your project first :)

    For upgrades you want to deselect all assets in the import window after the download has finished and only select the v3 beta package near the top in the Import window.

    As for v2, I am not sure what the problem is. On our end it imports just fine in 2017 provided that we confirm that Unity can upgrade the package during the import process. In any case, v2 will soon be fully replaced for v3.

    Thanks,
    Raoul
     
    CDUnityDev likes this.
  22. CDUnityDev

    CDUnityDev

    Joined:
    Jan 31, 2017
    Posts:
    25
    Excellent Raoul, that worked perfectly! Thank you for your help.
     
    raoul likes this.
  23. tri-stratos

    tri-stratos

    Joined:
    Jan 29, 2013
    Posts:
    152
    @raoul,

    Regarding the custom prefab method for creating non flat roads, is there a tutorial somewhere how these may be setup?

    If I understood you well, you propose to create roads for such a need, as one would do for creating railways for example right? The only difference is that one would use a deformed road mesh instead right? But how should the underneath terrain be deformed ? Don’t tell me manually !?
     
  24. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi tri-stratos,

    That is indeed done in a similar way as the railways, like done in the two "custom road network" videos.

    The assets in these two videos are also used in the current provisional demo project. Have you seen that scene? These custom road networks deform the terrain just like standard roads, no manual action involved.

    Thanks,
    Raoul
     
  25. tri-stratos

    tri-stratos

    Joined:
    Jan 29, 2013
    Posts:
    152
    @raoul
    Thank you for your reference. I will have to look them out more closely
     
  26. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Yes, the current demo project is provisional but it does bring across the general idea of how this tool works. Dynamic, built-in crossings / roads and road networks based on imported meshes.

    For custom road shapes, y = 0 represents the terrain height, that is what is used to flatten the terrain according custom road shapes. So if you create mesh models you will want the road geometry always be above y = 0.

    Thanks,
    Raoul
     
  27. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    687
    Attach to terrain

    Ok, so I have been looking at the documentation, which is for version 2.0 and the videos but I am missing how to get the roads to lie on the terrain. When I attempt to adjust the Y values I end up either partially below ground, or floating. What dumbass thing am I missing?

    Thanks
     
  28. raoul

    raoul

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

    What are the steps you take? Part of the process is adjusting the terrain to the shape of the roads, the middle mountain tab in the Inspector. This should align the terrain with the roads.

    The v3 manual is part of the package, here is the website version http://unityterraintools.com/EasyRoads3D/v3/manualv3.html

    Thanks,
    Raoul
     
    JamesWjRose likes this.
  29. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    687
    Ah, level the terrain to the road, not the other way. Ok. I'll give that a go. Thanks for the instant reply.
     
  30. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    You can have the road snap to the terrain instead throught the scripting API, but that will only work well on reasonably flat or gently rolling terrains.

    ERRoad.SnapToTerrain(bool value)

    Thanks,
    Raoul
     
    JamesWjRose likes this.
  31. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,560
    It worked - thank you :)
     
    raoul likes this.
  32. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    687
    From time to time when I attempt to connect a road to an intersection as I drag the road's green dot to the intersection's green dot the intersection's dot become red and will not connect. What am I doing wrong?

    Thanks.
     
  33. raoul

    raoul

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

    There are two situations that can result in the green dot turning red making it impossible to connect the road.

    1. The selected does not match the geometry structure of the specific crossing connection

    2. The angle of the road shape with that crossing connection is too sharp

    Does that answer the question? Otherwise, can you give more info / screenshots, what type of road is involved and which crossing?

    Thanks,
    Raoul
     
  34. Grendelbiter

    Grendelbiter

    Joined:
    Oct 14, 2016
    Posts:
    123
    Hello Raoul,

    I tried using Easyroads3d in the latest version of Unity, but when I try to add a River object (haven't tried road) Unity freezes up. I've waited over 20 mins. So then I upgraded to v3, deleted all the files and folders in Easyroads3d and double-clicked the v3 package. All installed fine and I can add a Road object (although Unity does freeze up for about five minutes) but there is only one type of road and no option for a River. Am I missing something or is that something you're still gonna add?
     
  35. raoul

    raoul

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

    The river object is indeed v2. Which version of Unity do you use, do you get error messages? In any case, version 2 will very soon be replaced by v3. So you may want to focus on v3.

    In v3 rivers can be simulated using side objects. The main demo scene includes an example. It is based on the "River Bed" and "River Surface" side objects available in the side objects "Terrain" tab.

    You could create a new "road type" in General Settings > Road Types.

    1. Name it "River Object"
    2. Switch on the Side Object toggle. This means that no road will be created.
    3. Activate the "River Bed" and "River Surface" side objects for this new "road" type.

    You now have a River object which you can select from the dropdown in the New Road / Object tab.

    Thanks,
    Raoul
     
    Grendelbiter likes this.
  36. Grendelbiter

    Grendelbiter

    Joined:
    Oct 14, 2016
    Posts:
    123
    After waiting a bit more it finally did add the River object. No error messages I guess it's just really slow. I'll try that with the side objects in v3.
     
  37. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Adding a river object should be instant in v2 as well. Building the final object and deforming the terrain can take longer depending on the terrain heightmap resolution, length of the river and vegetation / detail object density. But this is seconds, not minutes or longer. Unless perhaps if this is a massive scene with many terrain objects.

    Thanks,
    Raoul
     
  38. Grendelbiter

    Grendelbiter

    Joined:
    Oct 14, 2016
    Posts:
    123
    It's not a big Terrain, only 2kmx2km but it's a heavy Jungle scene with lots of trees and details.
     
  39. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Ok, How long does it take? And, if you like to get this sorted out for v2, can you provide more info or send me an example scene? Does this go faster with v3?

    You could also do a test on a simple terrain just to compare.

    Thanks,
    Raoul
     
    Last edited: Nov 6, 2017
  40. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    687

    Raoul,

    Thanks kindly for the quick reply. However, what is odd for me is that sometimes the connections work, and sometimes they don't. I am talking about disconnecting an existing X or T intersection and then attempting to reconnect it. What was working then doesn't. I have attempted many variations such as; "remove the current point and then add a new one or more, and then connect. Shaking the mouse all over the place near the intersection, and I think that one works just to screw with me.

    So... what info do you need? Would a video be best?
     
  41. raoul

    raoul

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

    Is this still about the connection handle turning red? Does this happen after first disconnecting the same road from that crossing?

    It would be helpful to see your situation. A video may help or you could email me a project / scene with an example of the issue so I can have a look at it.

    Thanks,
    Raoul
     
    JamesWjRose likes this.
  42. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    687
    I cannot find out wha
    I cannot find out the specifics on how to reproduce the issue, and WOW would that help if I could. Sending current project is not possible because of so many 3d party assets. I can see if I can create a simple project to get the issues to reproduce there. I'll give that a try tomorrow and get back to you.

    Have a great evening
     
  43. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Ok, thank you. Or perhaps duplicate the scene in the project folder, remove all other assets from the scene apart from the terrain and the road network and export the scene to a unity package also including the EasyRoads3D folders.

    It is just that at this moment there a no known issues related to connection handles turning red while they shouldn't, so more info would be helpful. Does this perhaps involve different sidewalk settings between the road and the crossing connection?

    Thanks,
    Raoul
     
  44. tri-stratos

    tri-stratos

    Joined:
    Jan 29, 2013
    Posts:
    152
    @raoul,

    I understand that road transparency is feasible through adding an alpha channel to the texture itself.

    Still how may one add specular to that, as may be added using the standard specular setup ?
    Seems that both shader uses the alpha channel as transparency and specular source accordingly.

    Is there a way to have them both ? Meaning a road with transparency in edges or elsewhere AND specular high spots ?
    If so, please keep us posted
     
  45. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi tri-stratos,

    That depends on the shader. Are you referring to a specific shader?

    The one in the 8.7 package doesn't support specular. Currently it includes metallic/smoothness options as sliders. This will be further updated so you can also use a texture for this like in the Unity standard shader. That is also what you want if you need specular because indeed the alpha channel of the road texture is usually used for transparency. The Unity standard secular shader also uses a separate map for specular.

    Thanks,
    Raoul
     
  46. tri-stratos

    tri-stratos

    Joined:
    Jan 29, 2013
    Posts:
    152
    @raoul
    So this is something that you will provide in newer release ?
    When is that expected ?
     
  47. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    What is it exactly that you want to achieve? Have you tried the new transparency shader in the 8.7 package? That will be further expanded with a metallic / smoothness texture map instead of a fixed value you can set now in the Inspector. This is fairly simply to do and can be added in the next update which will be the new demo project.

    Thanks,
    Raoul
     
  48. tri-stratos

    tri-stratos

    Joined:
    Jan 29, 2013
    Posts:
    152
    @raoul,
    To be able to use a road with transparency at edges but still define high specularity spots. An off-road road for example as shown in your examples, without specularity, seems more like a liveless mud, with no water or wet spots.
    That is what I'm asking. To be able to use transparency on a standard-specular type of shader.
    Any luck? If so how soon?
     
  49. Grendelbiter

    Grendelbiter

    Joined:
    Oct 14, 2016
    Posts:
    123
    Hi Raoul,

    I already installed v3 so I'm not sure anymore how long it took, but it was close to half an hour. With v3 it's a bit faster, still takes about 15 minutes. I tried a new scene with a small empty terrain and it was instant. It really is the tree and detail density. This is a snapshot of my scene: https://imgur.com/YL13ZCr
    Sending you my project is out of the question, it's a couple gigs big. The wait time might be some interference with another asset too, but I think it's just the heavy scene. I've come to accept it.
     
  50. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    At this moment releasing the new demo project and v3 has the highest priority.

    Wet look / reflection examples are on the list but the idea is to use metallic / smoothness maps for that, hence why I mentioned that and why I was asking what you exactly want to do. And this is already implemented in the new transparency shader, only the texture map option is missing which is easy to add.

    The new demo project is about ready. After that I will see if I can prepare an example of this. But this is shader related, perhaps examples of this using specular are already available on the forums?

    Thanks,
    Raoul