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 @bcv,

    Is this related to not being able to select another object by clicking it in the scene? I just tested it in Unity 2021.2.1f1, I see the same behaviour as mentioned in this post. Clicking any other object selects that object, double clicking the terrain selects the terrain.

    I cannot 100% recreate the situation visible in the image when setting the Curve Strength of the connected road to 0, but the connection will indeed move towards the center of the crossroad.

    This is related to the "Activate Bending" option for T Crossings in the Inspector. switching this off should fix that.

    The v3.3 Flex Connector is more versatile for intersections with non 90 degree corner angles.

    Curve Strength 0 sounds like you want to create a straight road section?

    Thanks,
    Raoul
     
  2. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    How long is this road?

    I just created a 5km road with 65 road markers and followed your steps. The road object is selected in the hierarchy, the EasyRoads3D toolbar is visible. I press the most left tab with the arrow. The main road network object is now selected and within the road network the specific road is selected. Everything is fully functional no issues with camera movement. This is in Unity 2021.2f1.

    Do you see error message in the console, repetitive error messages. That would explain the camera issues.

    What happens when you select the road network object and then select the specific road object? Is the first step actually related?

    Always having the road network object selected and then select road objects is also the recommended workflow when working on the road network. I bring this up because in another post you also mentioned the steps of first selecting a road in the hierarchy and after that clicking the edit tab before. Your steps should also work just fine, it is just an extra action you have to make each time. But perhaps these are your steps when the main focus at that moment is not on working on the road network.

    We always have the main road network object selected as a starting point, that is also shown in the Introduction tutorial.

    Thanks,
    Raoul
     
  3. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735

    Hi @keithsoulasa,

    This is v3.3 beta related.

    Road objects in the scene will automatically inherit the lane settings of the specific road type. Do you mean no lanes are visible? The first thing to check is:

    General Settings > Scene Settings > Display Lane Data

    Is this checkbox active?

    In this section it is also possible to set the colors for lane display.

    Thanks,
    Raoul
     
  4. marcell123455

    marcell123455

    Joined:
    Jun 18, 2014
    Posts:
    275
    Hi raoul,

    The thing is for my plan to work, I would need to check if sideobject X is enabled on marker X and if dualsided, what side. I will save this post and will try this when this option has been added.

    thanks
     
  5. astanid

    astanid

    Joined:
    Apr 5, 2021
    Posts:
    145
  6. raoul

    raoul

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

    The system does not work in a way that new road types are added to other road types.

    New road types are added separately in General Settings > Road Types

    What is the exact road type setup at the moment and how did you create the wider road objects in the scene? Especially the road width? Does the new wider road type have the correct width settings?

    And is this the road type that is currently assigned to the road objects and the v3.3 beta Flex Connector in the scene? For the Flex Connector the road type is displayed for each connection in the Inspector after selecting the yellow middle handle.

    These markings look a little bit like crosswalks. V3.3 does have new options for this to auto generate crosswalks but this also requires sidewalks.

    In your situation the same can be done by creating a new side object and use a similar prefab as the one used for crosswalks in the v3.3 beta.

    Getting familiar with side objects and creating your own presets: https://easyroads3d.com/tutorials/side_objects.php

    In this case the mesh type of side object can be used, the first tutorial video.

    Thanks,
    Raoul

    I
     
  7. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi @marcell123455,

    I will add these options to the scripting API

    Thanks,
    Raoul
     
    joanpescador and marcell123455 like this.
  8. astanid

    astanid

    Joined:
    Apr 5, 2021
    Posts:
    145
    Settings - Road Types - Duplicate Type (Road 2) and rename it to type 2 wide - changed width to 24.
    yep. it looks like flex connector. types are correct - but it's all narrow. I need to design connector somehow ?
    upload_2022-5-3_17-29-58.png upload_2022-5-3_17-30-29.png upload_2022-5-3_17-32-50.png
     
  9. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Ok, yes, "Duplicate Road Type" should work well.

    It is strange, so the road width changed after creating the v3.3 beta Flex Connector? How did you do that? By moving one road over the other, the blue sphere appeared as an indicator that a Flex Connection can be inserted and that is when you released the mouse button? And immediately afterwards the road width changed?

    Did you double check the road if the width of "Road Type 2_wide" in "General Settings > Road Types" is still 24?

    If this is incorrect, than after fixing this, "Update Scene Instances" near the bottom in the Road Type settings can be used to update the road objects and Flex Connector in the scene.

    Thanks,
    Raoul
     
  10. JasonMann

    JasonMann

    Joined:
    Oct 14, 2017
    Posts:
    15
    Hello Raoul,

    first of all, thank you for creating this great tool. The complexity and options available are amazing!

    Unfortunately I am running into a problem. I am getting regular indents/squeezes/stretches along my road. This is particularly extreme with roads on steep terrain. I noticed it is related to the terrain deformation. When I turn on "no terrain deformation" within the marker settings this problem dissapears. And I can tell that the indent originates with the terrain deformation (as you can see in the terrain deformation preview on the second image)

    In the current scene the terrain was created using a heightmap with unity's Terrain Toolbox. on the last image you can see my settings. I was wondering if maybe the terrain resolution was the problem. Or the Terrain Toolbox. But I had the same issue on a standard unity terrain as well.

    If I missed an easy fix pointed out somewhere I apologize, but atm. I'm a bit lost. Can you give me any tips or point me to any specific settings to avoid this? Screenshot (272).png Screenshot (273).png Screenshot (274).png Screenshot (275).png
     
    Last edited: May 3, 2022
  11. raoul

    raoul

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

    Good to hear you like the tool!

    Yes, what you describe and what is visible in your images will happen on extreme angles. That is known.

    But just to be sure:

    1. What is visible in your images happens when applying tilting to the involved markers. With 0 tilting the road width more gradually changes, is that correct?

    2. And because you use the words "This is particularly extreme with roads on steep terrain" can you confirm that this does ONLY happens on these extreme angles and not on more realistic road angles? At what angle does this start to become noticeable on your end? This is visible in the stats near the top of the specific marker section?

    In any case, the issue that is known and that looks like what is visible in your images was already on the To Do list with lower priority. But it was recently reported by a user who is doing more Wipeout type of tracks where a fix for this is important, so it will most likely be fixed in the next update.

    Thanks,
    Raoul
     
  12. astanid

    astanid

    Joined:
    Apr 5, 2021
    Posts:
    145
    thanks. that worked. width of "Road Type 2_wide" got back to 6 i changed it to 24 and updated instancies.
    But i don't like how lines are connected :( any idea how to fix that ?

    next time it connected correctly upload_2022-5-3_22-7-3.png
     
  13. raoul

    raoul

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

    Glad to hear you managed to fix the width issue.

    Is the intersection in the new image a v3.3 beta Flex Connector or a v3.2 T-Crossing?

    Assuming it is the Flex Connector, what you currently see in the image is the result of a basic 2 node road type setup. Can you have a look at the road type example in the v3.3 beta demo scene, especially the Road Type Profile Editor and the "Road Shape" tab. It shows the setup, you will see that it is based on 4 nodes.

    The nodes on the left and on the right, node index 0 and 3, will be used on both roads and intersections.

    The two nodes in between are only used on intersections. These two nodes are positioned inside the line markings on the left and right. Also check this in the UV Editor window, the two nodes just inside the line marking.

    Using this setup the line markings will follow the corner as can be seen in the demo scene.

    Regarding the middle line markings, this too can be controlled in the Road Type settings. The material assigned to the "Connection Material" will be used on intersections. There is a material for the road type used in the image that has no line markings in the middle.

    It is also possible to set "Main Road Combinations" near the bottom in the Inspector, this will change the triangulation type. Depending on the used materials, this needs more work for the third connected road, the transition between this road and the "main road". That will be optimized further in next v3.3 betas. But perhaps this is something to already experiment with to see what it does.

    Thanks,
    Raoul
     
  14. unity_F6E38DB78B454B02C380

    unity_F6E38DB78B454B02C380

    Joined:
    Feb 8, 2022
    Posts:
    6
    Hello @raoul,

    I have a question. I want to write a script that makes the road more interactive in runtime. For example, I can drag and drop to draw/remove the road (not on the editor, but on runtime). Does Easyroads3D have functions that allow me to do so ?

    Thank you and have a good day!
     
  15. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hello @unity_F6E38DB78B454B02C380,

    Yes, the scripting API can be used at runtime to add and change road objects. Let me know if you have questions about how to use it.

    And what exactly do you want to do at runtime? Because the API is not required to, for example, remove a road object. Road objects are ordinary Unity game objects, the game object itself can be removed.

    Thanks,
    Raoul
     
  16. JasonMann

    JasonMann

    Joined:
    Oct 14, 2017
    Posts:
    15
    Hello Raoul,

    thank you for the quick reply! I'm not sure as of what angle it starts exactly, but the angles of the markers on the road in my scene vary between 12 and 31 degrees. On a different (less extreme) track I have witnessed this effect at a marker with 9.4 degrees. 31 is definitely quite extreme for a road and most likely we won't be needing such steep roads in our final project. However there are mountain roads that go up to the 20s. We are working on a downhill longboarding game, so being able to have some steeper roads is very important to our team. And since all tracks will be on mountains the terrain deformation is also crucial to us.

    But I was able to fix the problem on the road by simply manually tilting each marker a bit. Thank you for clearly stating the relation in your response. I feel stupid for not having tried this before. That fixes the problem for me.

    Unfortunately I discovered another problem where that fix doesn't work. On my side objects. As soon as I build the terrain the geometry of the side objects get's destroyed/distorted. This is particularily problematic since we have a sideobject basically imitating a dirt path. We need it to be a side object to be able to give it a different tag than the road (to give it differently programmed physics properties).

    This distortion in buildmode happens with all my side objects, you can also see it on the guardrail. I will post images in and out of build mode for comparison. I assume this goes together with what was happening to the roads. On my other (not so steep) track I don't have this problem. I am happy to hear that I'm not the only one having these issues. And thank you for working on a fix! If you would be able to fix these issues it would help us a lot. I'm sure full support of extremer/steeper roads will help many future developers & make EasyRoads an even more diverse tool! :)

    Best regards,
    Jason
    Screenshot (276).png Screenshot (277).png
    Screenshot (278).png
     
    Last edited: May 4, 2022
  17. raoul

    raoul

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

    The way the road is rotated based on the tilting value is the reason for this situation. Obviously you could not have known that :) It will be fixed for these more extreme road angles and when using default values.

    What I do see it that the guard rail does not look quite right.

    This is what I just tested in the v3.2 demo scene with the current version and using the same side object settings as those in the demo package.

    extreme-so.jpg

    extreme-so2.jpg

    What are the exact settings of the other side object?

    Otherwise, is it possible to send a simple example by email so we can look at it?

    Thanks,
    Raoul
     
  18. JasonMann

    JasonMann

    Joined:
    Oct 14, 2017
    Posts:
    15
    Hello Raoul,

    thanks again for the quick reply! regarding the road angle/rotation issue, that sound good!

    For the side objects I will do some more experimenting and play around with the settings a bit more. If I don't manage to fix the problem I will make you an example scene/project. I assume info@unityterraintools.com is the email I can contact, right?

    Also, while I'm at it, I noticed one more unrelated issue I wanted to mention. When I'm in build mode and try to switch tabs in the ER menu, I get a notification if I'm sure I want to switch the road back to edit mode. But no matter what I click, yes or no, it puts me back into edit mode. It's no big deal, obviously I can directly switch back to build mode if I want. but it is a bit annoying :D Obviously nothing game breaking. Just wanted to mention it while I'm at it.

    best regards,
    Jason
     
  19. raoul

    raoul

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

    Because you mention that this only happens in Build Mode, the side object settings must in one way or another way interact with the terrain heights. There are several Side Object controls that are related to that. That is why I was asking for the settings.

    For example, it could happen in previous versions that in Build Mode the geometry of Shape type of side objects was incorrect for nodes that use a specific terrain Snap weight other than 0. Could that be related? Are you using the latest version?

    Yes, that email can be used, thank you!

    I just tested Build Mode and pressing all 5 other tabs. The notification is displayed and I select "No". For all 5 tabs the road network state remains in Build Mode, tested repeatedly switching between Edit Mode and Build. Does this consistently happen on your end? Or do I have to follow specific steps to recreate this?

    Raoul
     
  20. marcell123455

    marcell123455

    Joined:
    Jun 18, 2014
    Posts:
    275
    I agree, the no button is bugged...
     
  21. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi @marcell123455,

    Debugging this requires more info :) That is why I asked if there are any specific steps or perhaps Unity version?

    This is Unity API related:

    https://docs.unity3d.com/ScriptReference/EditorUtility.DisplayDialog.html

    The code inside this, triggered when selecting "Yes", calls the same function as "Back To Edit Mode" . There is no "else" code. "No" should not do anything apart from closing the dialog. And so far that is what we see here in Unity 2019.3 (used for the package that works up to 2021.2) and Unity 2021.2f1.

    Thanks,
    Raoul
     
  22. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
  23. marcell123455

    marcell123455

    Joined:
    Jun 18, 2014
    Posts:
    275
    Hi raoul,

    I am using unity 2020.3.33f1 and ER v3.2.1f3 where this also happens.

    thanks
     
    raoul likes this.
  24. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi @marcell123455 and @JasonMann

    This is fixed for Unity 2022 in the next update in a way that this will also still work in previous Unity versions. I will double check this in 2020.3.32f1 which is the last 2020.3 version I have on this computer.

    Thanks,
    Raoul
     
    marcell123455 likes this.
  25. astanid

    astanid

    Joined:
    Apr 5, 2021
    Posts:
    145
    how can i make fence with 90 degree turns ?
     
  26. matchbox

    matchbox

    Joined:
    Jun 14, 2016
    Posts:
    30
    It's the same for me with Unity version 2020.3.33f1 but with the 3.3 beta 7 version.. just noticed it 5 minutes ago.
     
  27. raoul

    raoul

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

    Yes, it will be the same for the current v3.3 beta, the road network will switch back to Edit Mode regardless whether Yes or No is pressed. This will also be fixed in the next v3.3 beta update.

    Thank you too for the feedback

    Raoul
     
  28. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi @astanid,

    That can be done by setting the "Control Type" near the top in the Marker section in the Inspector to one of the Straight options.

    After that, if you want perfect 90 degree angles between fence instances in the corner as well, it will be a matter of aligning the markers so fence instances fit exactly on the distance of the straight line between two markers.

    EasyRoads3D-Fence.jpg

    This fence preset is part of the v3.3 beta package that you have imported. It is used in the small city block with 90 degree turns. So you can check that if you like to see an example.

    Thanks,
    Raoul
     
    astanid likes this.
  29. jason0663

    jason0663

    Joined:
    Dec 4, 2020
    Posts:
    36
    Hi Raoul, listen I dont want to sound like a noob but how do I make edges, left and right side, of a road be blended/transparent? What shader is used and how is it done. Im trying to make a cobble path and I want the left and right edges transparent/blended with the terrain
     
  30. raoul

    raoul

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

    What is the exact look that you want?

    Transparency in materials are generally done using the alpha channel of the texture.

    Are you using your own materials or materials that are part of one of the EasyRoads3D packages?

    EasyRoads3D has further options to blend the roads better with the terrain by baking the road shape in the terrain splatmap.

    This topic was discussed last week here on the forum but more dirt track related. The concept is the same though. It starts here https://forum.unity.com/threads/eas...-new-road-system.229327/page-212#post-8085482

    In my first reply I mention the "ER Dirt Road Fade In - Out" shader, this shader is specifically for dirt tracks, also optionally fading the track in and out at the start / end over a customizable distance. But all EasyRoads3D shaders support transparency through the textures alpha channel. And you can also use any other shader that does that.

    In the follow up posts the concept of alpha channels in textures is also discussed further. This can also be checked in the additional free demo package. The main road texture of all the road type examples in this package use the alpha channel to blend the road edges more with the terrain.

    Let me know if you have further questions.

    Thanks,
    Raoul
     
    Last edited: May 6, 2022
  31. astanid

    astanid

    Joined:
    Apr 5, 2021
    Posts:
    145
    I still cant' get rid of all the textures from Easy Roads assets in the project.
    It's not resource folder, and those textures are not used in the project (i only used like one main road)
    Why unity collects it all ?
    upload_2022-5-6_10-23-38.png
     
  32. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hello astanid,

    In the conversation regarding this I also mentioned the "Finalize" button. Are you testing this in the duplicated project as a proof of concept? Did you follow the steps I mentioned before also regarding the Resources folder?

    Why are these assets included in the build even when the "Resources" folder is renamed and when "Finalize" is not used? You have all the additional packages imported and I assume that all road types and side object presets in these packages are loaded in the road network object in the specific scene, is that correct?

    These presets are stored in the ERModularBase script component assigned to the main road network object. All these presets, materials, shaders, textures, etc. will be included in the final build. That is standard Unity behavior.

    When using the "Finalize" option these script components will be removed. The new "Finalize for Runtime API" option in v3.3 is related to this. When pressing this button, the script components are not removed because they are required for the scripting API to work at runtime. But all references to materials, shaders and textures are removed because they are no longer required.

    Thanks,
    Raoul
     
  33. astanid

    astanid

    Joined:
    Apr 5, 2021
    Posts:
    145
    thank for clarification... yep, look like that's the reason.
    but it's not very convinient in fact... i would like to have an ability to edit roads later and between the builds.. how can i get it ? back up terrain, duplicate road manager, inactivate the copy that finalize roads in the first one ?
     
  34. matchbox

    matchbox

    Joined:
    Jun 14, 2016
    Posts:
    30
    What about using a version control system and branches for releases?
    Regards,
    Marco
     
  35. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735

    That is why I suggested at the beginning to test this as a "proof of concept". It is only relevant at the very end just before creating the final build.

    This is pure what is involved from an EasyRoads3D point of view. It is indeed recommended to either backup your project first, that way the original project remains as it is. Or backup the scene(s), and additionally the terrain objects that will be adjusted. EasyRoads3D includes terrain backup / restore options. The backup should be done in Edit Mode. And the terrain object can be duplicated in project folder as well.

    Backing up the project first is the easiest solution. We do that anyway every week and after major changes with all our projects.

    Or you can look into other solutions like what Marco suggested.

    Thanks,
    Raoul
     
  36. unity_F6E38DB78B454B02C380

    unity_F6E38DB78B454B02C380

    Joined:
    Feb 8, 2022
    Posts:
    6
    Hello @raoul,

    Thank you for the response. I have figured it myself out how to do it. However, I have another question. The scripting API has a function CreateRoad() to create a road at some position. Is there a simliar method but with a connector ?
     
  37. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi @unity_F6E38DB78B454B02C380,

    Yes, that is possible. First the connector must be loaded so it can be instantiated:

    ERRoadNetwork class:

    public ERConnection[] LoadConnections ()
    public ERConnection GetConnectionPrefabByName (string name)

    After that the specific connection, sourceConnection, can be instantiated in the scene:

    public ERConnection InstantiateConnection(ERConnection sourceConnection, string name, Vector3 position, Vector3 eulerRotation)

    Thanks,
    Raoul
     
  38. tomobiki

    tomobiki

    Joined:
    Sep 27, 2020
    Posts:
    65
    Hi Raoul, I made some tests on the "follow terrain contours" function, but I'd like to ask confirmation to you: I tested that it's possibile to limit the option "follow terrain contours" to some parts of the road network only if these parts are placed between intersections (normal intersections or "I" intersections). It's not possible to apply "follow terrain contours" to a single part of a road joined with other parts in continuity, without intersections.
    Is this right?
    Thanks.
     
  39. raoul

    raoul

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

    "Follow Terrain Contours" is road object related. It is activated on road objects or road types and can be controlled per marker section.

    It seems you are looking for this control option for individual markers, the additional "Follow Terrain Contours" checkbox in the marker section? This can be used have parts of a single road objects follow the terrain contours and have other parts of the road object exactly follow the generated spline path.

    Let me know if you meant something else.

    Thanks,
    Raoul
     
  40. tomobiki

    tomobiki

    Joined:
    Sep 27, 2020
    Posts:
    65
    Hi Raoul,
    thanks for your fast reply. Yes, I want to have parts of the road follow terrain contours and other parts not (for example to place bridges).

    I'm going to do as you explained. Thanks!!
     
    raoul likes this.
  41. unity_F6E38DB78B454B02C380

    unity_F6E38DB78B454B02C380

    Joined:
    Feb 8, 2022
    Posts:
    6
    Thanks for the reply.

    I have another question. I am trying to make a closed track road (like a circle) using the API, but I am confused with the manual instructions on how to use that method. Could you explain more on how to do it ?

    Thank you.
     
  42. raoul

    raoul

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

    Just like in the Unity editor, closed tracks can also be done through the scripting API, ERRoad class:

    public bool ClosedTrack(bool value)

    But do you want a perfect circle closed track? That is not possible with one marker and two consecutive circular sections is not yet supported.

    It can be done with 4 road markers. Marker 1 and 3 use the circular control type, marker 2 and 4 use one of the Straight control types. Markers 1 and 4 and respectively markers 2 and 3 are very close to each other.

    circular.jpg

    public bool SetMarkerControlType(int markerIndex, ERMarkerControlType type)

    ERMarkerControlType options are: Spline, StraightXZ, StraightXZY, Circular

    Will that work?

    Thanks,
    Raoul
     
    Last edited: May 10, 2022
  43. unity_F6E38DB78B454B02C380

    unity_F6E38DB78B454B02C380

    Joined:
    Feb 8, 2022
    Posts:
    6
    Thank you, this works perfectly for me.

    I have another question. I'm looking at the SetSideObject methods, and I am still a bit confused. Can the method draw a line of side object like CreateRoad() but with a side object? And also when passing the SideObject type, is it just like any game object or there is a specific type for SideObject.

    Again, thank you for your help !
     
    raoul likes this.
  44. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Glad to hear that works well!

    Support for side objects through the scripting API currently works for road network objects that already exist in the Unity editor. Are you using that approach?

    The advantage of this is that both road types and side objects can be set up in a similar way as when creating road networks manually in the Unity editor.

    The road network can already have road objects or it can be empty, both situations will work.

    So the road types and side object presets already exist in the road network object. The next step depends on what you want to do. You mention that you want to create side objects along a path in a similar way as for road objects, but with no actual road object. That is easy, also through the scripting API. Have you seen the additional free demo package? It includes for example a "road type" called "Fence".

    After selecting this road / object type in "General Settings > Road Types" you will see that further below in the road type settings, in the Side Objects section, "Is Side Object" is toggled on. This means that no road object will be created, only the activated side objects in the side objects list will be generated, in this case the "Fence" side object.

    That's it. Objects of this type can now be created through the scripting API just like for road objects. So no side object specific API code is involved.

    Code (csharp):
    1. ERRoadTypes fenceType = roadNetwork.GetRoadTypeByName("fence");
    2. ERRoad fence1 = roadNetwork.CreateRoad("Fence 1", fenceType, markerPositions)
    Let me know if you need more feedback for activating side objects on road objects. Perhaps with the explained approach of using road networks with side object presets already available, this is also more clear. Starting with for example:

    Code (csharp):
    1. SideObject lampPosts = roadNetwork.GetSideObjectByName("lampposts");
    Thanks,
    Raoul
     
  45. ted_paradox

    ted_paradox

    Joined:
    Mar 5, 2019
    Posts:
    29
    I'm getting this error using Unity 2022.1.0b16 and HDRP 13.1.7 and EasyRoads 3.3.b7:

    EasyRoads3D Warning: HDRP version HDRP_12_1_0 detected. Could not find corresponding HDRP material package. Please contact us with this info
    UnityEngine.Debug:LogWarning (object)
    EasyRoads3Dv3Editor.OCOOOODCDQ:TKJJJ ()
    UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()​
     
  46. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735

    Hi ted_paradox,

    The v3.3 beta does indeed not include URP and HDRP packages.

    The matching HDRP package is included in both the main EasyRoads3D Pro package and the additional demo package. The demo package version includes HDRP shaders for some side objects used in the v3.3 beta scene.

    Can you try that? These packages are located in:

    /Assets/EasyRoads3D/SRP Support Packages/

    Please import first in a new project or be careful to only import the HDRP packages, otherwise the v3.3 beta scripts will be overwritten.

    You do mention the 2022.1 beta. The message points to the HDRP_12_1_0. Which HDRP version do you use? HDRP in the 2022.1 beta is not tested yet.

    Thanks,
    Raoul
     
  47. unity_M-muNcbRh2xEOA

    unity_M-muNcbRh2xEOA

    Joined:
    May 26, 2019
    Posts:
    3
    Hi. I've been using this package for more than half a year and I think it's great tool!
    But recently I stump on a problem. When I try to add shape to terrain splatmap only first texture appears, despite having around 20 texures on terrains. Previously everything was ok, I could choose any of my terrain texture. But now I can choose only one. Same unity version, no package changes.

    PALETTE.JPG

    SPLATMAP.png
     
  48. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi unity_M-muNcbRh2xEOA,

    Glad to hear you like the tool.

    Is this the first time you use EasyRoads3D with a terrain object with around 20 textures?

    At the moment up to 12 terrain textures are supported for the splatmap bake feature, so I wonder if that is the reason.

    It is already late in the evening here in Europe, I will test this tomorrow at work.

    Which Unity version are you using?

    Thanks,
    Raoul
     
  49. unity_M-muNcbRh2xEOA

    unity_M-muNcbRh2xEOA

    Joined:
    May 26, 2019
    Posts:
    3
    Unity Version: 2021.2.9f1
    Previously 20+ textures were displayed on dropdown menu. I could chose any of it. For textures with index above 12 first one from the list was painted on the terrain instead of selected one (which wasn't the problem because I had textures which I wanted pain on indexes < 12).

    Another interesting thing is that existing roads which previously had splatmap textures attached with number greater than 1 now have blank select field. When I build road despite field being blank correct texture which was prevoiusly selected is painted (ex. texture with number 5 was selected previously, now this field is blankd and dropdown shows only number 1 for selection, on road build texture with number 5 is painted).

    SPLATMAP_ON_PREVIOUS.png
     
  50. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    This sounds as if this is happening in a scene where previously the terrain texture layers were displayed correctly and set for road objects.

    So, the correct indexes are still set for road objects in the scene and this is indeed more related to the Inspector dropdown not showing all available terrain textures.

    And I can indeed not see problems with the dropdown when the terrain has more than 12 textures assigned, they are listed. This is also tested in Unity 2021.2.16f1

    Looking at the code the system currently assumes that in the case there are multiple terrains objects in the scene, the setup of terrain textures is the same across these terrain objects. It will collect the terrain textures of the first terrain object. Could it be that meanwhile another terrain object was added with only one texture, the Pebbles texture, and that this terrain object is the first in the list?

    Otherwise, can you see error / warning messages after deselecting / reselecting the road network object in the hierarchy?

    Thanks,
    Raoul