Search Unity

World Building EasyRoads3D v3 - the upcoming new road system

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

  1. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    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.
  2. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735

    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
     
  3. Barritico

    Barritico

    Joined:
    Jun 9, 2017
    Posts:
    374
    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.
     
  4. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    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.
  5. Barritico

    Barritico

    Joined:
    Jun 9, 2017
    Posts:
    374

    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"
     
  6. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    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
     
  7. Andefob

    Andefob

    Joined:
    Sep 17, 2018
    Posts:
    99
    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
     
  8. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    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
     
  9. 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.
     
  10. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    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
     
  11. Andefob

    Andefob

    Joined:
    Sep 17, 2018
    Posts:
    99
    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!
     
  12. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    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
  13. michealcaj

    michealcaj

    Joined:
    Aug 18, 2017
    Posts:
    191
    Yeahaaaaa ! I'm excited
     
  14. Andefob

    Andefob

    Joined:
    Sep 17, 2018
    Posts:
    99
    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.
     
  15. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    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
     
  16. Andefob

    Andefob

    Joined:
    Sep 17, 2018
    Posts:
    99
    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.
     
  17. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    687
    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.
     
  18. raoul

    raoul

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

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    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
     
  20. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    687
    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.
  21. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    687
    Raoul,

    Any news about sidewalks in 3.3?

    Have a great weekend.
     
  22. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    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
     
  23. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    687
    Ok, just wanted to know. Thank you kindly for the update
     
  24. 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.
  25. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    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.
  26. 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!
     
  27. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    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
     
  28. 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.
  29. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    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
     
  30. Acatist

    Acatist

    Joined:
    Jun 7, 2016
    Posts:
    45
    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.
     
  31. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    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
     
  32. Acatist

    Acatist

    Joined:
    Jun 7, 2016
    Posts:
    45
    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.
     
  33. ntailedfox

    ntailedfox

    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.
     
  34. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    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
     
  35. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    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
     
  36. Acatist

    Acatist

    Joined:
    Jun 7, 2016
    Posts:
    45
    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
     
  37. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    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
     
  38. funselektor

    funselektor

    Joined:
    Oct 11, 2013
    Posts:
    105
    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
     
  39. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    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
     
  40. funselektor

    funselektor

    Joined:
    Oct 11, 2013
    Posts:
    105
    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.
  41. Andefob

    Andefob

    Joined:
    Sep 17, 2018
    Posts:
    99
    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
  42. Andefob

    Andefob

    Joined:
    Sep 17, 2018
    Posts:
    99
    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
  43. SaharaBob

    SaharaBob

    Joined:
    Jul 30, 2018
    Posts:
    15
    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
  44. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    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
     
  45. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    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
     
  46. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    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
     
  47. Andefob

    Andefob

    Joined:
    Sep 17, 2018
    Posts:
    99
    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...
     
  48. raoul

    raoul

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

    After initially making the main functionality available at runtime, the scripting API is currently build based on requests.

    For both road types and side objects it aspects the roadnetwork to be already part of the scene in the Unity editor. So road types and side objects can be set up / assigned to the road network in the Unity editor. The ERRoadNetwork constructor will create a reference to the road network in the scene.

    Thanks,
    Raoul
     
  49. SaharaBob

    SaharaBob

    Joined:
    Jul 30, 2018
    Posts:
    15
    Hi Raoul,

    Thanks for your reply. Unfortunately, no, I did not see any messages in the console, and I tried all of the tools selected (move, rotate, etc.) except the hand tool without success. Over the next few days I'll try to reproduce the issue in a minimal project.
     
  50. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Have you checked if the "Gizmos" tab above the Scene View window is active, the "Gizmos" button itself. By default it is active but perhaps it was accidentally clicked?

    Thanks,
    Raoul