Search Unity

  1. Click here to see what's on sale for the "Best of Super Sale" on the Asset Store
    Dismiss Notice
  2. 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. LorentzB

    LorentzB

    Joined:
    Aug 26, 2020
    Posts:
    4
    Hi Raoul,

    I am sorry for replying to you late. I got a bit distracted during the weekend.

    I think the additional uv data would help a lot! Unfortunately, I'm using an older version of EasyRoads3D handed to me, I will go and ask for getting the current versioin of your package.

    For now, I managed to redo the shader graph with module nodes so that it can cover the entire road.
    I have one tiny detail that I want to confirm though: is one longitudinal uv unit roughly 2.5 meter?

    Thanks a lot!
    Best,
    LorentzB
     
  2. reflejo

    reflejo

    Joined:
    Jan 27, 2016
    Posts:
    5
    Hey, I'm making progress on the procedurally created city using mapping sources; as a side note, I noticed this problem on the latest alpha.

    When creating a road using the API as:

    Code (CSharp):
    1. EasyRoads3Dv3.ERRoad road = network.CreateRoad("Why is it breaking?");
    2. _ = road.AddMarker(new Vector3(-646.3f, 0f, -382.9f));
    3. _ = road.AddMarker(new Vector3(-709.9f, 0f, -448.0f));
    4. _ = road.AddMarker(new Vector3(-712.5f, 0f, -450.9f));
    5.  
    This is what I get:
    Screen Shot 2020-09-06 at 9.04.05 PM.png
    It looks like when adding the last marker the road does this strange "loop". Also: let me know if there is a better way to report bugs moving forward.

    M
     
  3. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,301
    Hi Antti,

    That is on the list as a To Do but with lower priority, you are the first who addresses this :). What makes this slightly more complex is that changing for example the position of marker 2 on a 10 marker road affects all data from marker two up to marker 10.

    Later this week a new v3.2 beta will be available, I will make sure to add smoothness control to the API.

    Yes, we have not seen this happen before and since you mention that it usually works just fine this appears to happen in a specific situation. I will see if this can be reproduced somehow but it might not be that simple since it is scripting API related and not knowing your code.

    Thanks,
    Raoul
     
  4. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,301
    Hi LorentzB,

    That is not a fixed value, it depends on the width of the road and the tiling value.

    Thanks,
    Raoul
     
    LorentzB likes this.
  5. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,301

    Hi Reflejo,

    Looking at the 3 marker positions, the distance between markers 1 and 2 is at least 20 times larger then the distance between markers 2 and 3. It is not that markers should be positioned at exactly the same distance, but the distance difference this case could very well be what is causing the situation in your image. Does this indeed disappear when changing the position of marker 2 more towards marker 1 or when inserting markers between marker 1 and 2?

    A very short distance like between markers 2 and 3 (a couple of units) should generally be avoided. To see how distances between markers affect the spline, you could test all this quickly manually instead of through the scripting API.

    Thanks,
    Raoul
     
  6. Barritico

    Barritico

    Joined:
    Jun 9, 2017
    Posts:
    294
    Hello

    I am trying to make mountain roads. They must be roads that pass very close to the mountains, less than 50 cm.

    I admit that I only use the simplest aspects of easy road, so I need help because I have not found the right technique.

    When I do the road, the INDENT values, no matter how small, always exceed at least 2 meters. I can remove the "contribution" of the surrounding value by removing "terrain deform", although it is not appropriate.

    Is there a method to make that road without having the ident or smooth values impacting the lateral flattening so much?
    Or is there another way to get it?

    Thank you.
     
  7. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,301
    Hi Barritico,

    These Indent values cannot go below a safe value based on the terrain specs in the scene, heightmap resolution vs terrain size. Otherwise the road will end up floating above the terrain or the terrain will break through the road. In your case this value apparantly around 2. So, using standard roads and terrain deformation, the only way to lower this value is using smaller terrain sizes or increasing the heightmap resolution.

    Another way is to use side objects, terrain detail meshes or retaining walls, the demo package includes examples. And in v3.2 these side objects can be generated automatically based on rules. The v3.2 beta is part of the asset store import in /Assets/EasyRoads3D/Beta Release/.



    Thanks,
    Raoul
     
    Barritico likes this.
  8. Barritico

    Barritico

    Joined:
    Jun 9, 2017
    Posts:
    294

    Thank you very much.
    As fast and efficient as ever. It would be nice all asset developers were like you.
    I will wait for that version and while I will be putting mountains "fake"
     
  9. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,301
    These specific v3.2 features should be fairly stable, so even if you prefer to work with offical releases you could check if this approach would work for you while v3.2 is still in beta. The side object in the video is a wall, a Shape type of side object. Variations in shape and material can be used, for example grass rock type of materials.

    Thanks,
    Raoul
     
  10. Andefob

    Andefob

    Joined:
    Sep 17, 2018
    Posts:
    37
    Yes I understand. I don't know well enough how the generation itself works and how much of the road gets regenerated when a change is made. I don't know if it would help but for example if the road is generated one marker segment at a time, it could be deterministic in a way that you set the a new seed which is based on road segment and road number (e.g. something like SetSeed(<road_seed> + n * <segment_number>) and then get random numbers in the same sequence. But yes I understand this is not top priority right now. But if you ever do something like this, it would be nice to get an API to define the SetSeed and GetRandom so that you can be sure they are as deterministic as you want and don't change when Unity versions or other libraries change.

    Speaking of the road generation, I was also trying to use the shape nodes to change road width at individual segments. But it was a bit confusing as it seems both road width, segment specific tilting and shape nodes affect the same data in a way that I don't fully understand. *If* there is any documentation about that anywhere, I would be interested in seeing it but no panic, just try to finish what you are doing - I understood 3.3 would have better width control etc. anyway :).

    Nice to hear, thank you! If you can think of any other such missing things that would be easy to add, don't hesitate :).

    Ok! I will give you more info on this if I find simple repro steps or otherwise realize what is causing it.

    Thanks,
    Antti
     
  11. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,301
    Hi Antti,

    I will make a note of your suggestion regarding randomness.

    I just tested tilting on a road section with manually changed shape node positions. It appears to be working well, the node position is interpolated on the same angle. In what way do you get unexpected results?

    The below methods will be available in the next beta:

    SetRandomBumpiness(float minHeight, float maxHeight, float minDistance, float maxDistance)
    SetRandomBumpiness(int markerIndex, float minHeight, float maxHeight, float minDistance, float maxDistance)
    SetRandomTilting(float minAngle, float maxAngle, float minDistance, float maxDistance)
    SetRandomTilting(int markerIndex, float minAngle, float maxAngle, float minDistance, float maxDistance)

    I have not yet looked in the splatmap situation when updated through the scripting API. If you have additional feedback, that would be very much appreciated.

    Thanks,
    Raoul
     
  12. reflejo

    reflejo

    Joined:
    Jan 27, 2016
    Posts:
    5
    Thanks for your quick answer. The markers are coming from the google maps API i guess it just means the road is fairly straight and then takes a specific turn. I'm sure I can interpolate the points but do you think it's worth to do that from the library when needed, instead? I'm sure there are many other cases like this when coming from an uncontrolled data source.
     
  13. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,301
    Hi reflejo,

    Markers are used as control points for ther shape, so their positions are important. Did you do the test, did it improve the shape?

    Thanks,
    Raoul
     
  14. Andefob

    Andefob

    Joined:
    Sep 17, 2018
    Posts:
    37
    I won't be able to test this until tonight or tomorrow but my main problem was that this function does not have much explanation on it:

    public void SetRoadShapeNodes(int markerIndex, Vector2[] nodes)
    Updates the road shape for the section at markerIndex according the passed Vector2[] node data


    By using GetRoadShapeNodes I figured out nodes should be two Vector2s which are derived from road width (but can it be less or more and what does it mean then?). But when I change the width of the road, it seemed whatever changes were made by SetRoadShapeNodes were lost. From that I figured out tilting might have an effect, too, at least it seemed that setting the value for one node affected next one, too. Or is it just they are sharing the same end/start Vector2 and is tilting done on top of whatever tilting the shape node data might have? I would understand this better if every marker had just one Vector2 which would in generation phase be first multiplied by road width and then rotated by tilting but now my mental model was a bit confused and I moved on to other things. So just explaining a bit better what it really does might help.

    Great, thanks!
     
  15. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,301
    Hi Antti,

    My apologies, I missed that this is related to road shape node changes through the scripting API.

    Default built-in roads have only two nodes, one on the left and one on the right. The system however is based on an array of vector2 defining the shape, the position sideways (the x value) from the center and the height (the y value).

    This is already used in v3.1 for custom road shapes, road shapes based on imported connection prefabs. The attached roads will inherit the shape of the connection, this can be more then two nodes. So,

    public void SetRoadShapeNodes(int markerIndex, Vector2[] nodes)

    This can be used to change the node shape positions per marker, not the number of nodes, and do something like in the image below (quick example). Custom road shapes are built-in supported in v3.3.

    Custom-roads.jpg

    In which situation do you want to change the road width?

    Generally it is not recommended to change road widths directly. It is more efficient to work with road types and set the width for the road type. That way both roads and crossings with connections based on that road type will auto adjust.

    Tilting and road shape nodes are two different things. First the road will be generated based on shape node positions per marker where there will be a smooth transition when markers have different shape node values. Then the tilting angle is applied when the tilting value of a marker is not 0.

    Thanks,
    Raoul
     
    Last edited: Sep 8, 2020
  16. michealcaj

    michealcaj

    Joined:
    Aug 18, 2017
    Posts:
    143
    Yeahaaaaa ! I'm excited
     
  17. Andefob

    Andefob

    Joined:
    Sep 17, 2018
    Posts:
    37
    Thank you, that explained a lot!

    About my use cases, since I am making a track editor for a racing game, I want to expose as many parameters to users as easily possible. One thing one might want to do is to change the width of the road on marker basis. I asked about this already earlier and I do get the issues that might arise with the textures. This is not super important right now but I might experiment with it later at some point again. But is it so that setting road width resets custom shape node changes?

    (I also haven't dealt with connections with so I don't know how it will complicate things. But I should at least have some way to make split roads for pits etc. but no problems/questions about this yet.)

    About the splat map issue, I found out how to easily reproduce it in my project. It seems that whenever I make a road that changes splat map, and then go back to edit mode, there is shade on top of the original texture IF the index of the texture was 4 (or higher I suppose). If opacity was 0.5, the shade is lighter, if opacity was 1, it is quite black. Picture 1 shows the case in which texture 4 has a 0.5 shade on top of it, textures 0-3 are fine. If I put the side texture itself as something with index >= 4, even weirder results happen. Picture 2 shows that - you can also see the textures on that picture.

    2.road_returned_to_edit.jpg 4.road_built2.jpg

    I couldn't reproduce this by using the normal tools (not via scripting API I mean) so it may be it is not related to ER and I am just doing something wrong with my terrains at runtime - I have no idea what that could be though.
     
  18. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,301
    Hi Antti,
    Yes, the road shape option to change the width is more a workaround given the side effects it will have on the material.

    But since you are doing this through the scripting API, this can be dealt with to some extend in a similar way as the extended road shape options in v3.3. You could check the alpha on our website, https://www.easyroads3d.com/download.php . In v3.3 line marking positions can be defined in the road type settings. You could use a similar approach and handle road width changes in a way that texture detail is preserved near line markings.

    Road width changes will be a built-in option in v3.3 with custom shaders.

    Ok, so this is texture layer related. I will check if/how this works differently through the API then inside the editor. Thank you very much for this additional info!

    Raoul
     
  19. Andefob

    Andefob

    Joined:
    Sep 17, 2018
    Posts:
    37
    Thanks for the help again! I will probably now focus on some other things for a while but I will definitely test all those 3.2 and 3.3 features later.
     
  20. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    482
    Hello again,

    I had to reformat and reinstall my system and when I attempt to run my game I get the following error:

    NullReferenceException: Object reference not set to an instance of an object
    EasyRoads3Dv3.ERModularBase.OQCCOODDCC (System.Boolean& multTerrainResFlag) (at <45ca3fc2ff684fbaa3b770431cd94a98>:0)
    EasyRoads3Dv3.ERRoadNetwork..ctor () (at <45ca3fc2ff684fbaa3b770431cd94a98>:0)
    ER3D_Traffic.IndentityMonoAdd () (at Assets/HBC/Scripts/ER3D_Traffic.cs:721)
    ER3D_Traffic.Start () (at Assets/HBC/Scripts/ER3D_Traffic.cs:51)

    The only ref that seemed to fit was on this post:
    https://forum.unity.com/threads/eas...-new-road-system.229327/page-167#post-5874073

    However, nothing seems wrong with my terrain (SEEMS) I removed the ER3D folders and reinstalled the latest version from the store, then upgraded to the alpha of 3.3.0a1

    This happens when I call: var roadNetwork = new ERRoadNetwork();

    So, long time. Hope you are doing well.
     
  21. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,301
    v3.3 as only mentioned because you can use a similar approach through the scripting API supporting road width changes preserving detail on the road edges with possible line markings not being streched squeezed.

    Thanks,
    Raoul
     
  22. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,301
    Hi James,

    Hope you are well.

    The line points to code that will check for terrain changes. Part of that is collecting all texture layers for the splatmap bake option.

    This error is known to be thrown when there are empty or incomplete layers assigned to a terrain tile in the scene. Is that indeed the case?

    This will throw a more descriptive message in the next update.

    Thanks,
    Raoul
     
  23. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    482
    Thanks. For the next person: I had 3 Terrain Layers, one of them went missing and was still kinda showing up in Terrain > Paint Texture > Terrain Layers. When I removed that missing texture, the issue went away.
     
    raoul likes this.
  24. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    482
    Raoul,

    Any news about sidewalks in 3.3?

    Have a great weekend.
     
  25. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,301
    The focus at the moment is on getting v3.2 out. You asked about this a while ago, meanwhile new triangulation routines have been created that were also required to improve the triangulation of Flex Connectors in certain situations and this will also help with support for sidewalks on Flex Connectors. This will have different options compared to sidewalks on the current built in X and T Crossings.

    Next week I will check the status of this and see if a new v3.3 alpha build can be prepared.

    Have a good weekend too

    Raoul
     
  26. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    482
    Ok, just wanted to know. Thank you kindly for the update
     
  27. reflejo

    reflejo

    Joined:
    Jan 27, 2016
    Posts:
    5
    @raoul It's pretty amazing how you are so customer focus and the incredible support you give to your users. Kudos to you. I actually went ahead and bought the HD extension just to support the team :)

    For my previous question: Either increasing the resolution or changing the markers does fix the issue, but as I said since this is coming from google Maps I'll need to figure this out in a different way. I built the road network in a way that I create an abstract representation of it to run optimization over it before actually creating the ERRoadNetwork so I'm planning on running a Ramer–Douglas–Peucker on the lattice before building the roads. I'll report back, in the meantime I have another question:

    Screen Shot 2020-09-12 at 3.27.07 PM.png

    Is there any way to connect two ERConnection(s) without an ERRoad? My fallback plan would be to create my own ERConnection I guess (in this case it'd be a 4 way connection with a different shape)
     
    JamesWjRose likes this.
  28. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,301
    Hi reflejo,

    Road networks are complex, the tool is getting more and more comprehensive, so yes support is important.

    It is not possible to connect connections directly in a similar way as roads and connections snap.

    One solution is indeed to use custom connections. In the case of the crossing in your screenshot, the T Crossing could be exported, duplicated, aligned and then imported back into the system as a Custom Connection prefab.

    But you could try something similar directly in Unity, nested connection prefabs stored in the project folder so they can be reused quickly, like the X crossing and the sewer system in the demo package. So, duplicate the X crossing and add it as a child and align the two ends. This will require some logic which 4 connections are actually free. Something else to test with this setup is terrain deformation. When terrain is leveled upwards all should be good, downward leveling may cause problems.



    Thanks,
    Raoul
     
    Last edited: Sep 13, 2020
    JamesWjRose likes this.
  29. Eagle1Xray

    Eagle1Xray

    Joined:
    Jul 30, 2020
    Posts:
    24
    This is great to hear. I'll be looking forward to this next update and seeing the changelog! I am excited!
     
  30. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,301
    Hi Eagle1Xray,

    I searched up to two pages back and see we discussed motorway on off ramps but that is v3.3. You mentioned the next update, what is this related to?

    v3.2 beta 7 was released on our website last Friday but is not announced yet here, the asset store update is pending approval by the asset store team.

    Thanks,
    Raoul
     
  31. Eagle1Xray

    Eagle1Xray

    Joined:
    Jul 30, 2020
    Posts:
    24
    just updated beta in general is always a good thing! indeed we worked through the ramp stuff via email and its been wonderful thank you.

    ill be emailing you on a NEW thread on some questions i have on these prefabs.
     
    raoul likes this.
  32. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,301
    V3.2 beta 7 is now available on our website and on the Unity Asset Store

    Please visit our website for the release notes and general v3.2 info, https://easyroads3d.com/v3beta.php

    One of the new features in this update is the requested option to scale Procedural side objects (side objects generated based on a model / prefab) directly in the Side Object Manager.

    A few small improvements are still planned and meanwhile a new demo is being worked on. Once that is done v3.2 will be released.

    Thanks,
    Raoul
     
  33. Acatist

    Acatist

    Joined:
    Jun 7, 2016
    Posts:
    39
    Hi mate, can you tell me which is the correct and clear way to connect EasyRoad with Vegetation Studio Pro, to remove the trees and details from VSPro !?

    1. I am trying to activate VSPro in the EasyRoads3D Pro v3 DEMO project / in Settings - Terrain Management, but the option "Activate" Vegetation Studio does not appear !!! It is impossible to make it work with VSPro.

    2. When trying to do it directly EasyRoads3D Pro v3 (without the DEMO), if the option to "Activate" Vegetation Studio appears. But the problem is that you can only do straight roads, without curves!

    The documentation you have is fine, but nothing specifies a clear reference to Vegetation Studio Pro !? Can you tell me where I can find this option? Can you tell me more explicitly how to do this integration?

    Thank you.
     
  34. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,301
    Hi Acatist,

    1. VS support is handled through /Assets/EasyRoads3D/Scripts/ERVegetationStudio

    I will double check the status of this script in the demo package, but if all works well in the EasyRoads3D Pro package, can you try importing the EasyRoads3D Pro package in the same project, it should replace the specific script

    2. When VS is activated, there are two options, either the Vegtation Mask Line component or the Biome Mask Area component will be added. The VS handles should follow the shape of the road and should instantly update after making changes to the road, adding markers, changing marker positions. Does that work?

    The component status can be verified by selecting the road in the hierarchy which should clearly show the VS handles. For the Biome Maske Area with a Distance value of 1 it looks for example like this:

    vs.jpg

    What do you see?

    Vegetation Studio is briefly mentioned here https://www.easyroads3d.com/v3/html/general_settings.html#terrain

    It should be a matter of activating VS and chosing the type of component and the default settings. Then in General Settings > Road Types it is possible to set road type specific values. After making changes "Update Scene Instances" near the bottom in the Road Type settings will update all roads in the scene that match this road type. Then the same settings are available for individual roads for optional further customization.

    You may want to try these last two options to see if the components updates.

    Thanks,
    Raoul
     
  35. Acatist

    Acatist

    Joined:
    Jun 7, 2016
    Posts:
    39
    Hi Raoul, thanks for your good explanations, I have already solved the problem. You have saved me a lot of headache. Just one more question: How to make the road blend well with the texture of the terrain? Can a different texture be applied to the sides of the road? ... Thanks for everything.
     
  36. EpicRiceKakes

    EpicRiceKakes

    Joined:
    Mar 20, 2013
    Posts:
    1
    Hi Raoul,

    I know that you can click "Build Terrain" to conform the terrain to the shape of the road, but it seems that after this, the only options are to either go back to "Edit Mode" or "Finalize" your terrain.

    Is there any way to conform the terrain to the road and then keep editing the road while keeping the new shape of the terrain?

    Thanks.
     
  37. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,301
    Hi Acatist,

    Glad to hear you got VS working.

    Regarding blending the road with the terrain, the generated roads are ordinary Unity gameobjects with a MeshRenderer component attached.

    General Settings > Road Types. Here you can create your own road types and assign any material you want. Regarding blending the road with the terrain, you can also use any shader you want. The EasyRoads3D shaders however use a customizable Offset to deal with z-fighting with the terrain. The ER Road Transparency shader can be used to blend a road texture with the terrain.

    Thanks,
    Raoul
     
  38. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,301
    Hi EpicRiceKakes,

    Yes, this behaviour is to avoid that the old road shape is still in the terrain after making changes to the road shape. It is recommended to use this workflow and there for by default it is the only option to switch back to Edit Mode.

    However, if you do want to preserve terrain changes and still want to go back to Edit Mode, that is possible. General Settings > Scene Settings > Enable Back to Edit Mode without Terrain Restore

    When this option is toggled on another button will appear that can be used to switch back to Edit mode and preserve terrain changes.

    Thanks,
    Raoul
     
  39. Acatist

    Acatist

    Joined:
    Jun 7, 2016
    Posts:
    39
    Hello again, to connect two roads you must use a keyboard shortcut !? I try to connect two roads and I can't find a way! Also, regarding bridges, how does a road connect to a bridge? ... I would appreciate your help ... Thanks
     
  40. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,301
    Hello Acatist,

    Connecting two roads is done by moving the first or last marker of road A to the first or last marker of road B. The two roads will snap together when the markers are close together withjing the snapping range.

    What type of bridge is that? Generally bridges are side objects, the bridge side object is activated for the road objects and specifically for the markers where the bridge should appear. In v3.2 this can be done automatically, bridges will be generated automatcially based on the terrain profile, the distance to the ground below the road.

    Thanks,
    Raoul
     
  41. funselektor

    funselektor

    Joined:
    Oct 11, 2013
    Posts:
    102
    Hey Raoul, sorry I have your email response to get back to from a couple months ago but figured it might be easier to come back here.

    There's no road markers in edit mode anymore and this is in the latest version of Easyroads. I haven't edited the roads for a few weeks and now this is happening. There are no error messages so perhaps I need to change a setting?

    - Previously road markers were selectable regardless the status of the Scene View toolbar. This could result in unexpected behaviour. Just like with ordinary game object selection it is now no longer possible to select markers with the Hand tool active (the Q key). To select the marker please make sure to have one of the transform tabs active, usually the Move Tool (W key)
    upload_2020-9-18_13-51-58.png
     
  42. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,301
    Hi Little_Gorilla,

    Is this related to a previous conversation we had through email? Can you give a reference what email that was?

    Do you mean no blue marker handles are visible? Can you try deselecting the road network object, click in the scene and reselect the road network object. Otherwise, what happens when restarting the project and selecting the road network object, do you see warnings / errors in the console?

    Or, because it is hard to provide feedback with the current info, is it possible to have a look at this scene? In that case can you email it?

    Thanks,
    Raoul
     
  43. funselektor

    funselektor

    Joined:
    Oct 11, 2013
    Posts:
    102
    It's not a reference to a previous question though, this is a new issue. I'll reply to the email now.

    Yes no blue marker handles are visible, so it's not possible to edit the road. Its a pretty complex scene and extremely large project so trying to export an asset package would just freeze unity, but I can trying doing the scene and see what happens
     
    raoul likes this.
  44. Andefob

    Andefob

    Joined:
    Sep 17, 2018
    Posts:
    37
    Now that I tested the new beta I can confirm that I couldn't reproduce the road getting slightly changed when reloaded when I set all the random values as 0. So thank you! Next, I will try to enable side objects via scripting. I am not entirely sure how to do that yet but I noticed there are some random options, too, so I hope same kind of issues won't arise. It is also still a bit unclear for me how system finds side objects via scripting if the scene does not have them set up but I haven't investigated that much yet so if it is possible, I will probably figure it out without needing help :).

    I did notice one issue with the 3.2 beta though. I don't know if is a known issue or not but splat map smoothing seems to be broken in beta, at least when used via scripting (road.SetSplatmap). First picture shows same road in 3.1 and second in 3.2 with surrounding area 4 and smoothing 4.

    ER_smoothing_works_in_3.1.jpg ER_smoothing_bad_in_3.2.jpg
     
    Last edited: Sep 19, 2020
  45. Andefob

    Andefob

    Joined:
    Sep 17, 2018
    Posts:
    37
    And now that I started to mention bugs, I don't know if this is a bug or feature but at least in 3.1, if I have a road and that already has some road markers added and road drawn and then call IsSideObject(true), the road mesh does not disappear. If I at that point try to build the road network, this error occurs:

    Code (csharp):
    1.  
    2. [Physics.PhysX] cleaning the mesh failed
    3. UnityEngine.Collider:set_enabled(Boolean)
    4. EasyRoads3Dv3.QDQDOOQQOOQDD:ODQCOCOQQD(ERModularBase, ERTerrain, Terrain, Single, Single, Single, Single)
    5. EasyRoads3Dv3.QDQDOOQQOOQDD:ODCQDDOQCD(ERModularBase, ERTerrain, Terrain, Single, Single, Single, Single)
    6. EasyRoads3Dv3.ERRoadNetwork:DoBuildRoadNetwork()
    7. EasyRoads3Dv3.ERRoadNetwork:BuildRoadNetwork(Boolean, Boolean, Boolean)
    8.  
    If I call IsSideObject(true) before adding any road markers, no road is added. No terrain deformation is happening either even if terrain deformation is set to be true. Is that how it should work? I was thinking it would have been an easy way to carve canals or rivers by making a road without road mesh below ground. I could of course use some invisible road material to get the same effect...
     
    Last edited: Sep 19, 2020
  46. SaharaBob

    SaharaBob

    Joined:
    Jul 30, 2018
    Posts:
    10
    Raoul,

    I'm having the same issue - no blue edit handles when I edit the road.

    Just in case it was something specific to my game I also tried creating new empty projects:

    Unity 2019.4.8f1 with EasyRoads3D 3.1.9f5
    Unity 2019.4.8f1 with EasyRoads3D 3.2.0b7
    Unity 2020.1.6f1 with EasyRoads3D 3.1.9f5
    Unity 2020.1.6f1 with EasyRoads3D 3.2.0b7

    All use the standard, built-in render pipeline and, apart from EasyRoads have no packages except those installed by default by the standard project templates. None of these worked either.

    (Edit) - I last successfully edited the road sometime around 8th Sept.
     
    Last edited: Sep 19, 2020
  47. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,301
    Hi Andefob,

    The ERRoadNetwork class has this method:

    public SideObject GetSideObjectByName(string name)

    I will check the splatmap API options in v3.2

    Thanks,
    Raoul
     
  48. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,301
    I will also check IsSideObject(true) and switching to Build mode.

    IsSideObject(true) means this road objected will be treated as side object only, nor road and no terrain deformation.

    You may want to check the river example in the demo package. It includes two side objects "River Surface" and "River Bed" . The Riverbed side object is based on the Shape type of side object with "Deformation Object" toggled on. https://www.easyroads3d.com/tutorials/rivers.php

    Thanks,
    Raoul
     
  49. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    5,301
    Hi SaharaBob,

    There are no known issues with this. Do you see error messages or warnings in the console?

    The only thing I can think of is the “Gizmos” tab at the top of the Scene View window being inactive, but I guess that is not the case?

    If you want I can look at your see, please email it in that case. The email is in the readme in the root directory of the EasyRoads3D folder

    Thanks,
    Raoul
     
  50. Andefob

    Andefob

    Joined:
    Sep 17, 2018
    Posts:
    37
    Thanks again for both replies! Your support is so good I fear it is affecting your coding speed :). (Of course, if the source was open, I would ask much less and find answers in the code but I do understand there are good reasons not releasing that). I will check the river example, it is probably what I want!

    About GetSideObjectByName(string name), it is a bit unclear how ER finds side objects in non-editor builds and what assets thus need to be included in builds. Manual says they are in Resources/ERSideObjectLog but it looks empty. However, I also have ERDemoProject from demo package which seems to have lots of side objects, so I assume the runtime player system is going through all Resources assets with ERSideObjectLog component when searching for side objects - I will test that later...
     
unityunity