Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

EasyRoads3D v3 - the upcoming new road system

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

  1. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,208
    Hi Finn,

    I am not sure. When exactly do you get this message? Is this related to creating new connection prefabs through General Settings?

    What is the setup of this particular connection prefab? Perhaps you can email it to me in a unity package?

    In general I would recommend to always use the latest version (please backup the project first, just in case :)) which is 8.4. But nothing has changed for dynamic crossings lately so I am not sure if that will resolve the problem. Or is this related to custom connection prefabs?

    Thanks,
    Raoul

    [UPDATE] This seems related to custom connection prefabs. Could you check this on beta 8.4. and send me the source model if you still get the same warning?
     
    Last edited: Feb 21, 2017
  2. Marco-Sperling

    Marco-Sperling

    Joined:
    Mar 5, 2012
    Posts:
    597
    Hey raoul,
    I need to swap out some custom connections with a version of the same connection that has its pivot and rotation fixed (they were off for some reason).
    Since ER breaks prefab instances and creates clones of the original mesh I am now wondering how to mass replace the old connections - after updating the custom connection prefab to contain the fixes the old connections disappeared visually from my scene (though they are still there) which makes me wonder if there is still some link to the ER custom connection prefab in question?
    Anyway - I need to replace the old broken connections with the new fixed ones. But I cannot do so by simply deleting and reinstancing the connection since we parented some hundred GameObjects under the connection for gameplay reasons.
    Do I have to write a script or is there a way to reach my goal with the ER user interface?
     
  3. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,208
    Hi Marco,

    Instances of a custom prefab share the same prefab ID as the source prefab so they can update according changes to the source prefab.

    This is not 100% implemented yet. At the moment scene instances do update according connection data changes of the source prefab.

    How did the instances in the scene disappear? Did they completely disappear, or is the mesh filter empty? The update process described above currently does not make changes to the mesh and I cannot replicate this. When I for example delete a connection and click "Apply", the scene instances update accordingly and are still visible. Did this happen after clicking the Apply button in the Custom prefab editor window?

    Thanks,
    Raoul
     
  4. Marco-Sperling

    Marco-Sperling

    Joined:
    Mar 5, 2012
    Posts:
    597
    They disappeared on "Apply". The meshfilter however was not empty.
    I restarted Unity and there they were, using the new mesh but (of course) rotated the wrong way and with the wrong material (the old connection had two, the fixed version only has one). I have a picture for you:
    ER3D_fixed_old_connection_not_translating_into_scene.jpg
    When I place a new instance of the fixed connection in the scene all is well.
    The material you see on the old connection was one of the two that were present in the old version of the prefab.
     
    Last edited: Feb 22, 2017
  5. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,208
    Perhaps there was a bounding box issue and therefore they were not rendered initially after the update?

    I will do some tests: create a new custom prefab, add instances to the scene, update the source mesh, update the custom prefab. I will also make sure materials are updated, which is indeed not the case at the moment.

    At the left top it says "rotation: fixed" but above the image you wrote "but (of course) rotated the wrong way". Looking at the image the rotation is not fixed, is that right? In that case, did the rotation of the source mesh change, do both instances in the scene have the same rotation values in the Inspector? Do you still have the original model? In that case, do the old and the new model have the same rotation values after dropping them in the scene from the assets folder?

    Thanks,
    Raoul
     
  6. Marco-Sperling

    Marco-Sperling

    Joined:
    Mar 5, 2012
    Posts:
    597
    With "fixed" I meant that the mesh vertices themself seem to have been rotated 90° relative to their model's root - that's what I did in Maya and what the scene connections seem to reflect correctly.
    To clarify: I did not just throw a 90° rotation on the model and called it a day - I rotated it on component level (vertices).

    The end points staying at their old locations is something I see as a follow-up bug of what I did to the mesh caused by the changes not propagating through to the already placed instances. I may be wrong about this.

    So it depends. In the end the rotation is wrong. This "wrong" either relates to the vertices being wrong or the connection ends being wrong. I think it is the latter.

    Dropping the modified version into the scene and comparing it to the one already inside the scene reveals that the rotation of both the mesh vertices and the marker are the same (see short gif below) while the rotation of the connection end points is not:
    ER3D_fixed_old_connection_not_translating_into_scene.gif

    I don't have the original mesh available for a side by side comparison at the moment due to overriding the subversioned fbx file. But I could go back in our repository and revert my changes to then create a duplicate and do the comparison.
     
  7. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,208
    Yes, that 90° rotation is what I meant. Is that related to source mesh changes (or how Unity imports the fbx) or different axis selection for "Trace On" or both?

    I will first test this specific proces on my end. I will post results.

    Thanks,
    Raoul
     
  8. Marco-Sperling

    Marco-Sperling

    Joined:
    Mar 5, 2012
    Posts:
    597
    That must be related to source mesh changes. I did not touch the "Trace On" axis in the custom connection editor.
     
  9. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,208
    Hi Marco,

    After dropping the initially generated custom prefab from /Assets/EasyRoads3D/Resources/custom prefabs/ on the stage of the Custom Prefab editor window, this specific data is loaded using the final mesh data stored in /Assets/EasyRoads3D/prefab meshes/. Although the source mesh is still visible in the disabled Source Mesh slot, this mesh is not used at the moment to reload the data. And I assume this is the mesh you updated?

    Can you provide the exact steps how you modified this initially generated custom prefab in /Assets/EasyRoads3D/Resources/custom prefabs/ and how you got the results in your post where scene instances are also updating.

    Thanks,
    Raoul
     
  10. Marco-Sperling

    Marco-Sperling

    Joined:
    Mar 5, 2012
    Posts:
    597
    Hi Raoul,
    I think I 've got an idea what's different here:
    I did not drop the initially generated custom prefab from that folder on the stage of the Custom Connection editor.
    Instead I dragged the prefab onto the stage, that contained the updated mesh data from the fbx and the new material count with the correct material.
    So bascially what I was doing was creating a "new" connection. But since the prefab and the mesh names were identical to the source prefab/mesh used for the initial connection prefab EasyRoads did an override of the initial custom prefab and the mesh asset.
    This is how the new mesh data ended up in the scene I guess.
     
  11. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,208
    That will indeed create a new custom connection prefab overriding the previous prefab with the same name. To update a custom prefab it is recommended to drop that prefab from /Assets/EasyRoads3D/Resources/custom prefabs/ on the stage.

    Changes to prefabs / road types and updating scene instances is currently being worked on for the next beta. I will make sure all this, source mesh changes for custom prefabs and possible material changes, is also included.

    Thanks,
    Raoul
     
    Marco-Sperling and hopeful like this.
  12. f1b0n4cc1

    f1b0n4cc1

    Joined:
    Aug 27, 2015
    Posts:
    38
    i was meaning can i duplicate road network in same scene . It looks answer is no, because EasyRoads3D show warning message about there is another road network which is not allowed. I was thinking to duplicate whole road network and connect them to extend my city
     
  13. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,208
    I still cannot entirely see what you want to do. If you duplicate a road network, you have two similar road networks. How do you want to connect them?

    Is there a specific reason why you cannot do that in a single road network object?

    Generally you should be able to build any type of scene using one road network object. Multiple road network objects in the scene will indeed raise warnings. This was implemented after people had multiple road networks in a scene (both on purpose and by mistake, accidental Ctrl+D for example), roads were not connecting to crossings as a result which was causing confusion. There are post related to this on the first pages of this thread.

    Thanks,
    Raoul
     
    Last edited: Feb 23, 2017
  14. f1b0n4cc1

    f1b0n4cc1

    Joined:
    Aug 27, 2015
    Posts:
    38
    I built a road network for a small state , i wonder if it is possible to duplicate whole roads , than connect original and duplicated one by roads ( such as splitting from a marker point ) . Finally, i was thinking to make small changes on shape of duplicated road network to give possibility to player to travel on different roads ( not exactly the same road network ) . Such as select a marker and hit w and move road a little upper , choose another marker and make wave on road instead of straight road etc.

    I added example screenshot , i hope i could tell my wish . Thanks
     

    Attached Files:

    • 1.jpg
      1.jpg
      File size:
      58.8 KB
      Views:
      537
    • 2.jpg
      2.jpg
      File size:
      177.2 KB
      Views:
      402
  15. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,208
    Thank you for explaining this further. Simply duplicating the road network object will not work here for several reasons, the roads game object positions are for example locked.

    There is an option in the Inspector to duplicate a single road but probably the best way to do this is through the scripting API. Get all roads and crossings, create new roads crossings accordingly by applying an offset to the marker positions of the original road and rotate the markers around the center point of the new road network to achieve the rotated effect in the second screenshot. Rotating the crossing around the center point of the "new" road network will also require updating the rotation of the crossing, but that can be calculated as well.

    Hope this helps.

    Raoul
     
  16. jwilliamsen

    jwilliamsen

    Joined:
    Aug 8, 2010
    Posts:
    56
    Hi Raoul,

    I'm trying to use EasyRoads (V3 B8.4) for a slightly different use: I have a bunch of paths that snake over a rolling Unity terrain that I need to make flat perpendicular to the path (like EasyRoads does already). I don't have a problem making the paths the right width, but where I'm confused is in setting the Left and Right Indent/Falloff to be something smaller than 5M and 2.93M respectively. Is there a way to make this falloff smaller? I saw an image that looks like it's possible to have a very harsh drop off - but wasn't able to find that setting. Any help would be appreciated :)

    Thanks!

    Joe
     
  17. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,208
    Hi Joe,

    These minimum Indent values are directly related to the terrains heightmapscale (size vs heightmap resolution). The smaller this value the smaller the Min Indent values.

    This behaviour is required to guarantee the best possible terrain deformation results, preventing the road floating above the terrain or the terrain poking through the road.

    Do you mean the mountain roads on the first page? This is done by generating terrain detail overlay meshes using Shape type of side objects. This approach also eliminates the ugly sawtooth type of terrain shape on steep edges.

    Thanks,
    Raoul
     
  18. jwilliamsen

    jwilliamsen

    Joined:
    Aug 8, 2010
    Posts:
    56
    Thanks very much for the quick response, Raoul.

    I guess I'll look for another solution. EasyRoads is a great asset, but probably not the best tool for this particular job.

    Thanks again,

    Joe
     
  19. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,208
    Hi Joe,

    Is this related to the Indent value you mentioned? In that case could you elaborate on that?

    It is not an EasyRoads3D limitation, it is a limitation of the grid based nature of the Unity terrain object. The less terrain points available the higher the higher the Indent values must be, whether you use EasyRoads3D or not. The only other alternative is to use terrain mesh overlays for which you can use the mentioned Shape type of side object or use a mesh type of terrain in general.

    Thanks,
    Raoul
     
  20. jwilliamsen

    jwilliamsen

    Joined:
    Aug 8, 2010
    Posts:
    56
    Hi Raoul,

    Yes, it is related to the indent that I'm able to achieve. Even with a terrain heightmap resolution of 2048 on a ~300W x 250L terrain I still seem to be locked to those wide indent values. I would think that my terrain would have sufficient resolution, but maybe I'm missing something - this is a pond that's approximately 3 meters across

    mesh density.JPG

    What I'm trying to do is flatten (level perpendicularly) these paths without flattening out the surrounding terrain. What you are looking at here is a Unity Terrain with an 8K texture map on it (a site plan that's been projected).

    paths.JPG

    Anyway, the idea is that once the paths are approved as far as height, ramping, flatness, etc, I would export the geometry and build a new terrain mesh over the exported Unity terrain mesh. Does that make sense?
     
  21. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,208
    Hi Joe,

    2048 heightmap and 300x250 terrain is a very high resolution. With only this terrain in the scene, the min Indent value should be well below 1.

    Did you adjust the terrain resolution after creating the road network? Or do you have multiple terrain objects in the scene?

    In General Settings > Scene Settings the global Min values can be set for both Indent and surrounding. New road objects / crossings will inherit these settings. Did you try adjusting these values or the Indent values for the road object?

    Through editor code it is probably possible to override these Min values. I wouldn't recommend doing this but If the final terrain will be a terrain mesh this might be something to try as well?

    But this should work just fine by adjusting General Settings > Scene Settings > Min Indent

    Thanks,
    Raoul
     
  22. jwilliamsen

    jwilliamsen

    Joined:
    Aug 8, 2010
    Posts:
    56
    Hi Raoul,

    Thanks for the quick reply - sorry for the sluggish follow up ;)

    This is the only terrain in the scene - and no, I didn't adjust the terrain after creating it. However, your solution - going to General Settings>Scene Settings in the inspector DID allow me to set the distances down much lower. I think I never noticed those values since it seems they disappear after the road has been started(?). Anyway, I've got it working pretty much the way I want it to now - so thanks very much for your responsiveness! :)

    Joe
     
  23. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,208
    Hi Joe,

    Glad to hear you got that working now :)

    These controls are always displayed in General Settings > Scene Settings. But the Min values will change when adding more terrains with a different heightmapscale or when the heightmapscale of the terrain has changed (upwards). That is why I asked if you have more terrains in your scene.

    Thanks,
    Raoul
     
  24. LaverZZY

    LaverZZY

    Joined:
    Aug 11, 2014
    Posts:
    12
    Hi Raoul,

    Can EasyRoad3D make a rotating road like the below image? :)
     

    Attached Files:

  25. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,208
    Hi LaverZZY,

    That is currently not possible, but you could create a prefab for this and import it into the system.

    I am pretty certain we experimented with this in the past. I will see what the status is. A full integration probably won't make v3.0 but as a start perhaps these scripts can be included so you can quickly create the looping model and import it through the custom prefab system.

    Thanks,
    Raoul
     
  26. TriCoachSim

    TriCoachSim

    Joined:
    Mar 1, 2017
    Posts:
    22
    Hi Raoul,

    I would be interested to use EasyRoad3D in my project so i have a few questions.
    I tried the free version of your plugin but since it's not v3 i think i miss important features to answer my questions.

    First, to describe a little the context of my project:
    - It will be released on Android and iOS
    - Road network average length would be 10 km by scene
    - There will be about 50 different scenes (not loaded simultaneously)

    So my questions are:
    1- I saw there is a LOD system for roads. Does it applied to whole roads? or several parts of the same road can display several LODs? Do you think good performances can be achieved with a 10 km roadNetwork on mobile devices?
    2- What would be the average memory impact of a 10 km roadNetwork and consequently for 50 roadNetworks (10 km each)?
    3- Is it possible to easily create a path on a RoadNetwork (among several roads and crossings) and have an object positioned and oriented on it (using a distance or maybe a percentage)?
    4- Finally, could you give me the names of some released mobile games using EasyRoad3D v3?

    Thanks in advance
    Mika
     
  27. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,208
    Hi Mika,

    Indeed the free version is still v2. I will try to answer your questions.

    The LOD system is applied to the full road segment/object. A 10km road network / road, is that a single road without crossings? Crossings will automatically cut roads in separate objects.

    Currently a new IConnector is being implemented. This can be used to connect roads of different road types, blend asphalt / dirt roads and it can be used for material changes on the same road. This IConnector could also be used to cut a long single road in segments. LODGroups will be added on the individual segments/objects.

    In general, the roads are ordinary game objects with a mesh filter / renderer attached. You can set the fixed resolution and you can set an Angle Threshold which is useful to keep detail in bends and reduce geometry on straight segments. Apart from that the generated roads act the same as if you would import a road model created outside Unity. So regarding performance, it really depends on how you use it.

    V3 includes a scripting API. You have access to the spline data. You can use that to position a car on any road. I don't think positioning a car on distance or a percentage is currently possible by a single function call but things like that are easy to add to the API. The API is build on requests and this has not been requested before. :)

    There are several posts in this thread in which users show their work, both images as videos. I also have emails. The idea is to include a gallery on the new website. I will see if I can find something mobile related, usually we receive website links, for example, to steam. As for mobile, as mentioned, performance is a combination of geometry / materials. You can set this up the way you want. Or is this also regarding the visual aspect, textures/ materials?

    Thanks,
    Raoul
     
    TriCoachSim likes this.
  28. Astaelan1

    Astaelan1

    Joined:
    Sep 29, 2015
    Posts:
    192
    @raoul
    I was just thinking about picking this tool up, and see that my primary use for it is still a bit questionable so I want to clarify a few things.
    1) Aquas support, for rivers. It would be very nice to use the aquas shaders and camera effects (deep rivers), I see this might be in the works but I'm not sure where it's at currently?
    2) Can you make rivers like the roads, which follow the contour of the terrain, like flowing down a mountain?
     
  29. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,208
    Hi Astaelan1,

    1) AQUAS was discussed recently on the previous page. The aquas prefab itself works, the only thing that needs to be adjusted is the wave tiling on the material. As mentioned in my last post I will look deeper into how AQUAS generates additional objects but releasing v3 has priority at this stage. You can sort of test this using the free version. Create a wide road mesh acting as the river surface. Export it or create a mesh asset from it and assign that as the mesh asset to the AQUAS water prefab. If that works well for you, you could build your rivers this way using the full version (river bed creation etc.).

    As mentioned on the previous, if you can give clear details of what is required I can look into it earlier. Otherwise this will be done after the 3.0 release.

    2) You can adjust objects to the contours of the terrain, following the contours according a certain angle offset is not supported yet. If this is about river flowmaps, that is more material related and at this point out of the scope of EasyRoads3D. I think AQUAS supports that.

    Thanks,
    Raoul
     
  30. Mr_Dan_O

    Mr_Dan_O

    Joined:
    Oct 12, 2013
    Posts:
    347
    Hey Raul.

    I cannot copy or move a "Road Objects" and/or a "Connection Objects" objects from one scene to another. Would you please help me? I can not copy or move a RoadNetwork object to another scene, either.

    If you remember, I wanted to make roadNetworks per scene and then at the end I wanted to load all the scenes into one scene and treat all the roadNetworks as one big roadNetwork. Please add a feature for this. I'm sure people who use WorldStreamer or any other similar approaches for creating big cities, would need it. For this use case, I recommend adding an "Export/Import" button which exports and imports the two "Road" and "Connection" child objects of a "Road Network" object as ".asset" files.

    Have a look at the image below for better understanding.

    Thanks in advance.
     
    Last edited: Mar 3, 2017
  31. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,208
    Hi D4N005H,

    There are several ways to do this.

    1) A quick way (Unity 5.4 and later I belief) is to open scene C drag scenes A en B with the road networks in the hierarchy. You can now drag the road networks from scene A and B to scene C. I tried that last week, it appears to be working fine.

    2) Did you try this using prefabs? Prefabs require the mesh asset to be physically present in the assets folder. Unity by default stored procedurally generated meshes in the scene file. But in Build mode you will see a button "Store Mesh Assets in Assets Folder" in the Inspector. This does what you need. The road network prefab will now be visible in other scenes.

    Please let me know if you meant something else.

    Thanks,
    Raoul
     
  32. Astaelan1

    Astaelan1

    Joined:
    Sep 29, 2015
    Posts:
    192
    Actually my specific interest for rivers, is whether I can lay down a path, that follows down a hill. Aquas and flowmapping take care of the animated look of it going a certain direction, but I'm curious about actually making a river that isn't just a flat plane, it may go down a hill a bit, then follow some relatively flat terrain, then down another hill a bit, and so on towards the ocean, slowly getting lower in altitude as it goes from a mountain down to the beach.

    I don't know if I'm explaining it quite right, but basically most water systems thus far only allow for a "flat" plane of water, I want a river that can change in elevation (follow down the angle of hills). Looking at the way the roads are produced, it looks like rivers would support it as well, but I'm not sure. If I have explained it right, and it can be done, I think a demo of this or a video of it would be really impressive and would capture a lot of people who want more dynamic rivers than just flat across the terrain. And based on what you said, it sounds like I could actually USE a road for this purpose and change the material/shader. And the mesh could be extruded down to provide the region that acts like water for swimming/camera effects. That sounds exactly like what I want to do, just not sure I can (I'll have to take a peek at the free version)

    I'm seriously considering this tool, and would put it on my list in a heartbeat if I knew it could do this with rivers (even without Aquas involved for the moment).

    Thanks for your time, if I still haven't explained myself clearly I'll make a visual example and take a screenshot.
     
  33. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,208
    Hi Astaelan1,

    You can create the river surface in any direction, not just flat planes. The process is the same as for roads, the shape is defined by marker positions and you can place markers where you want.

    Some water systems may require a flat mesh to have things like reflections work correctly. But that is more material related. Perhaps your question is more for the actual creator of the water system?

    We haven't used flowing rivers for a while but in the past we used the river material from the bootcamp demo project. I am not sure if that project still exists. The water prefab in that project worked well on non flat river surfaces.

    I mentioned the free version as an option for you to test the AQUAS water system on a custom mesh. You could also model a river shape and import it into Unity. Perhaps play around with the UV layout. If I remember well the AQUAS prefab uses standard UVs within the 0..1 range, so the custom mesh should probably also use a planar UV layout within this range. If that works for you, for sure the mesh created with EasyRoads3D will work as well.

    Yes, we will create demo videos once we have looked into this. This is what we are doing at the moment for v3.0, creating a new demo project showcasting all the features. This project will also be used for the videos.

    Thanks,
    Raoul
     
  34. TriCoachSim

    TriCoachSim

    Joined:
    Mar 1, 2017
    Posts:
    22
    Really good point for the Angle Treshold. I think that it answers most of my performances problems :)
     
  35. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,208
    Yes, unless the road has lots of bends in an hilly area, it will reduce triangle count significantly. Once you have found the ideal settings for your situation, you can preset these Resolution / Angle Threshold values in the road type settings.

    Thanks,
    Raoul
     
  36. Mr_Dan_O

    Mr_Dan_O

    Joined:
    Oct 12, 2013
    Posts:
    347
    That worked BUT if I "merge" the contents of a roadNetwork to another one, then I couldn't move or rotate or select them for editing. Instead it selects the gameObject in the hierarchy. If you want to recreate the problem, make two scenes each scene should consists of own individual roadNetwrok, Then merge them (drag and drop the 2 scenes into another scene) and then move the contents of a roadNetwork to another one (you have now one roadNetwrok that has all the connectionObjects and roadObjects of all of the scenes in its own connectionObject and roadObject child-objects). It is good now and everything is fine. But you cannot select a connection that was not originally belongs to the roadNetwork for road and connection editing! Unity just selects the selected road or connection object (it won't select and show the options for editing the road).
    Made some roads within a RoadNetwork, made a prefab of it, then I built the terrains and stored the mesh data. Deleted the whole RoadNetwork and then I draged and droped the newly created prefab to the scene and nothing but bunch of errors showed up (road objects got deleted). This is not really a huge deal, I just reported the error and I never use prefabs (unless I find them useful).

    If any of my words were unclear, feel free to tell me and I'll make a video for you, @raoul .
     
  37. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,208
    Hi D4N005H,

    Ok, you still want to be able to edit the road networks individually afterwards.

    That was previously possible but people started sending bug reports / videos issues because roads were not connecting while it turned out they belonged to different road networks. You can see that in earlier posts in this thread. That is one of the reason why only one road network is recommended now.

    When I tested this a couple of weeks ago both crossings and roads seem to respond well after being moved to the other road network. The main issue with this specific workflow is side objects using references to the specific road network and no longer working in the other road network. This requires some additional code.

    What also seems to work is using both networks individually. When you select a road network you will see a comment that only one Road Network can exist in a scene, If you simply close the dialog box the road network will be active and responsive. But this hasn't been thoroughly tested, use it at your own risk :) For example, building one road network, will build the roads (and flatten the terrain) in all road networks. Which is a good thing, but the status of the other road network will not be Build Mode (middle mountain tab)!

    2) Unity stores dynamically generated assets like the meshes by default in the scene file. Unity prefabs require the mesh assets to be physically present in the assets folder. That is why a prefab of the original road network won't work well in another scene. In build mode there is an option "Store mesh Assets in Assets Folder". That option is intended for this purpose.

    Using road networks (especially finalized road networks) across scenes is recommended as described in 1), but I will double check using prefabs for this once again, and see if I can replicate road objects being deleted.

    Thanks,
    Raoul
     
  38. Mr_Dan_O

    Mr_Dan_O

    Joined:
    Oct 12, 2013
    Posts:
    347
    Thanks for the reply. I need to work on the roads (not finalize them),though. I still recommend to add a "export/impprt" button for roads and connections objects for each road network if possible. Other than that, this is a great asset. Good job.
     
  39. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,208
    Something like a "merge" road networks option? I will make a note of that. Something like that is on the list but more for individual roads, also as a way to backup road networks individually. This can probably also be used to import a road network into another road network.

    Thank you, glad to hear you like it!

    Raoul
     
  40. tu_dzoi

    tu_dzoi

    Joined:
    Mar 12, 2017
    Posts:
    3
    Hi Raoul,
    I make a road oversea on my terrain 2000X2000, I can't make object - bridge simple along with the road. It works on a first half like in this photo.
    Please help me solve this .
    Thanks !
     

    Attached Files:

  41. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,208
    Hi tu_dzoi,

    The centre of the image where the bridge element stops, does that happen at a marker position? Could it be that the bridge element side object is not active for the other road segment?

    Thanks,
    Raoul
     
  42. UltraTM

    UltraTM

    Joined:
    Dec 8, 2013
    Posts:
    215
    Hello together.

    I thinking about to buy this.
    Is it useable with TerrainComposer2 ?

    One user i know owns TerrainComposer2 and your Road stuff using the beta.

    But since TerrainComposer2 generates the terrain the road stuff doesnt generate the terrain on the roads.

    Anything he missed or something?

    Wont buy it when i cant use it of course :D
     
  43. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,208
    Hi UltraTM,

    Terrain Composer has an option to lock the terrain heightmap. When that is on EasyRoads3D cannot update the terrain and flatten it accoording the road shapes. Can this user double check that and make sure that lock option is switched off.

    Other then that, the end result of Terrain Composer are unity terrain objects so one way or another EasyRoads3D can be used. If you are still having issues you may want to ask the developer of Terrain Composer about this.

    Thanks,
    Raoul
     
  44. tu_dzoi

    tu_dzoi

    Joined:
    Mar 12, 2017
    Posts:
    3
    Hi Raoul,
    The road on that scene has only 2 markers . I send you more example in this attachement.
    I also send you the Bridge object very simple not do chamfer and fillet at Start - End section. You can use it for the test.
    Thanks.

    http://www.mediafire.com/file/pq24j2pqw9al2lh/Bridge.rar
     

    Attached Files:

    Last edited: Mar 13, 2017
  45. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,208
    Hi tu_dzoi,

    Yes, I confirm that the same happens on my end with your bridge prefab. Regardless the shape or the number of active markers, the bridge consistently ends after about 350m.

    If you select the bridge object in the hierarchy you will see two child objects. This means that the vertex count exceeds the Unity limit of 65.000. The side object will be split automatically. The second object however doesn't seem to include any geometry. I will check what is going on here.

    Thank you for reporting this and including your source prefab!

    Raoul
     
    Last edited: Mar 13, 2017
  46. tu_dzoi

    tu_dzoi

    Joined:
    Mar 12, 2017
    Posts:
    3
    Hi Raoul,
    This happens when i use original Bridge prefabs or my prefab . The other objects on left or right side of the road work fine.. You can check it.
    Thanks.
     
    Last edited: Mar 13, 2017
  47. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,208
    Yes, there is something wrong with the geometry split after 65.000 vertices. It is not directly related to your prefab, but with your prefab it is more likely to happen because it is more geometry heavy. The 65.000 unity vertex limit is reached at a shorter distance.

    I first tested this using the simple bridge in the package. There was no problem on the test road segment, about 500m long. But for sure the same thing will happen at one point when you increase the distance further and further. Using your prefab it always happens at 350m. This is logical, given the fixed geometry structure of a certain source mesh. the 65.000 limit will always be reached after a specific distance.

    Thanks,
    Raoul
     
  48. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,208
    @tu_dzoi

    This is fixed in the next update.

    Thanks again for reporting this!
    Raoul
     
    600 and hopeful like this.
  49. TriCoachSim

    TriCoachSim

    Joined:
    Mar 1, 2017
    Posts:
    22
    HI Raoul,

    So I started to use the v3 (beta 8.4), and I met a problem with the road API.
    For a specific road in my scene I have a GetLength() of 117.7677 meters. And when I sample it in 25 equidistant positions with GetPosition(), I get exactly the same 3D position (which is approximately the end marker position) for the last 2 samples: (112.8607 and 117.7677).
    This happens with a crossing at the start of the road. When I remove the crossing, the 2 last samples give 2 different 3D positions ( in this case only the last sample correspond to end marker 3D position)

    Did I use the API incorrectly or can you explain this behavior?

    Thanks
    Mika

    Edit: The problem is also visible using the Cam Fly Over. I get a fixed Top View camera (looking towards -y) after 96% of the road
     
    Last edited: Mar 13, 2017
  50. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,208
    Hi TriCoachSim,

    In theory removing a crossing will not alter the position of the connected marker. It can influence the length because the spline curve will be different.

    Could you provide ore info? What are the marker positions what are those 2 last samples that give 2 different 3D positions? What are these 3D positions? And what code are you using?

    Thanks,
    Raoul
     
unityunity