Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

EasyRoads3D v2 is out – Road, rivers, procedural geometry for Unity

Discussion in 'Assets and Asset Store' started by raoul, Mar 18, 2011.

  1. eridani

    eridani

    Joined:
    Aug 30, 2012
    Posts:
    655
    Hello is there an estimated timeframe for the release of the crossroads feature? It seems to have been in development for a while now. Thank you!
     
  2. Quen

    Quen

    Joined:
    Apr 6, 2010
    Posts:
    21
    Hey raoul,

    after setting up several roads, I had to reduce the height of my terrain. Is there any way of re-aligning the roads with the terrain again automaticly? It's a pretty complex scene, it would cost me days if I would have to edit every marker manually.
    Thanks in advance!

    Greetings,
    Quen
     
  3. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,612
    Hi Goblox,

    Yes, like mentioned in my previous post the terrain heightmap resolution can affect the quality of the terrain deformation because there are simply not enough terrain points to smoothly deform the terrain. So lowering the terrain a little bit further will not work here as the terrain is grid based and most likely that particular grid extends to outside the road. It will have the same affect as raising the road a little bit. Also raising the road a couple of cm above the terrain should not be noticable in game play. What could be done is lower the terrain a a couple of cm more in hilly areas only.

    Can you post or email me a screenshot of this?

    Yes, this is on the list. For now you can reduce the level of terrain deformation by positioning markers closer to each other. When moving markers you can hold the alt key (or the ctrl key) to snap the marker to the terrain height at that position.

    Do you mean in the terrain? In that case that would only be possible when using a relatively high terrain heightmap resolution. The alternative is to create the ditches as side objects

    Raoul
     
  4. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,612
    Hi eridani,

    A new update of the v3 beta was released 2 weeks ago and is available. It includes some major changes. There is one more big change to implement that will improve the performance on longer roads with many intersections. After that and some other bug fixes it is a matter of deciding which features to have in the first public reléase because there are som many different types of crossings / geometry layout options. Therefor for sure it will be an ongoing process for a while...

    Raoul
     
  5. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,612
    Hey Quen,

    Code (csharp):
    1.  
    2. using UnityEngine;
    3. using UnityEditor;
    4. using System.Collections;
    5.  
    6. public class SnapMarkersScript : ScriptableObject {
    7.  
    8.     [MenuItem( "EasyRoads3D/Snap Markers" )]
    9.     public static void  SnapMarkers ()
    10.     {
    11.         MarkerScript[] scripts = (MarkerScript[])FindObjectsOfType(typeof(MarkerScript));
    12.         foreach(MarkerScript scr in scripts){
    13.             Vector3 v = scr.transform.position;
    14.             v.y = Terrain.activeTerrain.SampleHeight(scr.transform.position);
    15.             scr.transform.position = v;
    16.         }
    17.     }
    18. }
    19.  
    The above script should snap all markers to the terrain height at that position.

    Create a new c# script in Assets/EasyRoads3D/Editor/SnapMarkerScript.cs

    It will add a new option "Snap Markers" to the EasyRoads3D Menu.

    Let me know if you need further help with this!

    Raoul
     
  6. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,612
    Also, EasyRoads3D Pro is currently part of the 24 hour Assetstore sale! Grab it now quickly and save 50% if you do not have your copy of the Pro version yet!

    Raoul
     
  7. Quen

    Quen

    Joined:
    Apr 6, 2010
    Posts:
    21
    Thanks for your fast answer, worked perfectly! :)
     
  8. eridani

    eridani

    Joined:
    Aug 30, 2012
    Posts:
    655
    Ok thank you for the fast reply. I have one more question:

    I'm trying to target mobile games so I'm looking at different ways of exporting the Unity terrain as an obj, and then reducing the polycount, and then bringing it back into Unity as a low polygon obj mesh.

    I think EasyRoads can export its roads to obj as well. I'm wondering if there is a way to make sure an obj road sticks to the obj terrain mesh? After the polycounts are reduced I think it would be almost impossible for the obj road to stick to an obj terrain mesh that has a lot of hills and valleys. Am I asking for too much? Anyway thank you very much!
     
  9. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,612
    Hi erdidani,

    Yes, when you optimize the terrain you should make sure to keep detail where the road is. It goes beyond the tool to implement this sort of terrain optimization. You will need something like the cruncher tool to optimize the terrain inside Unity. I did experiment with the API but couldn't get it to work nicely with the road at that time. I can try again if you own a license for the cruncher tool... In that case I can also send you the test scripts I used.

    You can indeed export the road to .obj. I guess it depends on your modelling app whether it supports something like locking vértices based on another object (the road).

    Raoul
     
    Last edited: Nov 17, 2013
  10. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,612
    v2.5.4 is now available, the Assetstore version is pending approval...

    ----------------------------------------------------------------------------------------------------

    New:
    - A new option "Tangents" has been added to the General Settings tab in the Inspector. This will automatically calculate mesh tangent data which is required when you using bumped shader on the road. Alternatively you could also use the newly added "Calculate Tangents" button in the Inspector after clicking the middle tab to process the terrain.
    - A button "Finalize Object" is now available in the Inspector after clicking the middle tab to process the terrain. This process does the same as "Build EasyRoads3D Objects" from the main EasyRoads3D Menu but only for this road object. It will unlink the road mesh from the EasyRoads3D object, rename it to the same name as the EasyRoads3D object and destroy the EasyRoads3D editor object. Check the manual for more info.

    Improvements:
    - terrain texture info is now always updated after terrain changes.
    - Multiple Terrains: Ctrl+Alt+Click this will automatcially set the clicked terrain as the selected terrain in the Multiple Terrains dropdown in "General Settings".
    - A "Quick Start" section has been added to the manual.


    Fixes:
    - Blank road textures in the Texture window when using version control in a Unity project.
    - Procedural side objects Mesh triangulation issues with iOS Platform enabled in General Settings and using Clamp left or Clamp Right as the Controller type in the Side Object Manager
    - Unity 4.3 obsolete code warnings
    - Console errors and issues when building for Phone 8 on Windows 8
     
  11. Goblox

    Goblox

    Joined:
    Nov 3, 2012
    Posts:
    178
    I'm using a fairly high resolution heightmap but, yeah, for people using 4+ meters per pixel there's not as much to be done about it. If nothing else you might consider allowing users to enable a road edge to fill in the gap created when the road is raised(!) This could actually improve the look of the road quite a bit, keep rigidbodies from getting stuck on the edge (a common problem for me), and possibly most importantly allow people using terrain shaders that can blend objects onto the terrain the opportunity to get a more natural looking transition at the edge of the road. Here's a screenshot from RAGE; about the only thing the game does well is visuals. You can see the edge of the road comes down from the raised road to meet the dirt in some places.

    $2013-11-23_00001s.jpg

    Sure. You can see the first four points are in a straight line (x coord is the same), only the fifth point is offset to create a curve and I wanted the road to be straight all the way to the 4th marker. ...Okay so you might suggest that I simply pull the 4th marker over to form the curve. In the next picture you can see that that when I pull the 4th marker over to mostly straighten out the section between marker 3 and 4, I now produce the same sort of opposite curve between marker 2 and 3 that I was trying to correct between 3 and 4 when all I wanted was a straight line from marker 1 - 4 and a curve from 4 to 5. Technically, there's no way to implement this behavior because there's no way to tell easy roads how sharp I want the curve to be without moving markers. If there were controls to shape the curve on either side of a marker (à la Adobe Illustrator), now you wouldn't need to do so much fiddling to try and lay your roads where you want, only to never be able to produce straight sections of roads if the neighboring marker forms a curve.

    $curverage.png



    It would make things a lot easier.

    And I am using a fairly high terrain resolution. ...I suppose maybe I could create a scripted side object to modify the terrain and then dispose of it...
     
  12. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,612
    Yes, I have thought about adding that. But that is also more or less already possible through the side objects system. Simply recreate the road with these edge fills as a side object and hide/remove the original road.

    There are already a couple of very good shader packages that allow you to blend objects with the terrain. You will be able to get similar results as in the RAGE screenshot. This type of improvements are on the list but at the moment road specific features have more priority.

    There are big gaps between the marker positions and the distance to the markers surrounding the marker where the bend should occur are bigger then the distance to their neighbour markers. This marker layout indeed results in stronger spline curves. If you do the opposite and insert additional markers near the bend and reduce distances you can create a straight road that at the end bends to the right.



    Yes you will need that. It also depends on the width of the ditch but imaging you want a 2 meter wide ditch next to the road, this will at least require 4 terrain points to shape the ditch. A default terrain of 2000x2000 and a heightmap resolution of 512 as an heightmap scale of about 5 meter. So instead of having 4 terrain points inside 2 meter you will only have a single terrain point every 5 meter! This makes this hard to implement it as a “feature” because in most cases it will not have good results. It certainly is possible when using a big heightmap on a smaller terrain size.
     
  13. Robsy128

    Robsy128

    Joined:
    Aug 8, 2013
    Posts:
    35
    Hey guys :) I'm trying to make a massive waterfall/river in one of my maps and I'm using this kit to do so. I've increased my river width, although it just seems to do the bank - not the actual river itself. Here's a screenshot to show you what I'm talking about:

    $capture2.jpg

    Is there any way to increase the river? I've tried playing around with the scale of the river, but it just moves it :/

    Also, whilst I'm here; is there any way to animate the river to match the geometry with this tool? I can only animate it in one direction, which isn't very good when you have a river bending and winding all over the place!
     
  14. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,612
    Hey Robsy128, that is a screenshot of the river object in Edit Mode. Does the river surface mesh also look like that after clicking the middle mountain tab which will create the river shape in the terrain? If so, do you get better results when increasing the Floor Depth in the General Settings tab?

    The river object does not include custom shaders it is primarly intended to create the surface mesh. You can use all Unity water materials on it but I belief indeed it doesn't include a material dedicated to rivers. Have you tried the water material used in the Bootcamp demo? I think that is what you are looking for. Also, there used to be sewer demo project which also included a streaming water material. Otherwise you may want to check all the water solutions on the Assetstore.
     
  15. Robsy128

    Robsy128

    Joined:
    Aug 8, 2013
    Posts:
    35
    Hey Raoul,

    It still looks like that when it's finished rendering. I've increased the floor depth to over 1000 and I see no change :(

    As for the river flow, no worries! I'm going to use the Relief Terrain Pack (if I can with this tool?)

    Here's a screenshot of my large river when not in edit mode:


    $capture2_zps6c538fd9.jpg
     

    Attached Files:

    Last edited: Nov 24, 2013
  16. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,612
    In the screenshot of your previous post I cannot see any markers. What are the marker Y positions relative to the terrain height? The Y position of the marker represents the water surface. Are the markers actually above the terrains Y position? Otherwise it will not be possible to create the river floor accurately because you cannot deform the terrain to below it's Y position, the water surface will be at the same height as the river floor. Is that what is happening?
     
  17. olgusahin

    olgusahin

    Joined:
    Jun 10, 2013
    Posts:
    7
    Hey raoul,

    Is there anyway that I can reduce the mesh count of the final built object? I know i can play with the road geometry slider for the resolution of the road while in edit mode but when I build them the OBJ file created in the folder is always has the highest vertex count. Some of the roads I'm drawing are not that curvy and I would like to have less vertex detail to get better performance (i also have mesh colliders on the road object so in some cases the number of vertices does really make a difference.

    Thanks for the great tool!
     
  18. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,612
    Hey olgusahin,

    Glad you like it!

    Yes, EasyRoads3D uses different geometry resolutions for Build and Edit mode. Check the Inspector in Build Mode, you will see another geometry slider in the same section where you can control the UVs and road segments.

    Let me know if you need further help with this!
     
  19. OneShotGG

    OneShotGG

    Joined:
    Nov 16, 2012
    Posts:
    225
    Hi, new owner here, finally pulled the trigger because of the new intersections in beta. I registered and was able to get the extra files but haven't been able to figure out where to download the beta. Do I need to do something special to get in?

    thanks!
     
  20. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,612
    Hi OneShotGG, I will send the beta to you. Can you send a PM with your email address?
     
  21. vicciu5

    vicciu5

    Joined:
    Sep 4, 2013
    Posts:
    11
    Hi raoul, I really need the crossing material option for my game. Do you know when will this option be released?
     
  22. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,612
    Hi vicciu5, it depends on what features you require, there are so many different types of crossings to implement... A couple of weeks ago a new beta was released, it is not bug free yet, but the known issues part of the manual explains how to deal with these issues. If you need standard crossings, it should already do what you need.
     
  23. vicciu5

    vicciu5

    Joined:
    Sep 4, 2013
    Posts:
    11
    What I need is to be able to choose the crossing material at the standard crossroads. At this moment the road lines are drawn inside the intersections, however I need is to have just bare asphalt in the intersections. Choosing the crossing material has no effect from what I've seen and the manual also says that this feature is not yet implemented
     
  24. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,612
    Yes, that will be implemented. If you need it urgently, you could use the export to .obj option. This will export the full road network. You can then detach the specific crossing triangles in your modelling app and merge them together in a single group so you can assign a unique crossing material to that new object.
     
  25. DesertRaven

    DesertRaven

    Joined:
    Jul 15, 2012
    Posts:
    137
    Can you direct me to a camera controller script that would be able to follow the road created in easy road? Did you ever think of adding some car or train controllers to the package?
     
  26. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,612
    Hi DesertRaven, I can send you a script for that, do I have your email address? That script is used for the fly over videos. It moves an empty gameobject along the spline shape, the camera includes a modified smoothfollow script to follow the empty object. You can use both scripts as a starting point for what you need.

    Yes, I did think of that. As you will see from those scripts, it is not so hard to have a car follow the spline shape and using the road width information it is also fairly easy to have cars move more randomly on the road or in specific lanes. The hard part is interaction between cars...
     
  27. jeremiasz

    jeremiasz

    Joined:
    Feb 17, 2013
    Posts:
    53
    Hi!
    Does 2.5.4.1 Pro version available on the Asset Store includes (future?) upgrade to v3?
     
  28. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,612
    Hi jeremiasz, yes the Assetstore Pro version does include all future updates and versions for free. And it is On Sale now...
     
  29. I am da bawss

    I am da bawss

    Joined:
    Jun 2, 2011
    Posts:
    2,574
    Hey Raoul, I just updated to the latest version of EasyRoad 3D and noticed that the menu for EasyRoad seems to have disappeared from the top menu bar and now I can only find it in the GameObject -> Create Other -> EasyRoad 3D. Is that intentional?
     
  30. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,612
    Hey I am da bawss, yes, to avoid cluttering of the main menu the Assetstore no longer allows extensions to be positioned in the Main Menu. That is why it took a while before v2.5.4 was accepted...

    If you really want it in the main menu you could do a:

    "GameObject/Create Other/EasyRoads3D/" > "EasyRoads3D/"

    replace in /Assets/EasyRoads3D/Editor/EasyRoadsEditorMenu.cs
     
  31. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,114
    Hi Raoul, does EasyRoads work with Tiled Terrains? I have a multi tiled terrain that's 60Km Sq (15x15 tiles).
    I've imported EasyRoads V3beta into the project, but can't get markers to create to build the roads. They work fine on a single tile terrain.
    I'm using TerrainComposser and was wishing to use EasyRoadsPro with this fantastic Asset.
     
  32. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,612
    Hi John,

    That is right, multiple terrains are not yet supported in the v3 beta. I wanted to put a little bit more time into this compared to how multiple terrains support works in v2. I received more questions about this. I will see if I can implement it in the next build.
     
  33. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,114
    Ok thanks Raoul.
     
  34. PrettyFlyGames

    PrettyFlyGames

    Joined:
    Aug 30, 2012
    Posts:
    74
    Hi Raoul!

    Thanks for the reply in the other thread!

    I've found it can now keep working.

    However Easy Roads 3D seems to be crashing #Unity3D in the lastest releases, does anybody else have this problem with Unity 4.3.1f1?


    My current Project is too large to use as a reproducable Project.
     
  35. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,612
    Hi Dweebster,

    When exactly does that happen, when adding a new road object? When adding markers? Or when deforming the terrain?

    And does the same happen in a fresh new project?
     
  36. Andreas12345

    Andreas12345

    Joined:
    Oct 17, 2013
    Posts:
    523
    The Manual explain me not enough. I have problems to create sideObjects etc...
    I have load it in my Project, but i found no demoScene.
    Can i have a demoScene please.
     
  37. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,612
    H Andreas12345, please send me a PM if you purchased through the Assetstore and if you want to download the demo project. Or have a look at the _readme file in the root directory of the imported package.

    And if something is not clear you can always ask by email or here on the forums.

    Raoul
     
  38. latas

    latas

    Joined:
    Oct 9, 2013
    Posts:
    149
    No way to make work side objects. How to use it? Why video tutorials are deprecated? There are no samples of objects as video tutorials shown. I don't understand very well this. I purchased the pro version to make several things faster. I'm spending a lot of time doing try and error. I don't want that. I want a good sample, document or video, that matches the current release I've purchased.

    Can you please provide some information concerning to this, please?
     
  39. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,612
    Hello Latas,

    Side objects is a system. You can make your own side objects and use them on the road objects. That's why no side objects are included in the package itself, to avoid that always assets are imported in your project while you will probably not use them.

    Have you seen my reply above? For additional resources please send me a pm or have a look at the _readme file in the root directory of the imported package:

    /Assets/EasyRoads3D/_readme.txt

    I will send you a link to the side objects example package and the demo project. You will find most of the side objects shown in the videos in that package. The demo project is useful to see how side objects can be used in a scene.

    And if you have problems with something specific you can always ask here or contact me by email.
     
  40. Andreas12345

    Andreas12345

    Joined:
    Oct 17, 2013
    Posts:
    523
    I use the sideobjects from you demo Level, and they do not work.

    I use Unity 4.3.0f4

    ArgumentException:
    When i hit now: Process the Terrain :
    Unity Crash.

    2 Things
    You need to make a more helpfully tutorial to get started, also with sideObjects.
    You need to do some VideoTutorial for us.
     
    Last edited: Dec 29, 2013
  41. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,612
    Hello Andreas12345,

    Do you mean you used the side objects from the demo Project in your own project or did these problems happen in the demo project itself?

    If you used the side objects in your own project than both the sideobjects log file as the used prefabs must be physically present in your own project. Is that what you did?

    Most likely it is easier to download the example side objects package from .http://www.unityterraintools.com/downloads.php . This package includes all the side objects used in the demo project pluse additional side objects such as the bootcamp fence and rocks side objects. You can import all or a selection of side objects. Check the install notes for further details.

    At the top of the manual there is a Quick Start section. I am currently updating the demo project to the latest version. The package will also include detailed explanations on how the side objects are setup in the side object manager and how they are used in the example scenes. It will be available later this week after Christmas.
     
  42. Andreas12345

    Andreas12345

    Joined:
    Oct 17, 2013
    Posts:
    523
    I make a new fresh project
    load easyRoads 3d from asset store
    import the models from your download

    create a easyroad New Object.

    Generate a terrain, put some plants on it.

    draw my road (closed track)

    go to Sideobjects and builld a right curve stone with start and end prefab.... give it a material and clamp right (Like in the demo)

    i go to settings:

    Auto create side Objects *check
    Active side Objects *check

    I click Process-..... no side Objects are showing.

    It is still not working!
     
  43. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,612
    Hi Andreas12345,

    I received your PM with the unity package link.

    I created a new scene and added a road object. Indeed the side object was not build. Then I looked at the side object in the side object manager. You use "rightCurveStoneStartPrefab" as the trace object and the nodes are displayed correctly in the 2D editor window. Then I looked at the sideobjects data file, these nodes are actually not stored in that file.

    It seems the missing step in your work flow was clicking the "Apply" button in the 2D editor window and save the side object with this node data. When I did this, the nodes were indeed visible in the side objects data file and the side object is also build accordingly in the scene. Can you check this?
     
  44. Andreas12345

    Andreas12345

    Joined:
    Oct 17, 2013
    Posts:
    523
    Ahhh, this help me a lot.

    Keep up the good support!

    And NOW
    Merry Christmas
     
  45. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,612
    Ok, glad that helped!

    And a Merry Christmas to you and everyone else too
     
  46. DSebJ

    DSebJ

    Joined:
    Mar 30, 2013
    Posts:
    101
    Hi, Does this version now include the ability for roads to intersect? Or is that a feature that's still coming?
     
  47. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,612
    Hellp DSebj, the current public version 2.5.4 does not support intersections. Because there are so many different types of intersections and possible geometry layouts it is hard to say when all this will be publicly available. It depends on what type of intersections you require. The intersections version is released in betas and available if you have a Pro license.
     
  48. Imillionaire

    Imillionaire

    Joined:
    Dec 14, 2012
    Posts:
    60
    is there any way to make the road a 3D object instead of a flat surface, so that i wont have terrain poking through the road? at the moment i raise the road about 5 CM, but then it floats in the air so if you look closely enough it players would be able to see it.
     
  49. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,612
    Hi Imillionaire ,

    Generally, raising the road 2 or 3 cm should be fine. it depends on the terrains heightmap resolution, terrain size and how hilly the area is. Big height differences over short distances on a lower heightmap resolution may need attention.

    If you want to keep the road shape and terrain resolution as it is and the terrain is poking slightly through the road, you could lower the Offset margins in the EasyRoads3D shaders a little bit.

    Indeed, you can also use a custom road shape through the side objects system. See the image below.

    Simply create a new procedural side object open the Geometry Window and draw the nodes for example as below in the attached image, uncheck "Render" in the Inspector after building the final road (middle mountain tab) to hide the default road object and enable the newly created "road" side object in the Inspector.

    Let me know if you haver further questions regarding this!

    Raoul
     

    Attached Files:

    Last edited: Jan 2, 2014
  50. n4cer500

    n4cer500

    Joined:
    Dec 20, 2013
    Posts:
    6
    Hi Raoul

    I bought EasyRoads3d - thank you, it's an awesome product.

    Quick question: If I increase the road width setting, the bridge side objects pop up through the road at the original width. Is there an easy way to fix this or do I need to create new bridge geometries for the different road widths I need?

    Thanks again

    Adam