Search Unity

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

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

  1. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    @Z31NA2T, Shigidy asked the same question just above your first post on this page. Have a look for the _readme file in the main EasyRoads3D folder of the imported package!

    @CrazySi, Intersections is being worked on and available in alpha /betas versions. EasyRoads3D exists for 3 years, never heard off floating roads, have you ever contacted me about that? Do you have screenshots? Regarding the quote from Z31NA2T you included in your post, have a look at my answer to that post and Z31NA2T confirmation further below what caused it. You cannot lower the terrain below 0, that is how the unity terrain object works. It results in the terrain being rendered above the road. Make sure road markers are safely above the terrains Y position.

    If anyone experiences floating roads with the free or full version, please let me know...
     
    Last edited: Sep 7, 2012
  2. Z31NA2T

    Z31NA2T

    Joined:
    Sep 8, 2011
    Posts:
    43
    I havent had any issues with floating roads, just the terrain showing through the road which was because they were a negative Y position as you said...and I still havent figured out side objects but I'm sure its something what how I'm setting it up or my prefabs. I'm happy with it thus far.
     
  3. Z31NA2T

    Z31NA2T

    Joined:
    Sep 8, 2011
    Posts:
    43
    Heres one question. How do I set a collider to the road so UnityCar stuff will drive on it properly?

    Also, I just sent the registration info in just a minute ago. :-D
     
  4. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    The demo project includes two scenes with different types of side objects. You can use it as a reference to see how the side objects are setup and being used in the scene regarding marker settings for side objects. Just let me know if you have questions or you can't get something to work!
     
  5. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    A Mesh Collider is automatically added to the road mesh, you can see that in the inspector when you select the road in the hierarchy.
     
  6. Z31NA2T

    Z31NA2T

    Joined:
    Sep 8, 2011
    Posts:
    43
    Its strange though because the wheels on my car sink through the road but are flat on the terrain, as if theres no collider working on the road mesh...because I saw that. I don't get it. I'd seek help from the UnityCar developer but I don't think its the issue since it works fine with the terrain.....
     
  7. Z31NA2T

    Z31NA2T

    Joined:
    Sep 8, 2011
    Posts:
    43
    Disregard this, the collisions are working with the road (I checked with a bridge object to confirm with it raised off the terrain), the wheels are just sinking in for some other reason. I'll figure it out, since its not related to EasyRoads I'll stop bugging you for help about it. lol
     
  8. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Are you using the Car Tutorial physics? It has been a while since I looked at it but I guess it is still the same, the wheels indeed sink a little bit in the road. I tested the same car physics on an ordinary plane primitive and the same thing happens so I guess it is not realy related to the road mesh and mesh collider. What someone did as a workaround was the following:

    1. duplicate the road mesh
    2. raise the duplicate above the other road and disable the renderer in the Inspector
    3. remove the mesh collider on the original road
    4. tweak the height of the duplicated mesh with the mesh collider until the wheels look good on the visible road
     
  9. Z31NA2T

    Z31NA2T

    Joined:
    Sep 8, 2011
    Posts:
    43
    I am using UnityCar 1.2..currently awaiting 2.0 which is supposed to fix some of the sinking I think? Not sure, but I'll figure it out. Thanks!
     
  10. Defragmenter

    Defragmenter

    Joined:
    Sep 25, 2012
    Posts:
    11
    Hi Raoul,
    I am very exited and interested to buy and use EasyRoads3D.

    I have tested the free version and I have notised a problem with blob projections and road material.
    I would be happy if there is a solution.

     
  11. raoul

    raoul

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

    That is probably due to the EasyRoads3D offset shaders which ensure that the road is rendered on top of the terrain. You can use one of the standard shaders on the road material but in that case you will have to raise the road a little bit above the terrain. Alternatively you can experiment with using a similar offset shader on the material in your blob projector but make sure that the offset values are slightly lower then that of the road shader.

    Or send your project to me and I will look at it...
     
  12. Defragmenter

    Defragmenter

    Joined:
    Sep 25, 2012
    Posts:
    11
    Thank you Raoul for your help.
    Both solutions are working!
    - I raised the road at (Y: 0.03) and it works
    - I lowed the offset of the blob shader: (Offset -8, -8) and it works.

    I have one more question. When version 3 of the EasyRoads3D will be out? I need the crossroads feature.
     
  13. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Glad that worked!

    There is no ETA for v3, that is why it is released in betas / alphas. At the moment dead ends, cul-de-sacs are being implemented for which we will send out an email to beta testers as we need some feedback. But we are also working on openstreetmap integration and a bridge for the polygon cruncher plugin so terrain optimization for mobile can be done directly within Unity. So lots of things to do...
     
  14. Hamesh81

    Hamesh81

    Joined:
    Mar 9, 2012
    Posts:
    405
    I have two questions regarding EasyRoads3D v3:

    1) Will the River system be updated to work correctly with Unity Pro Water 3 4
    2) Are there any updates on the WIP cave/overhang system, I haven't heard anything about this for a while. Has this been abandoned?

    Thanks a lot, and keep up the awesome work!!
     
  15. raoul

    raoul

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

    1. Water 3 is already supported as long as you imported those assets in your project. In that case the water 3 materials and scripts will become available in the respective dropdown boxes. Water 4 is not supported. I haven't really looked at it, from what I have read here on the forums it is rather performance heavy. So far there has only been one other question regarding this, I did put it is on the list to look at. But if this is something that more people would like to see supported I can give it more priority.

    2. The cave project is not abonded but it is indeed on hold. One of the features for EasyRoads3D to implement is support for tunnels which will use the same technique. Once that is being implemented, the cave project will also be picked up. If I remember well, there were issues when deferred lighting is used, that is what needs to be fixed and editor controls need to be improved to create the cave entrance.

    Thanks,
    Raoul
     
  16. Hamesh81

    Hamesh81

    Joined:
    Mar 9, 2012
    Posts:
    405
    Water Pro 3 support is great news, I remember having trouble with it previously. And yes I was actually referring to the tunnel system, the part that integrates with EasyRoads (I thought they were the one and the same project). Will this be a part of the version 3 release, or is development on this feature being pushed back? Personally for me, I do not use deferred lighting in my projects so even if that small aspect was not working I would still love to buy it :D I have no doubt there are many unity users who would welcome a tunnel solution. It has been sought after for a long time.
    Thanks for your reply.
     
    Last edited: Oct 19, 2012
  17. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Just let me know if you still have problems getting water 3 to work on the generated geometry. The main new v3 feature is support for crossings, which is partially already available in betas, once all the main features for that are done v3 will be released. So tunnels will not be part of the initial v3 release. It will be implemented later in 3.x. Yes, I agree and I really like to continue with that cave project but at the moment the focus is on crossings for v3 and some final v2 features I already mentioned earlier on this page, basic support for OpenStreetMap (in v3 road templates and import for different road types will be supported) and terrain mesh optimization for mobile directly in Unity through the cruncher polygon plugin. In between work, when I have some free time, I will get back to the cave project.
     
  18. Hamesh81

    Hamesh81

    Joined:
    Mar 9, 2012
    Posts:
    405
    Sure no problems, thanks for the information :)
     
  19. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    This sounds like a very welcome feature! Can you elaborate on what this template is likely to be? i.e. is it vector based or bitmap?
     
  20. raoul

    raoul

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

    In v2, by default all roads use the same material which you can customize by duplicating the material, etc. . In v3 each road by default have their own material. Road templates include material type and width and perhaps other settings. Regarding import I was referring to openstreetmap. Openstreetmap data includes all sorts of road types, each object usually has a road type assigned (highway, residential, path, etc). These road types can be matched with the EasyRoads3D road templates you created. So upon import of the openstreetmap file, each road object will automatically have the correct material etc. assigned.

    But import of other file types can always be added if there is interest. That is also where the openstreetmap support comes from.I have had questions in the past regarding openstreetmap and recently I had another request and started looking into this. I was quite amazed at how detailed this data can be so started experimenting with it.
     
    Last edited: Oct 21, 2012
  21. ZachGriffin

    ZachGriffin

    Joined:
    Apr 1, 2010
    Posts:
    49
    Hi Raoul,

    I haven't found any info as to whether roads can be placed across multiple terrains. Is this possible with your tool?

    Regards,

    Zach
     
  22. raoul

    raoul

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

    By default the active terrain will be the target terrain. However, in "General Settings" you can activate "Multiple terrains" and further below in the Inspector you will see a dropdown box with all the terrains. You can select the active terrain from this dropdown. So instead of always processing all terrains (which is performance heavy), you can work on / process each terrain individually.

    Thanks,
    Raoul
     
  23. Marco-Sperling

    Marco-Sperling

    Joined:
    Mar 5, 2012
    Posts:
    620
    Hi Raoul,
    today I bought your tool. And so far it seems to be doing a great job. I can directly compare it to Grome's Road Network tool and I have to admit that yours is coming quite close to what Quadsoftware has to offer. Only they allow intersections and manipulation of bezier spline handles.
    What's not so great about EasyRoads3D is the creation/insertion of new markers - that process is working only (about) 1 out of 6 times or so. The other 5 times your script does not react to my SHIFT-LMB click ... any idea why this happens?

    A progress bar or some kind of in progress notification would be nice so that you actually know when the new marker is being processed/included. Currently - due to the bug above - you never know if you've got to wait another few seconds for the marker to appear... or if it was another failed attempt.

    Also the script locked me out from manipulating the scene view camera - no rotation or translation possible. Had to restart Unity.
     
    Last edited: Nov 21, 2012
  24. raoul

    raoul

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

    Glad you like it!

    Intersections is being worked on and available in beta versions. The current status can be seen in demos at www.unityterraintools.com. Currently roundabouts and dead ends / cul-de-sacs are being implemented, see sample image below.



    I am unaware of any problems regarding adding markers. I just double checked in Unity 4 and I get a 100% response rate on SHIFT-LMB.

    Adding markers shouldn't take processing time in a way that, I belief, a progressbar will be helpfull. If nothing happend after one sec then you can be pretty sure SHIFT-LMB wasn't captured.

    The code used for SHIFT-LMB is:

    Code (csharp):
    1.  
    2. var cEvent : Event = Event.current;
    3. ...
    4.  
    5. if(cEvent.shift   cEvent.type == EventType.mouseDown){
    6.  
    7. {
    8.  
    You could do some debug tests or I can provide further test scripts, send me a pm with your email if you want that.

    Regarding the scene cam, the current beta 3 has some not completely working code that manipulates the scene cam, but this is not part of the current v2 release. When exactly does that happen? Is there a pattern?
     
  25. PrimeDerektive

    PrimeDerektive

    Joined:
    Dec 13, 2009
    Posts:
    3,090
    Hey raoul, before I purchase pro, I was wondering if you could apply a different material to an LOD segment of the same road? I'd like to fade a road out to a dead end (its a dirt road) with a faded out version of the same texture and the transparent shader, tweaking the y-tiling on the material til it fit right. There is no way to break up a road in the free version into multiple parts is there?
     
  26. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi PrimeDerektive, that is indeed not possible with the free version. With Pro you can start a new LOD segment at each marker which creates a new game object starting at that marker. So, yes, you can indeed use that to apply different materials to the road. This is v2, LOD segments in the v3 beta is not yet enabled!
     
  27. janpec

    janpec

    Joined:
    Jul 16, 2010
    Posts:
    3,520
    Raul i got two questions, how hard would it be to place roads in realtime, and why are shadows not working on roads on my side? Shadows are normally cast on all objects but road does not receive them.
     
  28. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi janpec, creating roads at runtime, is that roads only or also side objects? Roads only shouldn't take that much time but I am quite busy at the moment implementing other features.

    “Receive Shadows” should be automatically enabled on the renderer attached to the road and over here both hard and soft shadows work fine. Have you tried the demo project, do the roads in the demo receive shadows on your side? Or can this be a customized layers problem? EasyRoads3D uses layers 30 and 31 but in that case you should notice that anyway regarding how the road is lit... Or do you mean projectors?
     
    Last edited: Nov 24, 2012
  29. knocks

    knocks

    Joined:
    Jul 1, 2012
    Posts:
    23
    Need water4 support as i do not have water3.
     
  30. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi Knocks, I just had a look and indeed it seems water3 is no longer part of the water package that comes with Unity 4. In the past I had a look at water4, it looks more suitable for oceans and big lakes. It is also quite performance heavy. That is why I never implemented support in EasyRoads3D for the river object. Now water3 no longer exists I will have another look. Regarding water3, it still works well in Unity 4 so if you want to use water3 you could get the package from Unity 3 or even from the EasyRoads3D demo project.

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

    A general note: Christmas sales started last week: 33% off

    Get it here: http://u3d.as/content/anda-soft/easy-roads3d-pro/1Ch

    or here: http://unityterraintools.com/store.php (promo code: christmas2012 )
     
  31. knocks

    knocks

    Joined:
    Jul 1, 2012
    Posts:
    23
    Thanks Raoul, I have yet to look at the demo project, ill take a look as my unity 3 only includes version 4 as well.
     
  32. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    I experimented a bit with water 4. It might be a bit too complex to integrate in EasyRoads3D. But instead you could try using the river mesh created by EasyRoads3D on the water 4 object (see below steps). I didn’t do a lot of testing but it seems to work well.

    1. Put the attached script in /Assets/EasyRoads3D/Editor . It will add a new item “Save River Mesh” to the EasyRoads3D menu at the top
    2. Select the river object in the hierarchy and run the above script. This will create a mesh asset with the name “_river_mesh.asset” near the top in the assets folder. Drag the asset to another folder if you want.
    3. Select the water 4 game object and make sure it is positioned at x=0 and z = 0. Put the y value at the same level as the river object created by EasyRoads3D.
    4. The water 4 game object has a number of “Tile” child objects with mesh renderers attached. Deactivate these tile objects except for one.
    5. Drag the river mesh asset to the Mesh Filter component of the still active tile object. Make sure the scale of this tile object is 1 and that it is positioned at (0,0,0).

    The water 4 object should now be visible. You probably want to tweak the water 4 settings a bit because the default waves are a bit heavy for a river. Otherwise you probably have to raise the river a bit.

    Hope this helps!
     

    Attached Files:

  33. knocks

    knocks

    Joined:
    Jul 1, 2012
    Posts:
    23
    Thanks ill be sure to check it out, i also downloaded the demo so ill go over that as well. I appreciate the support.
     
  34. napalm44

    napalm44

    Joined:
    Apr 23, 2010
    Posts:
    14
    Hey Raoul,

    I am making a game that requires the camera to track the road itself. In your opinion, what is the easiest way to get the center point (or forward facing Vector) of the current section of track as the camera moves through the course?
     
  35. raoul

    raoul

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

    Are you confortable with coding?

    If the cam is always above the road you could store the mesh vertice positions in an array and raycast the road to get the triangle index it hits:

    Middle of the road is halfway vertice[triangle index * 3] and vertice[index * 3 + 1]
    Forward is (vertice[triangle index * 3 + 2] - vertice[triangle index * 3]).normalized

    Another way is to calculate the position based on the spline shape of the road, the road length and the travelled distance. This approach was used for the demo videos. If you want I can send you the script I used for that. You probably have to adapt it to your specific cam behaviour but it can help as a starting point. Send me a PM or contact me through www.unityterraintools.com if you are interested in that.


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

    Christmas sales started last week: 33% off

    Get it here: http://u3d.as/content/anda-soft/easy-roads3d-pro/1Ch

    or here: http://unityterraintools.com/store.php (promo code: christmas2012 )
     
    Last edited: Dec 15, 2012
  36. napalm44

    napalm44

    Joined:
    Apr 23, 2010
    Posts:
    14
    Yea, I'm doing most of my game work in C# and would be able to do that. I was thinking the road spline would be the way to go, and probably faster and/or less memory intensive? Plus since I'll need to know which way the road is heading, I imagine the spline has some sort of direction component that will help me orient the camera.

    I will shoot you an email now!
     
  37. Shigidy

    Shigidy

    Joined:
    Dec 14, 2011
    Posts:
    441
    Hi, I'm trying to download the side objects from your website, but I bought it off the asset store. What do I put for the serial number to get the download, because the invoice and the po number didnt work. Thanks.

    Also when making procedural objects, how do you put the points down. Because when I click it never puts the points on the "canvas".
     
    Last edited: Dec 16, 2012
  38. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi Shigidy, have a look at the _readme file in the root directory of the imported package.

    To add nodes in the prodecural object editor window, simply double click on the canvas where you want to position the node. The nodes will connect automatically...
     
  39. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Hi Raoul,

    Is there any way to add tangents to the side object mesh so I can use a bumped shader in the material? If so, how do I do it?

    Also, in the side object editor, is there any way to drag select and move multiple points?

    Thanks!
     
  40. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,366
    You can build geometry with normal and tangets inside Unity with the Mesh class (if i remember well).
     
  41. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi bigkahuna / tatoforever,

    Actually there is not such a thing like RecalculateTangents() like there is RecalculateNormals() for normals.

    If you search around you will find some scripts that do this but this is currently not implemented in EasyRoads3D. If you want, contact me by PM or through my website (I am not sure if I have your email) and I can send additional scripts that do this.

    Alternatively you can also use the export to .obj option inside EasyRoads3D. Copy the exported object to the assets folder and in the import settings select "Recalculate" for tangents.

    I just double checked this in a custom editor window that works similar as the one used for procedural side objects. [shift] click allows you to select multiple points, don't release the mouse after selecting the last point. Instead drag the selected points while holding mouse down.

    The new side object system in the v3 beta also allows selection by rectangle drag. It is fully operational so if you do not require roads yet you could consider trying that if you have Pro...
     
    Last edited: Dec 20, 2012
  42. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Thanks Raoul, email sent via your website. :)
     
  43. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,366
    @bigkahuna,
    Raoul is right, i mistakenly though that Unity let us compute tangents. In fact, that functionality exist, but isn't publicly exposed like RecalculateNormals().
    Sorry for the confusion.
     
  44. SJAM

    SJAM

    Joined:
    Jan 11, 2009
    Posts:
    729
    Hi all,

    Important information about EasyRoad and the T4M

    At this time Easy Road is not compatible with the T4M, and maybe never. Easy Road is based on Unity Terrain only and I can not do anything to change this.
    So if you plan to use EasyRoad, don't buy the T4M.

    In the description of both tools, we never said that they can be use together, and so, we are not responsible of your disapointment about that.


    Thank
     
  45. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Additional info why EasyRoads3D is not compatibel with T4M:

    T4M uses a mesh object for the terrain. This can be any arbritary mesh. There is no way to integrate roads with such a mesh object without implementing some sort of triangulation method which is currently outside the scope of EasyRoads3D.

    Possible solution:

    What you can do is, build your roads using the Unity Terrain object. Export the terrain and roads to .obj and optimize the terrain mesh in a modelling app. Use this mesh object in T4M. I am currently looking into integrating the optimization process directly in the Unity Editor. This will require Unity Pro and the polygon cruncher plugin.
     
  46. Zaddo67

    Zaddo67

    Joined:
    Aug 14, 2012
    Posts:
    489
    Is there a manual process for creating intersections?

    I can't wait for the next version to come out with intersections support!!! Do you have an estimate on when this will be released?
     
  47. raoul

    raoul

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

    The best way to create intersections in v2 is to place markers of the two roads at exactly the same position at the center of the crosspoint, export both roads to .obj and create the intersection in a modelling app.

    There is no ETA for v3, it is released in betas. Currently roundabouts and cul-de-sac support is implemented, these will be the last features for the first official released. But code needs to be optimized and some bugs need to be fixed. After that it will be released.
     
  48. Zaddo67

    Zaddo67

    Joined:
    Aug 14, 2012
    Posts:
    489
    Thanks Raoul for prompt response to last question.

    I have another question on Terrain leaking through road surface. This seems to happen on steep inclines.

    I have played with left/right indent Surrounding. I don't understand the difference between these two settings, the manual indicates they both level the ground either side of the road. What is the difference between them?

    I have set these up to 30 on the steep inclines, but they have not fixed the terrain leakage.

    Here are two pictures showing what I get. Note, the leakage does not appear until you are close to the location. i.e. From a distance the road looks perfect.

    I would appreciate if anyone has any suggestions on how to fix this.

    Thx in advance.

    No terrain:


    Drive a few metres further and then get this:
     
  49. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi Zaddo67, in order to accurately deform the terrain, terrain points just outside the road edges need to be set at the same height of the road near that point. The indent value take care of this. A minimum required indent value is calculated based on the terrain size and the heightmap resolution. But you can use higher indent values (in the inspector) to shape the terrain. The surrounding value represents the distance over which the terrain will be leveled from the indent position to the original terrain height. Hope this makes sense!

    A good way to get familiar with this is to manually raise a marker and tweak the indent values and surrounding values. You will see how this affects the terrain deformation.

    Regarding the images, yes, terrains with steep inclines are the hardest to accurately deform according the road shape especially in bends and when using tilting on the road (like in your images).

    Regarding the road and the terrain (steep inclines) in the images you posted, you will get better results when using an higher heightmap resolution. Other options are raising the road a little bit or use a lower offset value in the road shader. The EasyRoads3D shaders use an offset value to make sure the road is rendered on top of the terrain. You could open the shader that you use and tweak these offset values a little bit.

    Hope this helps otherwise let me know!
     
  50. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    V2.5.0 is now available at http://www.unityterraintools.com. The Assetstore version is pending approval.

    The cam fly over part of the very first standalone release of EasyRoads3D is back. You can now quickly test drive the road object directly in scene view. You can see a demo video in the showcase forum.

    This is also to let you know that the 33% discount offer is still on, but it will not last much longer...