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

EasyRoads3D v1.0 for Unity - Plugin version Online

Discussion in 'Assets and Asset Store' started by raoul, Apr 29, 2009.

  1. KingPeas

    KingPeas

    Joined:
    Aug 29, 2012
    Posts:
    10
    Thank's for help.
    There are only two little troubles:
    1. After commit on asset server the parameter "Backup Location" automatically changes to "Outside Assets".
    2. After press button "Build SideObjects" the component "Mesh Renderer" for all SideObjects automatically changes to default value. I.e. parameters "Cast Shadow" must be turned off for ours project, but they turn on automatically.
     
  2. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,721
    Hello KingPeas

    Thanks for letting me know, this is fixed in the next update.

    Between "Edit Mode" and "Rendered Mode" side objects are destroyed so "Build SideObjects" will completely rebuild the side object and indeed component specific variables for which no controls have been implemented in the side objects Inspector will be reset to their default value. "Cast Shadow" is by default turned on in the renderer component. In this sort of situations we always keep things as they are by default and tweak the object until it looks the way we want, then we change materials, render, physics settings etc... But controls for this can be added to the side objects inspector if there is general demand for that.
     
  3. Natoncy

    Natoncy

    Joined:
    Sep 28, 2012
    Posts:
    6
    I have tried the free version in my project, but I can't see the Roads. When I put some markers in the terrain i can see the pins but not the white stripes between them. After I created the Road object the terrain deforms, but no road appears. Can someone help me? The videos and Screenshots are looking good and it would be perfect for my actual project.
     
  4. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,721
    Hi Natoncy,

    Sometimes it happens that people cannot see the road and white surfaces in scene view but they are displayed in game view. Is that what happens for you as well? This is usually due to customized layer settings for scene view (the layers dropdown box) at the right top of the Unity Editor.

    EasyRoads3D uses layers 30 and 31 for the road and white surfaces. They are by default not named. Unity has the behavior that when customizing the layer settings and choosing “Nothing” for example, the layers 30 and 31 will be hidden as well. When choosing “everything” afterwards however, layers 30 and 31 are ignored because they are not named.

    The solution, name layers 30 and 31 so they become visible in the layers dropdown. You can now manually enable them so objects on these layers will be visible in scene view.

    Does this solve your problem? Let me know if you need further help...
     
  5. Natoncy

    Natoncy

    Joined:
    Sep 28, 2012
    Posts:
    6
    This is how it looks in the menu:

    How does I name them? I'm sorry but I don't have many experiences with unity so far.

    EDIT: OK, got it.
     
    Last edited: Sep 29, 2012
  6. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,721
    Glad you sorted that out!

    If anyone else is experiencing the invisible road / white surfaces, the screenshot Natoncy included is what you will see after selecting "Edit Layers" at the bottom of the layers drop down. Click on the right of "User Layer 30" and "User Layer 31" You will now be able to enter a name for these layers...
     
  7. NewEonOrchestra

    NewEonOrchestra

    Joined:
    Oct 24, 2012
    Posts:
    3
    Very great and useful tool! I originally used the Path/Road script to make my road, but it had too many problems, so I tried EasyRoads3d instead.

    However, I can't quite get shaders to work properly.

    First, when I tried assigning the Transparent/Bumped Diffuse texture, the bump mapping no longer seems to work. I'm able to assign the normal map and all, but at runtime only the diffuse works. I'm using the same material as the old road, so why is this happening?

    Ideally, I want to use a transparent, bumped, and offset shader, but no shader I've seen yet has all three.
     
    Last edited: Nov 6, 2012
  8. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,721
    Hi NewEonOrchestra,

    Glad you like EasyRoads3D!

    In order to have the bumped type of shaders work correctly, correct tangents data is required. Unfortunately Unity does not come with a function to assign this data automatically. Although there are various scripts available to apply tangents to a mesh EasyRoads3D does not have this currenly implemented.

    To deal with this, use the export to .obj option and move the .obj file to your assets folder and replace the originally created road with this .obj version. In the import settings of this game object make sure the "Tangents" info is set to "Calculate". Unity will now assign tangents info to the road mesh and the bumped shaders will work.

    Let me know if you have further questions!
     
  9. NewEonOrchestra

    NewEonOrchestra

    Joined:
    Oct 24, 2012
    Posts:
    3
    That did the trick quite nicely, thanks!
     
  10. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,721
    Glad to hear that, I will put that in the manual as well
     
  11. SomerenV

    SomerenV

    Joined:
    Dec 20, 2011
    Posts:
    83
    First of all: great tool! I have been struggling with road-creating in Unity for quite a while now and your tool seems to fullfill my needs. Here is some feedback to make it even better (in my opinion)

    - Right now the entire road is 'the same'. The same width and texture for instance, along the entire road. Is it possible to implement a feature to change road-settings based on the markers? For instance, markers 1 - 10 use a width of 15 and a normal asphalt texture. Markers 11-25 use a width of 10 and a dirty road texture. All of this with one road object basically instead of uniform settings and with smooth transistions. Possibly you can even change to texture of the change between two types of roads instead of an automatically generated one.
    - This might be a bit tricky, but an option to create a bumpy road. Say for instance you want an offroad track. Offroad is never really smooth and a bump-slider would come in really handy in such a case. Or in case of an old and abandonded road. Small bumps, big bumps, just as you want it.

    I've also got a question: something when I have generated the terrain-height with EasyRoads, the terrain comes through the road a little bit, having me to build the 3D object and raise it a bit. Is there any way to fix this?
     
  12. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,721
    Thanks for the feedback!

    Regarding changing the width of the road, do you mean changing the number of lanes or the actual width? Changing lane numbers is on the list. Changing the width can also be implemented but that will need a different approach.

    I could implement a system to change textures on a single road, it has been asked before. If you are a little bit confortable with coding, this is relatively easy to do yourself by assigning colors to vertices. In the Inspector you can see at which distance a marker is located. You can use that as a reference regarding where you want texture changes. For the tranisition you use Color.lerp over x meters. I have looked at this in the past, I can provide a shader.

    in EasyRoads3D you can subdivide the road mesh in up to 10 segments after deforming the terrain and building the final road. When using 2 or more segments you will see a couple of controls that affect the bumpiness. Is that what you need?


    The only situation where the terrain can come through the road is at terrain y = 0 and the road is below the terrains Y position. This because the terrain height data is based on values between 0 and 1. These values are multiplied by the terrain height settings. So terrain values below 0 are not possible. Always make sure that markers are above the terrain Y position. Also, when markers 1 and 2 are at Y = 0 and marker 3 is at Y = 5 the nature of the spline algorythm is that between marker 1 and 2 the road will go slightly downwards, below terrain Y is 0! So in these situations make sure that marker 2 already is a little bit higher then marker 1. Another situations where the terrain might pop through the road is at sharp curves in areas with significant height differences (especically when also tilting is applied). When that happens it means that there simply are not enough terrain points to gradually deform the terrain according the road shape. In this case you can try using a higher terrain resolution or decrease the height difference in the bend. If this does not help, then please provide more info (screenshots) in which this problem happens for you.
     
    Last edited: Nov 13, 2012
  13. KingPeas

    KingPeas

    Joined:
    Aug 29, 2012
    Posts:
    10
    Hello Roule!
    We have updated EasyRoads to version 2.37
    After that we had a problem, which happens when we do several steps:
    1) Terrain has prebuild road (RoadObject)
    2) Then we paint terrain by texture near this road
    3) Then turn the road (RoadObject) to edit mode
    4) As a result - texture are broken on terrain – we see other color spot on the terrain instead of our texture
     
  14. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,721
    Hi KingPeas,

    Do you mean texture changes disappear? In that case that is something that is not specifically related to the latest 2.4.7 release.

    When you switch from "Edit Mode" to "Build Mode", the original terrain data (heights, splatmaps, vegetation) is stored in memory. When you switch back to "Edit Mode" this data is restored. So any changes you made to the terrain in "Build Mode" will indeed disappear. The alternative is that you end up with the road shape etc. still visible in the terrain after changing it. This is not what you want.

    So I recommend to prepare your terrain as much as possible before creating the roads and then make changes once you are completely happy with the roads etc. Optionally you could also use the manual terrain backup options from the top menu > EasyRoads3D after you made changes in "Build Mode" and do a restore after you switched back to "Edit mode". But, again, after doing this the current road shape will become visible in the terrain after moving markers!
     
  15. KingPeas

    KingPeas

    Joined:
    Aug 29, 2012
    Posts:
    10
    Hello, Raoul
    Thank you. And one new question.

    Could you view this picture:
    Curve
    I think your EasyRoads3D creates road using method that described in the lowerest picture called “auto” (similar principle in 3dsMax called “Bezier”).

    I’d like to create a road more precisely, using method described on the top picture called “free” (similar principle in 3dsMax called “bezier corner”). I need to control both ends (that enters and exits the marker) of line in the marker independently.

    Does EasyRoads has this method ? I really need it.
     
  16. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,721
    Hi KingPeas,

    Implementing controls for this should be doable, creating the road geometry is a bit more complex with those sharp angles in the top curve of that image. I cannot match this with a typical road shape, or is this for a specific type of side object / custom object? Do you have an example of what you like to achieve?
     
  17. SJAM

    SJAM

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

    For 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.
     
  18. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,721
    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.
     
  19. anilgautam

    anilgautam

    Joined:
    Jul 23, 2012
    Posts:
    8
    Can we create straight Roads Like Square
     
  20. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,721
    Hi, you can easily create straight roads by selecting multiple markers and using the alignment tool in the inspector. But you mention square, what does that mean? Do you mean straight corners? In that case, EasyRoads3D is a spline based tool so cornerrs are smooth and depend on the distance of markers, the closer the markers the more control over the sharpness of the curve.
     
  21. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,721
    V2.5.0 is now available. The cam fly over feature of the very first standalone release of EasyRoads3D is back. You can now quickly test drive the road object directly in scene view.


     
    Last edited: Jan 15, 2013
  22. DesertRaven

    DesertRaven

    Joined:
    Jul 15, 2012
    Posts:
    137
    Hello Raoul,

    Is this version optimized for unity 4?
     
  23. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,721
    Hi DesertRaven, yes. v2.4.7 already worked on Unity 4 but there were a couple of obsolete code warning messages. This is fixed in v2.5. But this new version (v2.5.1) also still works on Unity 3.5.x
     
  24. zelmund

    zelmund

    Joined:
    Mar 2, 2012
    Posts:
    437
    Hello raoul. I solved my problem with soft and started to use v2.5.1 (current). I have a little problem. When i start to put markers, i dont see any geometry build. Its just markers only i see. Display objects in general settings and changing surface material doesnt help. When i put off display objects markers disapearing and stil no geometry. But if i chose road in group with markers (obj created) then i see a road wire only and no solid material on it.
     
  25. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,721
    Hi zelmund,

    By default all layers are culled in scene view. If you cannot see the road objects you must be using custom layers. Can you double check your layer settings in scene view (dropdown box at the top right of the Unity Editor)?

    Also make sure to give layers 30 and 31 a name. These layers are used by EasyRoads3D. By naming the layers they will become visible in the layers dropdown box. Make sure they are checked! This should fix your problem. I will have a look and see if Unity 4 allows you to automatically name layers, as far as I know this was never possible in previous versions.
     
  26. zelmund

    zelmund

    Joined:
    Mar 2, 2012
    Posts:
    437
    Thanks. Giving names to layers solved my problem.
     
  27. jeffmorris1956

    jeffmorris1956

    Joined:
    Jul 3, 2012
    Posts:
    276
    Raoul, I think that I have problems with EasyRoads V3.0 beta. If I try to move the road markers to new locations in the scene, the roads themselves won't move to new locations in the scene. I'm using Unity3D V3.5.7.
     
  28. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,721
    In v2 the road instantly updates when moving markers. In v3 the road will only update after you stop moving the marker. Are you saying that for you the road is not updating at all even not after releasing the mouse button?

    You are the first mentioning this, if this is indeed the case we will have to do some tests regarding events being triggered or not. Or perhaps you installed it in a project with v2 already installed. The setup of the scripts has changed in the latest v3 beta build. Perhaps that is causing conflicts?
     
    Last edited: Feb 7, 2013
  29. Acenth

    Acenth

    Joined:
    Aug 14, 2012
    Posts:
    42
    I just purchased Pro and first I must say, wow!

    I have two questions, first - I'm trying to create a dirt road that blends with the terrain on the edges to make it feel more natural, but I can't seem to configure the road correctly. See the image below for what it looks like.

    Second, I'm trying to place a fence side object but it is rotated on the X axis by 90 degrees:



    Changing the source fence prefab's rotation doesn't affect the side object at all.
     
  30. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,721
    Hi Acenth, glad you like it!

    It seems the image in your post is missing. In general for a dirt road I would use a transparent cutoff shader on the road itself. I would also use the EasyRoads3D “blend road shape in terrain” feature and make the shape a little bit wider and smoother. Use a similar dirt texture for this terrain splat layer.

    When a mesh is rotated sideways, it means the mesh itself is not pointing in the direction of the z-axis. Can you double check that? What usually happens is that after importing a model in Unity and dragging it on the stage all looks fine. But it could very well be that Unity has automatically applied rotation values to it, just look at the rotation values in the Inspector. These rotation values are not used in EasyRoads3D! To fix this you can do 2 things

    Fix the rotation in the modeling app.

    Or

    Create a new prefab, add the model as a child to this prefab at (0,0,0) and add the correct rotation values to the child object. Attach the prefab to the side object . This is also explained in the manual.


    Hope this helps, otherwise let me know!
     
  31. Acenth

    Acenth

    Joined:
    Aug 14, 2012
    Posts:
    42
    That worked! Thanks!
     
  32. DeXoN

    DeXoN

    Joined:
    Feb 10, 2013
    Posts:
    30
    Looking good.
     
    Last edited: Feb 22, 2013
  33. Acenth

    Acenth

    Joined:
    Aug 14, 2012
    Posts:
    42
    Any idea when we could see intersection support?
     
  34. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,721
    Intersections is being worked on. There are many types of intersections. Currently support for basic square corners, rounded corner and T-junctions are available in beta releases. Last week I prepared a new build for Unity 4. But again, it is a beta, it is not entirely bug free although for most issues which are mostly editor related, there are fixes explained in the manual. So if you project requires basic intersections and it doesn't involve a big city (code still needs to be optimized for performance) it may already work for you. There is no ETA for the official release as there are still things to implement for the first public release.
     
  35. Grespon

    Grespon

    Joined:
    Apr 13, 2012
    Posts:
    388
    Hi Raoul,
    I Have Easyroads Pro, and I need to put it working on iPhone. Since the terrain is not supported in iPhone, how could I possibly make it work ??


    Thanks!
     
  36. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,721
    Hi Grespon,

    The terrain object is supported on mobile. But it can be too performance heavy which prevents you from using an higher heightmap resolution for detail. What most people do is create the road(s) on a Unity terrain object with a reasonable heightmap resolution. Afterwards export the terrain to .obj and optimize the terrain mesh in a modelling app while preserving detail near the roads. Use this as the terrain mesh as long as you didn't optimize the road area the road will exactly fit. And optionally you could for example use the Assetstore tool T4M so you can create your terrain almost as if it is a Unity terrain object.
     
  37. jbh142

    jbh142

    Joined:
    Apr 27, 2010
    Posts:
    31
    Raoul I purchased the pro version and you speak of a beta download. Where would I find that. Also have you thought about putting a forum up on your webpage for users to ask questions or help one another out.

    #2 I'm having a lighting issue. I place light poles up and a directional light pointing down. It lights up the ground but the road texture easy roads use does not get any lighting what so ever. how do i fix this issue?
     
  38. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,721
    The beta is not publicly available. Can you contact me by email or PM, so I can send it to you?

    Regarding the lighting, this should work just fine. During development all objects generated by EasyRoads3D use layer 30 or 31. You can change that when the roads are finished. So are you perhaps using custom layers in the culling mask of the directional light?
     
  39. Grespon

    Grespon

    Joined:
    Apr 13, 2012
    Posts:
    388
    Thanks for the tip,
    I was looking for T4M but in their forum they say it's not compatible with Easy Roads!
     
  40. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,721
    It is not compatible in a sense that EasyRoads3D is optimized to work with the Unity terrain object. Indeed you cannot directly use EasyRoads3D on a T4M terrain.

    But, T4M uses an ordinary gameobject with MeshFilter attached. So if you follow the workflow I explained in my previous post, you can attach the final optimized terrain mesh to that meshfilter. This is necessary because if you would convert the original terrain directly to a T4M terrain the area around the road will be optimized as well, that is not what you want!
     
  41. Grespon

    Grespon

    Joined:
    Apr 13, 2012
    Posts:
    388
    But if I have to optimize the terrain anyway, is any advantage to use T4M ? I need it ?
     
  42. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,721
    You don't need it, thats why I mentioned it is optional. You would primarly use it 'for placing trees and splatmap painting.
     
  43. Lesha-VH

    Lesha-VH

    Joined:
    Jul 3, 2012
    Posts:
    96
    the main problem that Unity built-in terrain is suxx, because

    - it use too much draw call
    - it generate HUGE spikes when rotating camera (due to rebuild pathes)
    - it has big bugs in trees bilboarding (spikes when re-calc billboards and visual bugs as white border)
    - it has bugs with painting more that 4 textures and using normal maps

    I bought easy roads - this is good tool,
    but it based on Unity terrain - not usabble in real-world project due to performance reasons :)

    Terrain is useless for high quality 3d games :)
     
    Last edited: Mar 12, 2013
  44. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,721
    Sorry for the late reply, I was away for a couple of days. Glad to hear you find EasyRoads3D a good tool!

    Just to be sure that I read your post correctly, the points you made are entirely related to the Unity terrain object, not to EasyRoads3D, is that correct?

    And to me, it isn't clear from your post if those are your experiences in general with the Unity terrain object. It sounds like you are referring to mobile platform development specifically, is that right?

    And what do you mean with "not usabble in real-world project due to performance reasons "? Again this must be related to using a Unity terrain object and then specifically for mobile development, right? This because EasyRoads3D supports various ways to optimize the created road objects to your specific needs.

    Indeed you cannot just use a Unity terrain object for mobile like you would for desktop development. You will have to optimize the terrain object settings to run well on mobile. But isn't that the case in general when developing for mobile? And like mentioned in several posts, you can perfectly use a Unity terrain object to develop your terrain and roads and then convert the terrain to an optimized mesh object.
     
  45. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,151
    www.youtube.com/watch?v=1Q3ydCSUoP4 in this video you set some markers as bridge object and when you build roads they look like a bridge on those markers. my road does not look like on this video. what is the extra steps?
     
  46. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,721
    Hi atmuc, that movie is more intended to show the new "Scene Cam Fly Over" feature in the latest version.

    What does your road look like?

    Building bridges involves 2 steps:

    1. Enable bridge object as seen in that movie. This will ignore terrain deformation for that specific segment so, provided that these markers are positioned higher than the terrain, the road will float above the terrain.

    2. The bridge construction. These are side object elements.

    The demo project includes a scene with the same road / bridge as in that youtube movie. You can look at that to see how it was done.
     
  47. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,151
    your demo project look great. i do not know when i will be able to use easy roads to generate a scene like your demo scene. i think initially i should add side objects. on your demo scene i get the same result because it has 4 bridge side object on it. i should study side objects what make the road great.
     
  48. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,721
    In theory you can make a bridge with only one side object. But the more elements you add the more realistic it will get...

    In general, I would recommend to spend a little bit of time on looking at the demo project and all the options you have with side objects. Not only regarding creating them using the Side Object Manager. But also the options you have in a scene. This with regard to markers, enabling/disabling side objects, excluding markers regarding the spline shape, changing the sideways distance per marker. And also with regard to the aligment and various other options you have in the Inspector of a specific side object. These options depend on the side object type, Instantiated or procedural etc.
     
  49. Grespon

    Grespon

    Joined:
    Apr 13, 2012
    Posts:
    388
    Hi Raoul,
    Do you have any prediction of when the tunnels will be ready?
     
  50. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,721
    Hi Grespon,

    I did actually make some progress on that this week. As it looks now, a first test, if you like to try it out, will be ready within a couple of weeks.