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,205
    Hi lezan_,

    Looking at the last lines of your post, you are covered now regarding editing the shape of the river bed per marker, is that right? Otherwise, it is a matter of selecting the side object you want to edit from the dropdown in the marker settings.

    To set Terrain Snap Weights, select the speific side object from the dropdown in the side object manager, click the "Open Shape Editor" Button. You will see the river bed shape on the canvas, if not, the Z key will put focus on the shape. Select a node. On the left you will see all the controls among which "Terrain Snap Weight" for which you enter values between 0 and 1. A value of 1 snaps it exactly to the terrain height.

    Thanks,
    Raoul
     
    Last edited: Jan 20, 2017
  2. lezan_

    lezan_

    Joined:
    Nov 27, 2016
    Posts:
    50
    Yep, it is right!

    I will try to play with it a bit and I will see what I can do with that.

    Thanks (another time) for your quick support raoul!
     
  3. Mr_Dan_O

    Mr_Dan_O

    Joined:
    Oct 12, 2013
    Posts:
    347
    Long detailed description of the problem:

    I am using World Streamer. It loads terrains, roads, buildings and etc... from HDD and loads them into the game (loads those objects from HDD to RAM) according to the position of the player. Something like LOD system of GTA video game series.

    World Streamer uses scenes to stream (for example, there are two scenes in the image of my previous post. Those scenes have one terrain and multiple objects - like roads and stuff As shown there). Lets call those "scenes", chunks. So the roads should be "Chunk-specific".
    Now in order to add/delete roads I should load those chunks in the editor (I can load both of the chunks in one scene for editing) and use Easy Roads to edit the roads there.

    But I have 651 chunks (which means 651 different terrains that have their own buildings, roads and objects), I can load all the 651 chunks (the complete city map) and use EasyRoads to add/delete roads - which means one road network for the whole of the city - but this eats my laptops RAM and slows down Unity and it may even crash. So I decided to load 2 or 5 chunks (image is shown below) in order to add/edit roads to one chunk accurately and seamlessly. The problem is how would I be able to do so. If you also know an alternative way, I'd be glad to know it.



    Short description of the problem:
    Basically I have 651 scenes and those scenes show up in play mode and build up a city. And I want to add roads to them seamlessly, but I don't know how. Also I can load those scenes in another scene for editing and applying changes.
    Please help.

    Thanks in advance!.
     
    Last edited: Jan 20, 2017
  4. raoul

    raoul

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

    With this setup you could build the road network in a separate scene. When all is done, move each object to the scene with the matching terrain chunk, this can be done easily through an editor script.

    But you mention memory issues. It sounds like you have a massive world. What is causing the memory issus? To what extend Is this directly related to EasyRoads? How many road objects do you have? Does that happen when the Road Network game object is selected? Can you do a test, duplicate the project and finalize the road network in the duplicated project, how does that affect the memory usage?

    Alternatively you could try moving road objects accross road networks using a similar script as already mentioned. So, after you loaded 2 by 2 or 5 by 5 chunks, move all road objects to the same road network. When work is done, move them back to the road network of the matching terrain.

    Thanks,
    Raoul
     
    Mr_Dan_O likes this.
  5. Mr_Dan_O

    Mr_Dan_O

    Joined:
    Oct 12, 2013
    Posts:
    347
    Got you, that is actually a the way I wanted to create the roads and it is possible. But in this way, all the terrains should be loaded in the scene which is technically impossible due to high memory consumtion.

    The world map is twice big as GTA V's map.
    I have not used Easy Roads for the project.

    There are only 651 terrains right now and if I open them all in one scene, the memory - expectedly - become 92% full.


    That is it!, Thank you. This is I think a possible way. Would you please tell me more about the script that you were talking about.
     
    Last edited: Jan 22, 2017
  6. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,205
    It is still not entirely clear what is causing the high memory consumption. If it is not directly related to EasyRoads3D I think you can have one road network object in a separate scene during development where only one or a couple of terrains are loaded. It depends on the complexity of the road network and the type of roads. If you have roads snapping to the terrain / following the terrain contours, you do not want these roads to update if the actual terrain in that area is not loaded.

    Regarding the workaround and the script. It is not an exisiting script. What you can do is prepare each scene with it's own road network. While working on multiple scenes together you first run that script, that obviously will have to be created :). It will move all objects from all road networks to one single road network. That way you can connect roads between terrains. Afterwards you do the reverse, go through that specific road network and move all objects back to the road network matching the terrain, you do this by checking the cente of the bounding box against the bounds of all the terrains in the scene. Do you do programming?

    You could also first do a quick manual test to see if this actually works. Create 2 or more scenes, each of them have a road network with just a couple of roads. Load all scenes, manually move the road objects and connection objects across scenes to one road network. Create the connections and move the roads back to the road network in the original terrain /scene. Does that work?

    Thanks,
    Raoul
     
    Mr_Dan_O likes this.
  7. Mr_Dan_O

    Mr_Dan_O

    Joined:
    Oct 12, 2013
    Posts:
    347
    I think there is a misunderstanding here, I have not used EasyRoads for that project yet. I only opened all the 651 terrains and it ate all the memories of my laptop (~92% of total RAM amount). So there is nothing to do with EasyRoads there. Each terrain has different terrain data and splat maps and shader data so it is expected to get that much of RAM.
    Aha Okay. I was on the opinion that there is already an script for it. Sorry about that. Yes I do programming (I'm a computer science student so I should know it :D ), Okay thanks for the concept. I'll try to solve it. Thanks for the tips.
     
    Last edited: Jan 21, 2017
  8. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,205
    In that case you could try to build the road network in a separate scene. The only thing to be careful with is using the Refresh Road Network option. This will refresh all objects and can have unexpected results for those objects in areas with no terrain. But if your full road network is as massive as your terrains then potentially you wll run in RAM issues again?

    This is an usual situtation, there is no script for that at the moment. I put it on the list but more for after the 3.0 release.

    But this process/script should be simple. For each scene select the Connection Object in the hierarchy, go through all childs and using an editor script parent them to the same Connection Object of the "working" Road Network Object. Do the same for the road objects by selecting the Road Objects gameobject in the hierarchy. After the work is done a second script using the same principle will put these objects back by checking the center of the bounding box of each object and match them with the terrains.

    But, as mentioned, I would first do a quick manual test of this process as a proof of concept.

    Thanks,
    Raoul
     
    recon0303 likes this.
  9. lezan_

    lezan_

    Joined:
    Nov 27, 2016
    Posts:
    50
    Hi raoul,
    if you remember I already asked you a question about Aquas and EasyRoads3D. If I wanted to use Aquas with EasyRoads I set Target Object of River surface with AQUASWater prefab, but in this way I lost reflection and caustics. I am play with it to try to solve it, but without success. I tried to attach reflection and caustics manually, but with the object created by EasyRoads3D ( AQUASWater(Clone) ) does not work (If I try to attach manually to another object created by me, reflections and caustics work).
    Do you know what I can do to fix that?

    Thanks!
     

    Attached Files:

    Last edited: Jan 21, 2017
  10. Mr_Dan_O

    Mr_Dan_O

    Joined:
    Oct 12, 2013
    Posts:
    347
    Yes this is the problem that I've been thinking about it. I have a solution for it, let me test it and I'll tell you. Could be useful for others, too.
    Thanks I do it my own no need to take your time and the concept has some flaw. I'll do some tests as soon as possible and share some details here.
     
    raoul likes this.
  11. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,205
    Hi lezan_,

    Do you mean this works well when you create your own prefab? In that case, can you see any differences in the Inspector regarding attached scripts / materials or the setup of the prefab?

    If this is Mesh related then the only thing I can think of that might be different is that perhaps tangent info is missing? Do you have Calculate Tangents toggled on? Or does the Mesh require other AQUAS specific data?

    I will see if I can find out more about this.

    Thanks,
    Raoul
     
  12. lezan_

    lezan_

    Joined:
    Nov 27, 2016
    Posts:
    50
    Yes, exactly.
    I can not see any differences between them.
    However it is not a problem of reflections and caustics (as I mentione before), but I think it is a texture issue.

    Are you refering to "Calculate Tangents in Edit Mode" in General Settings->Scene Settings?
    If yes, yep, it is on.
     
  13. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,205
    What does your own prefab look like. How did you create it?

    Do you mean an UV issue? In both the side object manager and the Shape editor window you have several options regarding the UVs.

    Yes, and in the Build settings.

    I have emailed the creator of AQUAS about this.

    Thanks,
    Raoul
     
  14. lezan_

    lezan_

    Joined:
    Nov 27, 2016
    Posts:
    50
    I just created a plane and I assigned scripts to it.
    See attachments.

    I am playing with them from yesterday. If I solve it, I will drop how.

    All them are active.

    Thanks for that!
     

    Attached Files:

  15. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,205
    So the AQUAS material /scripts work well with a standard Unity plane primitive?

    I might be wrong, but I remember something from a previous AQUAS conversation that UVs shoulds be calculated relative to the terrain bounds. I belief this was related to flowmaps, perhaps this is what is required? In the Shape Editor window you can set the UVs to Terrain UVs, inside the 0..1 range.

    But I am not sure if this is related since you mention that a Unity plane primitive works well, this has the UVs assigned between 0..1 relative to the plane mesh itself.

    Thanks,
    Raoul
     
  16. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,205
    Beta 8.4 is now available on our website

    Nested prefabs is now supported. This is useful on more complex prefabs when you do not want terrain deformation on all connections.

    In the below example the sewer object below the crossing is a nested prefab for which terrain deformation should be ignored. To achieve that it is created as a separate connection prefab nested as a child object of the main crossing prefab. The normals of the sewer object are pointing inwards which is what you want in this case. Ignore the wrong lighting, the screenshot was taken with the terrain disabled so it is also affected by the directional light which won’t be the case in the final game.

    ER_nested_prefabs_0.jpg

    ER_nested-prefabs_1.jpg

    ER_nested_prefabs_2.jpg

    Furthermore a “Distribute Y Evenly” option has been added which is useful in hilly areas, It will gradually adjust the height of all markers between two selected markers. And you can now also order side objects in categories in the Side Object Manager which is useful if you have many side objects in your scene.

    The update also includes various bug fixes among which the reported 8.3.2 UV length issue for Shape Type of side objects and side objects referencing wrong marker segments when there is only one triangle strip for the road between two markers.

    Please backup your project first before upgrading to 8.4 :)

    The asset store update will be submitted tomorrow.

    Thanks,
    Raoul
     
    Last edited: Jan 23, 2017
    recon0303, radimoto, John-G and 5 others like this.
  17. AurimasBlazulionis

    AurimasBlazulionis

    Joined:
    Aug 13, 2013
    Posts:
    209
    Hello, I have been using V3 beta (from the V2 asset, not from your website, first time hearing it) and have run into a small problem when baking the terrain. It seems that the detail is not removed on the road connections. I attached some pictures.
    Also, I wonder if it is possible to occlusion cull parts of the road network? er3db1.png er3db2.png
     
  18. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,205
    Hello TheDiamondPlay,

    Indeed there can still be some terrain detail near crossing connections (like in the bottom image on the left of the crossing), this will be further optimized. For now you could manually remove this once your ready to publish.

    The first image involves a bridge segment. I will look into that as well but this is slightly more complicated to completely automate. You do not want terrain vegeation to be removed below the bridge but depending on the terrain shape at the start of the bridge it could be some terrain detail will poke through the road. Unless it isn't important if all detail is removed below the bridge on a specific "save" distance. Otherwise some manual cleaning up will still be required.

    The connection between the crossing and the bridge segment seems a bit out of shape? I thought this perhaps had to do with the bridge segment directly being attached to the crossing but I just did a quick test and that seems to work fine.

    bridgeCrossing.jpg

    Thanks,
    Raoul
     
  19. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,205
    @TheDiamondPlay, this has been further optimized, all detail on crossing connection edges like in your bottom image will be removed. Please send a PM or email if you need it urgently.

    Thanks,
    Raoul
     
  20. AurimasBlazulionis

    AurimasBlazulionis

    Joined:
    Aug 13, 2013
    Posts:
    209
    Thank you. No, I do not need it as fast as possible. It is just good to know that it has been fixed.
     
  21. LondonStevey

    LondonStevey

    Joined:
    Jun 26, 2015
    Posts:
    33
    Hi @raoul just wanted to say a big thank you for your awesome tool! Its helped us tons in the skiing VR game we've made. We didn't even use it for the roads in the end, just for the side object stuff, but meant I could make the fences, position banners and create the ski tracks and markings for the jumps. Its saved us days of dev!

    Here's a couple of examples of the side objects and ski tracks:
    valley2.jpg
    above2.jpg

    And it was also really useful for the jump marks. Just creating a very small mesh side object so we could practically draw the lines on the terrain:
    propark1.jpg

    We did actually use the roads for one level that was quite windy. We drew out the road and just used it for its terrain deformation and then deactivated it afterwards, but it created a really good ski path.
    forest1.jpg

    You can check out the Alpine Ski VR trailer and game on Steam or the Oculus store:
    http://store.steampowered.com/app/553110/
    https://www.oculus.com/experiences/rift/1282497005107532/

    Thanks again and can't wait to use it for the updates!
    Steve
     
  22. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,205
    Hi Steve,

    That looks great, well done! And good to see different uses of the tool :)

    Indeed ski tracks is a good example where EasyRoads3D can come in useful as well. Inititially I had this in mind for the final demo project, a winter scene with ski tracks, Bobsleigh tracks, mountain coasters, ski gondolas, etc. additional to the road network example. I may still do this later or perhaps you want to share some screenshots?

    Regarding using roads for terrain deformation only, for future scenes you may want to look into the terrain deformation capabilites of the Shape type of side object. You can use it to create half-pipe tracks and even more complex shapes. The terrain will be defomed according these shapes just like the riverbed side object example.

    Good luck with your game!

    Thanks,
    Raoul
     
    DesertRaven likes this.
  23. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,830
    Bobsleigh tracks? I hadn't even thought of that. What a great idea. Easy Roads is incredibly flexible. It's definitely one of the best purchases I've ever made on the asset store.
     
  24. LondonStevey

    LondonStevey

    Joined:
    Jun 26, 2015
    Posts:
    33
    Thanks Raoul,
    Ahh I'll have a look at the shape, we started using it but went with the road in the end as it seemed to have more flexibility. Oh and we used EasyRoads for all the tree placement in the end too. It was a much quicker workflow than using other terrain tools and just set them up as side objects drawing lines everywhere to create forests! So many awesome uses for it, general discussions were.. "How are we going to do that", "There must be a way in EasyRoad thats gunna make life easier" and there usually was, our side object dropdown goes off the screen!
     
  25. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,205
    Using side objects may give you more freedom in the shape. The bike track picture at the top of the previous page is a shape type of side object. The terrain is flat, the track is created using different Snap to Terrain weights on the shape nodes, optionally you can also change the shape per marker. You can use a similar approach for the ski track / pipe line and simply toggle on "Terrain Deformation" in the main Side Object Manager settings. In Build Mode the terrain will be deformed accordingly and the side object itself will be hidden.

    Yes, we also use the terrain vegetation option a lot too for tree lines. More options for this will follow so you can add them to prefabs without having to select them from the Terrain vegation dropdown. An example of this is the v8.4 crossing screenshot further above. The trees are part of parking separator side object but they will be added to the terrain object in Build Mode.

    The same in the upcoming new demo project. That's why a category option was added in 8.4, it makes finding a side object perhaps easier.

    Thanks,
    Raoul
     
  26. LondonStevey

    LondonStevey

    Joined:
    Jun 26, 2015
    Posts:
    33
    That bike tracks awesome, I'll have a look at using that for the jumps at some point as well then.
    We didn't end up doing a chair lift for this version, but if there's any other screenshots you want from the game we'll be happy to share. Hopefully get that added into V2! :)
     
  27. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,205
    Thank you! I was thinking of some screenshot for the new website. I will contact you later.

    Raoul
     
  28. Fr2

    Fr2

    Joined:
    Jan 19, 2013
    Posts:
    26
    Hi Raoul,

    I've been experimenting with the API, starting with the runtime scene example, and it's really impressive. Looking at the docs, I wasn't sure if it's possible to dynamically position sideobjects using the API. Is this possible with the API? Another thing I'd like to do try to do is position prefabs (e.g. buildings or vegetation) dynamically along the side of the road at runtime. I can work out positions using the road.GetPosition() method, but couldn't work out how to align them next to the road with the correct rotation. Is there a way to find out the rotation of the road at a given position?

    Thanks
     
    Last edited: Feb 10, 2017
    raoul likes this.
  29. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,205
    Hi Fr2,

    It sounds like you want to position "sideobjects" not using the built-in side objects system?

    road.GetSplinePoints(), road.GetSplinePointsLeft(), road.GetSplinePointsRight() return Vector3[] with the exact spline curve. With this info you should be able to get the correct rotations.

    Regarding Side Objects, the system, full marker control is not yet implemented in the scripting API, but you can activate side objects for road types in the editor settings. When adding roads of that road type through the scripting API, the side objects will be added as well.That way the objects will be aligned with the road as set in the Side Object Manager.

    Thanks,
    Raoul
     
  30. KillerNads

    KillerNads

    Joined:
    Jan 22, 2017
    Posts:
    70
    Hi Raoul,

    New Unity user here and have purchased and been using Easyroads v3 from unity asset store for a few days now.

    Theres one thing that i really urgently need help with!! Been playing around with it for hours and cant seem to get it to work correctly.

    I created my own side object in the Road Network for manhole cover, gutters, road damage etc...

    However when i add them to my road, they are displayed vertically and not flat horizontal!!

    I played around with all the settings i could find, but nothing is there to allow me to rotate these side objects on the X axis! I could only find rotation of the object allowed on the Y axis. This is a major limitation. Please can you tell me how i can fix this?

    Thanks
     
  31. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,205
    Hi KillerNads,

    Could you drop your prefab in the scene from the assets folder and look at the rotations in the Inspector? Are they (0,0,0) or something else?

    Often Unity applies rotations to it, if that is the case then indeed this will not look good when using this prefab as the source prefab for a side object.

    The solution is to create a new prefab, add your model to this prefab as a child and apply the same rotation values to this child, not the parent!).

    Assign this new prefab as the source prefab to your side object.

    Thanks,
    Raoul
     
  32. KillerNads

    KillerNads

    Joined:
    Jan 22, 2017
    Posts:
    70
    UPDATE: Ah, actually the parent child thing worked! thanks. However, i have another few issues with these side objects.
    Firstly, when i add them they go below the flat road terrain, so i have to put Y=0.1 for them to appear at all. The issue however is that when they are a few feet away, they are visible but as soon as im a bit further back they are dissapearing, like they are moving below the road themselves?!
    Secondly, Ive made sure that Cast shadows on these objects are turned to OFF. However when im adding them to the Road Network as Side objects they are still casting a shadow, which makes the gap underneath them (y=0.1) much more visible!!
    Lastly, another issue im encountering with the roads is that when i go close to it via the camera in both the Scene and Game view, some of the road just dissapears revealing the terrain underneath it!
    Please can you help me fix these very annoying issues im having :) thanks!

    UPDATE 2: Dont worry about the second issue about the shadows posted above. I managed to fix that. After adding the side objects i went to the grouped mesh rendered of the side object and turned off cast shadow again. When you add the side objects it automatically enables cast shadow.

    Hi,

    The object has -90 on the x-axis. Also the options are greyed out and it doesnt let me edit the rotations. I downloaded it as a free asset from the unity store.

    Hence, even if i do the parent child thing you mentioned, it still wouldnt work right? As you asked me that i need to edit the childs rotations which are uneditable. :(

    Can you think of any other solution?

    thanks
     
    Last edited: Feb 13, 2017
  33. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,205
    Hi KillerNads,

    Glad to hear the rotation issue is resolved.

    That sounds related to the offset used on the road shader. This offset deals with z-fighting between the road and the terrain. It can effect other objects based on the cam position and angle. So the the first thing to check is whether this will actually be a problem in your final game regardig the in game cam angles. If so then you can try lowering the offset values in the shader. on reasonably flat terrains you don't need it at all if you Raise the road network somewhere between 0.02 and 0.05. You can also use a similar offset in the shader used on the objects on the road.

    I will make a note to double whether the cast shadow settings are matches with the source prefab when using the Combine Objects option, assuming this is what the problem is related to.

    Thanks,
    Raoul
     
  34. KillerNads

    KillerNads

    Joined:
    Jan 22, 2017
    Posts:
    70
    Hi Raoul,

    Thanks for your help. But im pretty new to unity, please can you help me how to do this:

     
  35. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,205
    Which shader are you currently using on those objects? Are they custom shaders present in your assets folder or one of the built in shaders? Is it the Unity Standard shader?

    If it is the Unity Standard shader, then probably the easiest solution is to simply select the EasyRoads version of the Unity Standard Shader from the shader dropdown (EasyRoads3D/Unity 5 Standard) in the Inspector in the material component. The EasyRoads3D version is exactly the same but with that Offset applied.

    Let me know if you are using another shader. This is a little bit more complicated if you are new to Unity but it is perhaps also a starting point to get familiar with this type of thing, materials / shaders.

    Lowering the offset values is a matter of opening the specific shader (/Assets/EasyRoads3D/shaders/), look for:

    Offset X, X

    Change the values more towards 0.

    Thanks,
    Raoul
     
  36. KillerNads

    KillerNads

    Joined:
    Jan 22, 2017
    Posts:
    70
    Thanks, i was using default unity shaders. But as soon as i changed the side objects to the EasyRoads shaders, they stopped dissapearing.

    As for the road, changing the shader on the road material didnt intially do anything, but after a little bit of trial and error, not sure in the end what it was, but i managed to fix it and the road stops dissapearing now. In fact, before this when i started using EasyRoads it messed up my Scene Camera altogather and would clip any object off the screen that was a certain distance away. Fixing the road has also fixed my camera somehow?!?

    For the road i also did try to move the RoadNetwork parent up by 0.02 on Y. But that change would not save, i even tried changing the roads parent inside RoadNetwork, again that would not save, as soon as you clicked back to the Root in the Heirarchy, the Y would default back to 0. There are some really wierd bugs in this tool. Sometimes just clicking into the road objects in the hierarchy completely removes all my side objects and i have to go back and re-add them again. Clicking anything in the road network in some particular order also makes the side objects dissapear.

    For now, i have sort of what i wanted, hopefully i dont need to re-add anything else, cause i shudder at the thought of going back in to edit or add anything!!

    I know the Software is in Beta, but i think ive heard you say that v3 is 99% the final version. Im sorry but it just feels very Alpha at this moment. I love the tool, but it has too many bugs. Also because of these bugs ive lost countless hours of my development time in work arounds :( Infact i would have saved a ton of hours if i had just manually gone and created the whole road with the side objects myself.

    But i would definitely like to thank you for your help in the issues i faced, otherwise i wouldnt have been able to get anything working.
     
  37. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,205
    Glad to hear that indeed resolved the issue with side objects sinking in the road.

    Is this related to the scene cam focus? You can use the Unity hotkey F to reset the focus by first selecting an object in the hierarchy.

    To avoid issues with manual position changes and the road network no longer matching the terrain, the road network is locked to (0,0,0). That is why changing this in the Inspector didn't work. With Raising the road a little bit, I meant the "Raise" option at the top below the toolbar after switching to Build Mode.

    Do you have more info on this or has anyone else experienced the same? During all the development I have clicked the road objects many times. Side objects do not disappear, neither has this been reported before so more info would be very much appreciated. Did you get error messages?

    The only thing that can happen is that side objects get positioned in the center of the road after selecting the specific side object in the hierarchy. This is due to an unfinished feature where you can drag the side object, it will still follow the spline shape.

    I hope my previous comments were perhaps helpful here. There are no known issues related to switching back and forth between Edit Mode and Build Mode.

    The 99% stable is based on the number of bug reports we get lately and our own experience considering all the options there are. If people are still experiencing issues please report!

    So, please let me know what still feels like a bug for you other then the side object issue you mentioned :)

    I am sure building just one road goes faster if you do that manually. No need to get familiar with the tool. But when the terrain is not flat, terrain deformation is also involved. This is the main reason why we started this 7 years ago. It will take countless hours to match the terrain with the road.

    No problem :) please ask if you have further questions and I would appreciate it very much if you point me to those bugs.

    Thanks,
    Raoul
     
    Last edited: Feb 13, 2017
  38. KillerNads

    KillerNads

    Joined:
    Jan 22, 2017
    Posts:
    70
    No i dont think so. What i meant is when you use the scene cam and go close to any object, it would start dissapearing from the camera viewpoint even though it should have been displayed a few centimetres in front of you. Its almost as if the Near Clipping Plane has suddenly increased. Because of this i am not able to go up close to any object in my scene. It was the same thing when the road was dissapearing to reveal the terrain underneath whenever i tried to zoom in close to it. Not sure how i managed to fix this in the end.

    Ah i see this option now, i didnt actually ever click build yet, i was always in edit mode! But just now when i did click build i see the RAISE option, it already has the value of 0.02 in it. So i must have done this manually in edit mode to each of the roads.

    Yes ive had the side objects go to the centre to me also before. But sometimes ive had them totally dissapear from the scene. Im not exactly sure how or why this is happening. But i think this happens when i go into the Road Network Heirarchy > Road Objects > Default Road > HQ Lamp Post Left (HQ Lamp Post Left being the side object) and edit the position to make it higher or lower etc... If i do this to a bunch of side objects in that default road, then also go to my other roads and do the same, suddenly all the side objects dissapear from every road!! Ive also now just seen that yes there is an error in the console.

    I seem to have dozens of these errors:
    Code (CSharp):
    1. transform.position assign attempt for 'HQ Lamp Post Right' is not valid. Input position is { NaN, NaN, NaN }.
    2. UnityEngine.Transform:set_position(Vector3)
    3. ERPrefabInstanceEditor:OnSceneGUI()
    4. UnityEditor.DockArea:OnGUI()
    5.  
    There are also other errors that i seem to be seeing:
    Code (CSharp):
    1. IndexOutOfRangeException: Array index is out of range.
    2. ProBuilder2.EditorCommon.pb_Editor.GetFirstSelectedMaterial (UnityEngine.Material& mat)
    3. ProBuilder2.EditorCommon.pb_UV_Editor.RefreshUVCoordinates (Nullable`1 dragRect, Boolean isClick)
    4. ProBuilder2.EditorCommon.pb_UV_Editor.RefreshUVCoordinates ()
    5. ProBuilder2.EditorCommon.pb_UV_Editor.OnSelectionUpdate (.pb_Object[] selection)
    6. ProBuilder2.EditorCommon.pb_Editor.UpdateSelection (Boolean forceUpdate)
    7. ProBuilder2.EditorCommon.pb_UV_Editor.OnMouseClick (Vector2 mousePosition)
    8. ProBuilder2.EditorCommon.pb_UV_Editor.HandleInput ()
    9. ProBuilder2.EditorCommon.pb_UV_Editor.OnGUI ()
    10. System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
    11. Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    12. System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
    13. System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
    14. UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:249)
    15. UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:242)
    16. UnityEditor.HostView.OnGUI () (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:76)
    17.  
    Code (CSharp):
    1. IndexOutOfRangeException: Array index is out of range.
    2. ProBuilder2.EditorCommon.pb_Editor.GetFirstSelectedMaterial (UnityEngine.Material& mat)
    3. ProBuilder2.EditorCommon.pb_UV_Editor.RefreshUVCoordinates (Nullable`1 dragRect, Boolean isClick)
    4. ProBuilder2.EditorCommon.pb_UV_Editor.RefreshUVCoordinates ()
    5. ProBuilder2.EditorCommon.pb_UV_Editor.OnSelectionUpdate (.pb_Object[] selection)
    6. ProBuilder2.EditorCommon.pb_Editor.UpdateSelection (Boolean forceUpdate)
    7. ProBuilder2.EditorCommon.pb_UV_Editor.OnMouseClick (Vector2 mousePosition)
    8. ProBuilder2.EditorCommon.pb_UV_Editor.HandleInput ()
    9. ProBuilder2.EditorCommon.pb_UV_Editor.OnGUI ()
    10. System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
    11. Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    12. System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
    13. System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
    14. UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:249)
    15. UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:242)
    16. UnityEditor.HostView.OnGUI () (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:76)
    17.  
    Code (CSharp):
    1. IndexOutOfRangeException: Array index is out of range.
    2. ProBuilder2.EditorCommon.pb_Editor.GetFirstSelectedMaterial (UnityEngine.Material& mat)
    3. ProBuilder2.EditorCommon.pb_UV_Editor.RefreshUVCoordinates (Nullable`1 dragRect, Boolean isClick)
    4. ProBuilder2.EditorCommon.pb_UV_Editor.RefreshUVCoordinates ()
    5. ProBuilder2.EditorCommon.pb_UV_Editor.OnSelectionUpdate (.pb_Object[] selection)
    6. ProBuilder2.EditorCommon.pb_Editor.UpdateSelection (Boolean forceUpdate)
    7. ProBuilder2.EditorCommon.pb_Editor.SetEditLevel (EditLevel el)
    8. ProBuilder2.EditorCommon.pb_Editor.DrawHandleGUI (UnityEditor.SceneView sceneView)
    9. ProBuilder2.EditorCommon.pb_Editor.OnSceneGUI (UnityEditor.SceneView scnView)
    10. UnityEditor.SceneView.CallOnSceneGUI () (at C:/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:2075)
    11. UnityEditor.SceneView.HandleSelectionAndOnSceneGUI () (at C:/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:1405)
    12. UnityEditor.SceneView.OnGUI () (at C:/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:1242)
    13. System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
    14.  
    Code (CSharp):
    1. IndexOutOfRangeException: Array index is out of range.
    2. ProBuilder2.EditorCommon.pb_Editor.GetFirstSelectedMaterial (UnityEngine.Material& mat)
    3. ProBuilder2.EditorCommon.pb_UV_Editor.RefreshUVCoordinates (Nullable`1 dragRect, Boolean isClick)
    4. ProBuilder2.EditorCommon.pb_UV_Editor.RefreshUVCoordinates ()
    5. ProBuilder2.EditorCommon.pb_UV_Editor.OnSelectionUpdate (.pb_Object[] selection)
    6. ProBuilder2.EditorCommon.pb_Editor.UpdateSelection (Boolean forceUpdate)
    7. ProBuilder2.EditorCommon.pb_UV_Editor.OnMouseClick (Vector2 mousePosition)
    8. ProBuilder2.EditorCommon.pb_UV_Editor.HandleInput ()
    9. ProBuilder2.EditorCommon.pb_UV_Editor.OnGUI ()
    10. System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
    11. Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    12. System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
    13. System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
    14. UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:249)
    15. UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:242)
    16. UnityEditor.HostView.OnGUI () (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:76)
    17.  
    Code (CSharp):
    1. Mesh.uv is out of bounds. The supplied array needs to be the same size as the Mesh.vertices array.
    2. UnityEngine.Mesh:set_uv(Vector2[])
    3. pb_Object:RefreshUV(IEnumerable`1)
    4. ProBuilder2.EditorCommon.pb_UV_Editor:DrawAutoModeUI(Int32)
    5. ProBuilder2.EditorCommon.pb_UV_Editor:DrawActionWindow(Int32)
    6. UnityEditor.EditorWindow:BeginWindows()
    7. ProBuilder2.EditorCommon.pb_UV_Editor:OnGUI()
    8. UnityEditor.PopupCallbackInfo:SetEnumValueDelegate(Object, String[], Int32)
    9.  
    I hope those help :)

    Thanks
     
  39. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,205
    Hi KillerNads,

    If this is Scene View related, what you describe to me does sound F key related. Have you tried hitting F? It resets the Scene Cam and puts focus on the selected object, afterwards you can zoom in without clipping issues. This is a Unity function.

    That is indeed what the Raise option does, adjusting the position of each object relative to the road network which must stay at the same position.

    The road network in Edit Mode is purely to create the roads. Build Mode adapts the terrain and gives a fair representation of the final result. This is when the "Raise" option becomes relevant and useful.

    Do you mean edit the position of an individual instance, more or less what I mentioned. Or edit the position of the full side object. If it is the full side object, then it is recommended to do this using the X / Position options in the Side Object Manager. That way it will always auto adjust according road shape changes.

    What is the specific pattern you mentioned in the previous post? At which exact point do they disappear? And do they diappear all at once or, for example, after you edit an object, then you select another object and the previously edited object disappears? And does this always happen in Edit Mode or in Build Mode, or both?

    I mean, how can I replicate this? :)

    Only the most top 'HQ Lamp Post Right' error is EasyRoads3D related. That is a typical error that can happen when you select a single instance of a Mesh type of side object. Is that right? This is something that usually rarelly happens. The error is related to that feature I mentioned in my previous post, fine tuning the position of a single instance along the spline shape just in case you do want to place it somewhere else. I realize it is annoying, but it should be harmless. It will be fixed in the next update and the full feature will be functional, preserving the original X / Y positions relative to the spline, etc. But in general you rarely want to select a single instance

    I can't speak for the other error messages, looking at the details they are related to another package in your project.

    Please let me know if you have more bug reports :).

    Thanks,
    Raoul
     
    Last edited: Feb 14, 2017
  40. KillerNads

    KillerNads

    Joined:
    Jan 22, 2017
    Posts:
    70
    If i have this happen again i will definitely try that! Since last time it hasnt come back so it seems okay for now. Thanks for the tip.

    To be honest with you, im not entirely sure, but i had it happen to me many times when i was creating my roads and side objects initially. I dont need anymore for my current level, so havent been working with easyroads since then. When i start working on my future levels, im sure im going to need roads again so i will try and find the exact steps to replicate it then. Sorry but i just dont have the time right now to try it, as i had already spent(wasted) many hours battling with EasyRoads to get it working correctly. Even yesterday, i was trying to replicate it for you to get the exact steps, but all i could find is what i had mentioned to you in my post above.

    I can definetly remember though that it wasnt when using the Side Object Manager, it happened when i manually edited the side objects position from the inspector after selecting the object from the Road Networks heirarchy. So i guess that would mean the individual instance right? And yes they all dissapeared at once, even the side objects that were in any other roads that i wasnt editing but that road was still in the same road network. I only ever saw it happen while in Edit Mode.

    When the side objects dissapeared is when that error message appears for 'HQ Lamp Post Right'.

    Woops sorry! It was very late when i posted this message yesterday, and probably the reason why i missed that :)

    No that i think was the main issue that i had. Maybe its just me and i dont know how to use the software properly which is why i thought it was in Alpha :( But that dissapearing bug was definitely very annoying and really got to me many times!!! I think that is probably why i mentioned it feels like Alpha earlier, well that and the few other issues i had posted above.
     
  41. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,205
    So at this stage only this side object issue remains.

    The Side Object Manager indeed doesn't directly interact with scene instances untill you click the "Update Scene Instances" button after making changes to side object settings.

    All the main functionality is done with the Road Network game object is selected. The 'HQ Lamp Post Right' part is indeed related to a selected side object scene instances. In that case, only the script attached to that game object runs which will only affect that game object. I am not sure how that can result in all other side objects / other game objects disappearing. I will double check that.

    If it is related, that error by itself was a small thing and is fixed in the next update.

    Thank you very much for your feedback!

    Raoul
     
    Last edited: Feb 15, 2017
  42. KillerNads

    KillerNads

    Joined:
    Jan 22, 2017
    Posts:
    70
    No worries, thanks for your help too! Also if i find anything else out i will definitely let you know.
     
  43. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,205
    Just an update on the above conversation...

    I had a look at the 8.4 beta, I cannot replicate the side object issue, no matter which object I select in the hierarchy the side objects do not disappear. If anyone has more info on this please let me know.

    The 'HQ Lamp Post Right' type of error happens when you select the very first or the very last single instance of a side object. It will disappear when toggling off "Snap to Road" in the Inspector.

    Thanks,
    Raoul
     
  44. Grendelbiter

    Grendelbiter

    Joined:
    Oct 14, 2016
    Posts:
    121
    Just wanted to say I'd like to see Easyroads3D work with Aquas and World Streamer.
     
  45. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,205
    Hi Grendelbiter,

    AQUAS was brought up last month. Meanwhile I had a quick look at it. The AQUAS prefab itself works well. The only difference I noticed was different tiling which can be tweaked in the material itself. But creating a new water object through AQUAS is done through an editor window and will generate more objects in the scene. I still have to see what is involved in that.

    Releasing v3.0 has priority at the moment, but if you or someone else can provide exact info of what is needed I can already add it if it is not overly time consuming.

    The same for World Streamer, I am not familiar with this tool, how it works and in what way support should be added. First thoughts are this is about dividing the road network in sections? Since all roads / crossing objects are separate objects, I would think that is already possible.

    Thanks,
    Raoul
     
  46. f1b0n4cc1

    f1b0n4cc1

    Joined:
    Aug 27, 2015
    Posts:
    38
    Thank you for keep us updated with your wonderful work.

    I wonder if it is possible to duplicate a road network and connect eachother. I simply want extend my city without building road again. My main aim is duplicate road network and make simple changes and connect first one by a few marker / as like neighborhood/district/quarter
     
  47. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,205
    Hi f1b0n4cc1,

    Glad you like it!

    Do you mean you want to use the same road network in another scene and continue expanding it in that scene?

    Which Unity version are you using. One way to do that in the latest versions could be by also temporarily loading the scene with the current road network. In the hierarchy drag the road network to the new scene and unload/remove the temporary scene without saving it. The road network in the original scene should still be present. You may want to test this first in a duplicated project / scene.

    Since it looks like you want to duplicate the road network, I am not sure about the "connect eachother" part?
    Thanks,
    Raoul
     
  48. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    I can´t wait to see so highway junctions!
     
  49. Finn-Krewer

    Finn-Krewer

    Joined:
    Mar 17, 2015
    Posts:
    1
    Hi Raoul,

    Thank you for making this brilliant tool, it's saved us lots of time so far. We are using the asset store v3.0 beta 8.0 version and I'm getting a log in the console, when saving a connection prefab,and the log says please report:
    "EasyRoads3Dv3 Warning: The connection vertex count and UV count do not match, please report!"

    Just wondering if you could tell us what that is? I think it is the reason we can't change UV mapping for the roadtype coming out of that crossing prefab. Strangely it's just one roadtype coming out of the connection and not all roadtypes.

    Thanks,
    Finn
     
  50. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,205
    Hi TooManySugar,

    That is WIP :), just like Y junctions, both will be introduced in v3.x

    For now you could check the highway overpass examples in the demo scene. You could strip off the bridge elements and import them using the custom prefab system. Depending on what you need that may already work for you?

    Thanks,
    Raoul
     
unityunity