Search Unity

World Building EasyRoads3D v3 - the upcoming new road system

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

  1. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Hey,

    what's the deal with the latest 3.3 version... where i can see what's the difference with current version in store and download the beta ? Also is it close to official release ?

    Cheers !
     
  2. raoul

    raoul

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

    This sounds like this is related to your own prefabs and side object presets. What is the exact setup?

    "Static" can be set for side objects in the Side Object Manager. The PrefabUtility class is used to spawn the lampposts so possible child objects will inherit the static state of the prefab child objects.

    Is the "Combine" option near the bottom in the Side Object manager perhaps active? It will create a single mesh of all instances which will probably interfere with your prefab setup.

    Thanks,
    Raoul
     
    keithsoulasa likes this.
  3. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735

    Hi @Vagabond_,

    The v3.3 beta is currently only available on our website, that is also where beta info is available with new features:

    https://www.easyroads3d.com/v3beta.php

    The new v3.3 features are quite complex, that is why it is released in betas and currently only available through our website upon request, see the download section.

    There will be one more beta update on our website. After that the main new v3.3 features are all implemented and the beta package will also be part of the Asset store. The final official release depends on the feedback.

    Thanks,
    Raoul
     
    Vagabond_ likes this.
  4. Wolpertinger-Games

    Wolpertinger-Games

    Joined:
    Mar 4, 2015
    Posts:
    19
    Currently we're using ER 3.3.b6, just checking out the new b7. None of our side objects in the scene/road network have a prefab connection anymore, independent of their type and the "combine mesh" option.
     
  5. dreamhst7

    dreamhst7

    Joined:
    Mar 27, 2014
    Posts:
    13
    Hi, thanks for your work! It's great!
    I have some problem with the display of the road.
    The front of the road display is incorrect.
    The texture looks bad. It is divided into parts. It moves ahead when I run.
    What can I do?
     
  6. astanid

    astanid

    Joined:
    Apr 5, 2021
    Posts:
    145
    Thank you for trying to solve my problem.
    I'm still getting all sort of lags with 3.2 demo :( it's jittering if i move the map
    upload_2022-4-28_21-44-55.png
    Is this the part you are talking about ? how it's called in the hierarchy ? i keep thinking that you have some other example scene...
    upload_2022-4-28_21-46-46.png
    What i need some kind of dust/dirt alphablending around the road. its very small now

    I have bird view camera in game but even close up i see no blending...
    upload_2022-4-28_21-49-49.png
     
  7. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735

    Hello Wolpertinger-Games,

    v3.3 Beta 7 was tested in the v3.2 demo scene available on the assets tore. All side objects are functional.

    What exactly do you mean with prefab connection?

    Is this Side Object Manager related or generating the side object in the scene?

    Are these provided side object presets in the demo package or your own presets?

    And from what you write it seems this happens for types: Mesh, Shape and Procedural. Is that correct?

    Thanks,
    Raoul
     
  8. raoul

    raoul

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

    This is URP related, as mentioned before not all assets in the demo scene that are not related to the road network are updated. Can you try removing the water object which uses a custom shader. Does that remove the jittering?

    Could you please include the quote because I am not sure what this is related too. Is this terrain texture layer related? Have you looked at the Unity terrain object and terrain texture layers, how that works, especially regarding terrain Layers / textures? https://docs.unity3d.com/Manual/terrain-PaintTexture.html

    It is the same scene but you are looking at it in an URP project for which the scene itself is not fully optimized. What is optimized for URP are the EasyRoads3D shaders and v3.2 material examples.

    Regarding the blending can you please go through the posts on the previous page and give more details what exactly is not clear in the options:

    1) Change the alpha channel, have you meanwhile checked what is involved in changing the alpha channel of a texture?

    2) Use the terrain splatmap option to blend the road more with the terrain, what exact step in this option is not clear?

    3) The color balance between terrain textures and the road textures

    To see the alpha channel in Unity and get a first idea of what is involved, select the specific texture in the project folder and look at the top of the preview window in the Inspector for the RGBA, R, G, B, A tabs. The A tab will show the grey scale Alpha channel, where white is fully visible and black is completely transparent. The idea is to make the transition from black to white wider. This is all Unity related :)

    Thanks,
    Raoul
     
    Last edited: Apr 29, 2022
  9. raoul

    raoul

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

    Glad to hear you like the tool.

    Regarding the road texture, is this your own texture?

    What are the texture import settings, especially the Aniso Level? It seems a bit on the lower end, increasing it will probably improve the quality.

    Thanks,
    Raoul
     
    dreamhst7 likes this.
  10. marcell123455

    marcell123455

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

    the Road Type UV Editor only allows me to edit the UVs on one axis. I would need to edit it on both axis. Is that possible to add?

    Thanks
     
  11. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Awesome, cheers !
     
  12. raoul

    raoul

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

    That will cause issues with the UV distribution and road resolution options.

    The Procedural side object type works that way and could also be used to create road objects but that has limited support connecting to intersections although that will work better with the v3.3 Flex Connector.

    Thanks,
    Raoul
     
  13. marcell123455

    marcell123455

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

    Well not sure how much effort it takes, but it would be cool if you put it at least on the to do list ^^ this would allow the use of texture atlases.

    Thanks ;)
     
  14. raoul

    raoul

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

    Effort in what way? :) Referring to the complications of full texture atlas in both directions and the road resolution settings. For example the Angle Threshold option to reduce the poly count will no longer work optimal.

    It is perhaps possible to some extent by making more complex shaders, but at the moment in v3.3 there are already texture atlas type of options using the full road resolution system and the current shaders, by creating the textures horizontally and adjust the texture sizing accordingly.

    Thanks,
    Raoul
     
  15. astanid

    astanid

    Joined:
    Apr 5, 2021
    Posts:
    145
    I got the idea - make road semi tranparent. But how can i do that ? looks like it doesn't support transperency I need to use another one ? i tried altering alpha in that white box - it does nothing (and that's strange)
    upload_2022-4-29_19-52-42.png
    What i would like is to blend sides of the firt track. is that possible ?
     
  16. raoul

    raoul

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

    Yes, the albedo texture is the main texture with the alpha channel. What I explained in my previous post was only to show what the alpha channel looks like. Unity can show that as a reference. It is not editable in Unity.

    How to do that? I mentioned that yesterday . This is texture related, textures can be modified in a paint program, programs like Photoshop, Gimp (free). If you search on youtube on for example "gimp alpha channel" there will probably be quite a few results that show how to do this.

    Thanks,
    Raoulo
     
  17. tomobiki

    tomobiki

    Joined:
    Sep 27, 2020
    Posts:
    65
    Hi', I'm doing a very simple thing that once in a similar case worked perfectly but now I'm doing it for the third time and I can't understand what's the problem.

    I'm going to add a side object to a train rail that is simply a ballast under the rail road: the side object is a shape object created with the shape editor inside EasyRoads3D and is a basic trapezoid, with a material that represents the ground.

    I can't understand why when I apply it to the rail road it doesn't show the external sides but only the interlas sides, as you can see in the pictures.

    To solve the problem I did the following steps:

    1) flipped the normals from the shape editor and reapplied it to the rail road
    2) made two different side objects: one with the trapezoid vertices in clockwise order and the second with the trapezoid vertices in anti-clockwise order but the final effect is always the same, that you can see in the pictures.

    A couple of weeks ago I made a try with a clea project and it worked fine, I don't understand what I'm making wrong this time.

    Thanks!!



    upload_2022-4-30_12-13-39.png upload_2022-4-30_12-15-25.png upload_2022-4-30_12-18-28.png upload_2022-4-30_12-19-23.png
     
  18. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735

    Hi tomobiki,

    For what you want, the node indexes in the first image should be ordered in CW direction. Flip Normals will reverse the order so that is something to check and can be used as a reference.

    If you want you can export the side object preset to a unity package and send it by email so I can test it.

    Thanks,
    Raoul
     
  19. astanid

    astanid

    Joined:
    Apr 5, 2021
    Posts:
    145
    With EasyRoads in project i got like +300mb to my apk. That's unacceptable. I see a lot of files in resources folder - they go into build no matter what... What can i do ?
     
  20. raoul

    raoul

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

    You have the full demo package imported which is intended for learning purposes, getting familiar with the tool. It is mentioned in the Asset description on the Asset store.

    Unity will include all assets in Resource folder in a build and EasyRoads3D uses the Resources folder for runtime features. Depending on your road network setup, the road types and side objects available in the road network, it may result in including assets that are not used. That is one of the reasons why the main EasyRoads3D package has limited additional assets. It will only include the assets you use.

    Please test this in your current project as a proof of concept for your final builds when all work is done:

    1. Duplicate the scene you want to build
    2. Only include the duplicated scene in the build
    3. Use the Finalize option in the middle mountain tab of the EasyRoads3D toolbar in the Inspector, the tab that is also used to adjust the terrain
    4. Temporarily rename the folder /Assets/EasyRoads3D/Resources/ to for example /Assets/EasyRoads3D/ResourcesTemp/
    5. Build the game and check the APK
    6. Rename the folder back to /Assets/EasyRoads3D/Resources/ before continuing work on the road networks in your scenes

    Important information regarding the Unity terrain object: The "Finalize" option mentioned in 3. will remove all script components. This option is available in both Edit Mode and Build Mode. In Build Mode the terrain object will be adjusted. Since all script components will be removed it will not be possible to restore the terrain back to the original state.

    Although the terrain object is in the scene and you duplicated the scene, the actual terrain asset is stored in the project folder. And the terrain both scenes will link to this same terrain object. This means that the terrain in the original scene will also be affected. Please let me know if this is unclear.

    Two options to avoid this:

    1) Use the "Finalize" option that is also available in Edit Mode. Since this is just for testing the APK file size, this option will work just fine.

    2) Duplicate the terrain asset in the project folder, remove the original terrain object in the duplicated scene and drop the duplicated terrain in this scene. That way the original terrain object will not be affected.

    Or another perhaps easier way to test this, duplicate the full project and test this in the duplicated project. That will only require step 3) and 4)

    Thanks,
    Raoul
     
  21. astanid

    astanid

    Joined:
    Apr 5, 2021
    Posts:
    145
    And why do you need to place everything in Resource folder ? Can't you use ordinary folder and get only needed resources in game ?
     
  22. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    That is how assets are loaded at runtime in Unity, Resources.Load().

    More optimizations are coming in v3.3. It already includes the new Finalize option "Finalize for Runtime AI"

    Thanks,
    Raoul
     
  23. astanid

    astanid

    Joined:
    Apr 5, 2021
    Posts:
    145
    How can i download it if i bought through assets store ?
     
  24. matchbox

    matchbox

    Joined:
    Jun 14, 2016
    Posts:
    30
    Hi @raoul ,

    sorry to bother you again. I am using the API and just noticed that there are various functions in ERConnection which I can't find in the documentation, for example GetConnectionCount, GetConnectedRoad, etc.
    I am using the docs at http://www.easyroads3d.com/v3/html/ERConnection.html
    Are they not up to date or am I again at the wrong place?
    In case they are not up to date, are there more functions which are not in the documentation yet?

    Thanks and have a nice weekend,
    Marco
     
  25. marcell123455

    marcell123455

    Joined:
    Jun 18, 2014
    Posts:
    275
  26. bcv

    bcv

    Joined:
    Sep 1, 2012
    Posts:
    34
    Is it just me or this asset is hard to use ? I'm having all sorts of issues, right from the start: the URP package seemed like it was not working properly, had to manually convert a few materials to use the easy road materials.

    Then selection of roads is glitchy too: if I select a piece of road then click on the left arrow, which frankly should be named edit, I go into edit mode for that piece of road. Now if I move my camera around, while pressing shift (to travel faster) plus WASD, for more than 5-10 seconds I lose the selected road I have ? Another thing I had problems with is. once a road is connected to a T intersection and has had sidewalks added, it is very hard to get new roads connected to the t intersection to show sidewalks again, I had to remove the old sidewalks by clicking on the little spheres in the intersection object and toggle them on again to show sidewalks for the new connected roads.

    here is another issue:
    click on t crossing connector
    then click on left arrow (edit mode)
    then click on yellow sphere that shows up in the middle
    at this point each corner should have 3 white spheres to allow toggling sidewalks
    if I click and toggle a new sidewalk in any corner, the sidewalk shows up but sometimes I will lose the current selected object and will have to reselect it again having to go through the whole 5 clicks to get to my sidewalk toggling state again.

    This whole sidewalk workflow should be more intuitive than some spheres that show up under very specific states. In general the UX is just weird to work with and lacks lots of polish. I'm on unity 2021
     
    Last edited: May 1, 2022
  27. raoul

    raoul

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

    Can you send your asset store invoice number by email or in a private message. That way I can register your copy so you have access to the download section on our website.

    There will be one more beta release on our website that includes the further optimizations I mentioned. After that it will also be available on the Asset Store as a separate package part of the main EasyRoads3D Pro package.

    Thanks,
    Raoul
     
  28. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735

    Hi @matchbox,

    Not every function that will appear in syntax autocomplete / intellisense is documented because some are more intended for internal use.

    Also, just in case, V3.3 beta API updates are not documented yet.

    That said, GetConnectionCount, GetConnectedRoad should be documented. I will go through this.

    Do you have any specific questions related to using this?

    Thanks,
    Raoul
     
  29. raoul

    raoul

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

    Perhaps I am missing soemthing, but what I see in terms of geometry is all doable with side objects.

    Are you more referring to these line / surface markings changing shape? That is on the to do list.

    To some extend, subtle shape changes, it is already doable by using a Shape type of side object and change node positions per marker. Scaling can also be used which is easier but that will also scale the size of the markings which is probably not what you want.

    Tanks,
    Raoul
     
    marcell123455 likes this.
  30. Slimmy

    Slimmy

    Joined:
    Apr 25, 2017
    Posts:
    21
    Hi!

    I've stumbled upon an amazing effect where my road material will mix with a dirt road material and blend nicely with my terrain and the general feel of my level design. However, I have no idea how I managed to apply this effect and I can not reproduce it. See the image where dirt road is predominant and the mixed effect is only on a very small stretch. How can I apply the mixed effect on the entire road or control which patches has which predominant material?
     

    Attached Files:

  31. raoul

    raoul

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

    I will go through your post.

    URP is material shader related. It does work but was implemented in v3.2. The v3.2 demo material that use custom shaders are all all optimized, the v3.1 demo assets are not. Materials that use Unity built-in shaders can be upgraded with the Unity conversion tool. Did you do that? It is mentioned in the URP notes in the EasyRoads3D root directory after the specific SRP support package is imported, URP in this case.

    I am not sure which exact steps are involved here. Which object is selected in the hierarchy? Road Network editing is done with the main Road Network object selected in the hierarchy.

    Which "left arrow" is selected? And how should it be named "edit"? And how do you go into edit mode?

    What appears to be involved here is selecting a road and changing either marker positions or other settings in the Inspector. To do that, select the main road network object. All road markers are visualized with selectable blue handles. Clicking a road will also select the nearest handle, the road marker can be positioned. And after selecting a road object all settings are displayed in the Inspector.

    Which exact movement actions are involved?

    I am asking that because I just moved around holding the right mouse button using WASD and using shift for more than 10 seconds. The road and road marker are still selected.

    In general the system includes the option to import models and create custom road shapes, the shape is defined by nodes. Sidewalks are included in this. Road objects can only be attached to connections when the shapes match. So that is what is what to look at when connecting road objects to connections.

    The sidewalk state on connections can be controlled with the corner handles. So that is how connections on intersections can be matched with the side walk state on road objects.

    The sidewalk system is upgraded in v3.3, this part will be improved. https://easyroads3d.com/v3beta.php

    I am not sure if the first steps, clicking the left arrow, is involved here. Because I cannot recreate what you describe.

    I cannot recreate the situation when the object is deselected. The only way I can recreate this is when I click just outside the handle, basically clicking the terrain which results in the intersection being deselected. That is standard. But all sidewalk settings are as they were and I only have to click the yellow middle handle to reselect the intersection.

    What do I have to do to recreate your situation?

    See above v3.3. Regarding UI, that changed in Unity 2021.2. Indeed some elements come out different then in previous Unity versions, adjusting that and keeping things the same backwards, is on the list.

    Creating a road network system is a never ending story. There will always be things to add and things to improve and all that takes time. We are doing our best...

    Thanks,
    Raoul
     
  32. raoul

    raoul

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

    It looks like one of the materials in the EasyRoads3D Add On - HD Roads package.

    A mask texture is used for the blending of the two textures. It looks like the tiling level of the mask was decreased for the road in your image. Could you try that?

    Thanks,
    Raoul
     
  33. Slimmy

    Slimmy

    Joined:
    Apr 25, 2017
    Posts:
    21
    That is correct. This is an HDRP project and I've purchased the HD roads package for this purpose.
    I've been tweaking and fiddling with some of the attributes of the shader/material. But, this does not seem to have any effect on applying the blend effect to the entire road object. However, I can manipulate the blend effect on the portion of the road where the blend effect is applied. Maybe I misunderstood? I seem to remember that I, at one point, split the road object into a few smaller parts. I later merged them together again and thought nothing of it. It could maybe explain why the blend effect is only applied to a small portion of the road?
    Which attributes do you suspect controls the blend effect on the road? I will attach an image of the shader options.
     

    Attached Files:

  34. marcell123455

    marcell123455

    Joined:
    Jun 18, 2014
    Posts:
    275
    Hey @raoul ,

    I created now a sideobject for these areas and this method worked. But now I had a case again where I found a inconsistency.

    To make it short, I have auto generating guardrail barriers, pretty much like the included, enabled on my roadtype. Now I placed a few nodes and created a curved road where the auto guardrails showed up. Now I needed to edit the X offset of the auto generated guardrail at some markers. Since the guardrail is auto generated it was already there, but to edit the X offset I had to enable the sideobject per marker to edit the offset. This resulted in a duplicate of the guardrail, but i was able th edit the x offset. After disabling the sideobject on the marker the X offset stayed and the duplicate was gone.

    This felt like an inconsistency to me. Maybe it would be better to have the X offset option per marker always avaible.

    thanks
     
  35. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735

    Hi @Slimmy,

    Looking at the new image with a large section completely using the sand texture, is this perhaps more related to level of blending which can be controlled per marker section by changing the vertex color in the marker settings?

    I cannot test at the moment but I belief it is done on the red channel. So moving between black and red, or black and white will control that.

    Thanks,
    Raoul
     
    Slimmy likes this.
  36. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735

    Hi @marcell123455,

    That is correct, auto generated side objects based on rules are not based on marker active states. It is implemented anticipating on making options like "X Position" also available for auto generated side objects in a way that similar code is used as when side objects are generated based on markers active state. So yes, changing this on markers will already affect the result.

    The question here is, look at recent posts here and a recent review, will that be a logical way in general or is that going to cause confusion? Having to adjust the shape of auto generated side objects by changing marker specific values?

    It is on the to do list and indeed a solution would be to simply always have the marker specific options active, or at least when "Auto Generate" is active.

    Thanks,
    Raoul
     
    marcell123455 likes this.
  37. astanid

    astanid

    Joined:
    Apr 5, 2021
    Posts:
    145
    Is there any in-built solution for pathfinding ?
    I would like my units to drive the roads, but avoidung obstacles (like other cars). How can i do that ?
     
  38. raoul

    raoul

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

    That is more Traffic AI related.

    That is not included at the moment. There are several packages for that on the Asset Store that already support the new v3.3 lane data options.

    For example:
    https://assetstore.unity.com/packages/tools/ai/mobile-traffic-system-194888
    https://assetstore.unity.com/packages/tools/ai/ultimate-traffic-controller-110492
    https://assetstore.unity.com/packages/templates/systems/its-intelligent-traffic-system-23564

    Thanks,
    Raoul
     
  39. Slimmy

    Slimmy

    Joined:
    Apr 25, 2017
    Posts:
    21
    You're correct! Absolutely amazing. Being able to adjust the material blend effect like this is an awesome feature. Thank you again for your invaluable help.
     
    raoul likes this.
  40. matchbox

    matchbox

    Joined:
    Jun 14, 2016
    Posts:
    30
    Hi Raoul,

    if this is fine I will send you an email about this, any specific way you prefer writing you or using the form on the website?

    Best regards,
    Marco
     
  41. bcv

    bcv

    Joined:
    Sep 1, 2012
    Posts:
    34
    @raoul To keep it short I'll try to describe one of the issues in detail.

    I have a road network created.
    1. I click on one the road sections
    2. Then click on the edit button (the one with the icon that looks like a left arrow in the ER Modular Base script)
    3. When I do that, the camera automatically moves to focus on the road and I see a position handle and a green sphere
    4. Now, if I use a combination of right mouse button, left shift and WASD keys to move the unity camera around, the road section at some point, will get deselected, that is, the inspector window no longer shows any details, it shows nothing selected, and the hierarchy window to the left shows nothing selected. I can reproduce this issue consistently, using unity 2021.2.18f
    5. I wanted to rule out any issues with my keyboard and did this little experiment with other objects in the scene and they don't get deselected, only the ER ones.
     
    Last edited: May 2, 2022
  42. raoul

    raoul

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

    You can email us, the email is in the readme, or you can contact us through the website, what you prefer.

    Thanks,
    Raoul
     
  43. raoul

    raoul

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

    Because what you mention in 3. I think the situation in 1. and 2. is that at this point the main road network object is not selected in the hierarchy. Instead an individual road object within the road network hierarchy is selected. After that you click the most left tab in the EasyRoads3D toolbar that is visible in the Inspector.

    This will select the main road network object and auto select this specific road object for editing, is that correct?

    3. The green sphere is the selected marker nearest to where the road object was clicked. All other road markers are represented by blue spheres.

    But I just tried this in Unity 2021.2.0f1 which is used to upload the Unity 2021.2.x package, I can now recreate something similar as what you describe, but only with the A and D keys and only when these two keys are released before releasing the Shift key. This does not happen for the W and S keys for zooming.

    Is that also what happens on your end? I am asking that to double check, because you write this can be reproduced consistently. I will look further into the situation I can reproduce.

    Thanks,
    Raoul
     
  44. bcv

    bcv

    Joined:
    Sep 1, 2012
    Posts:
    34
    @raoul Just tested again and yeah you are correct in that it seems A & D keys are the ones causing the road to become deselected. If it's worth anything, I've been having these sort of selection issues in some other cases which I can describe if needed but I feel like these are all related somehow. For example sometimes an ER object stays selected and I cannot click anything else in the scene, as if the selection functionality was stuck, forcing me to click anything on the left panel hierarchy to force it to leave this stuck state if that makes any sense. I feel like this might not be ready for 2021 but it could be just me and I keep working with it watching your tuts but it's a pain in the rear end so far with all the issues. Thanks for checking my complains though.
     
  45. raoul

    raoul

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

    Good to hear that you are seeing the same regarding scene navigation. That will be fixed.

    Does this only happen when the main Road Network Object is selected?

    The default Unity behaviour is that when an object is clicked, that object is selected.

    To add road objects / road marker control points, Shift + Click on the terrain is used. The road marker will be position at the specific terrain position.

    Click on the terrain object in Unity, the unity terrain object is selected. That is not what should happen in this case, the click on the terrain was intended to add a road marker control point or perhaps to do other road network related operations.

    So the way this is implemented is that when the road network object is selected and when the terrain is clicked, selecting the terrain object is intercepted, the road network object will remain selected.

    However, to select the terrain, double click can be used. That is the only implemented different behaviour. Clicking any other object than the terrain object should select this object in the standard way, with a single click. Does this work the same on your end?

    Thanks,
    Raoul
     
  46. marcell123455

    marcell123455

    Joined:
    Jun 18, 2014
    Posts:
    275
    Hey @raoul ,

    how can I get a reference to a roads road markers and its side object settings? I want to write a editor script that automatically sets the x position of some sideobjects at specific markers if a specific sideobject is enabled on that marker. (Basically to adjust the position of my guardrails, streetlamps etc automatically on that marker when my road curb extension is enabled, so I don´t have to do it manually.)

    thanks
     
    Last edited: May 3, 2022
  47. bcv

    bcv

    Joined:
    Sep 1, 2012
    Posts:
    34
    @raoul I will explain the other issue I experienced in a different post but no it did not seem to work properly.

    Have another question, why do you think a connector is failing to attach roads properly ? You can see that in the image below the roads are overlapping the connector.

    Edit. Found that curve strength is the cultprit here. Seems like you cannot have 0 curve strength under certain circumstances otherwise the connectors will overlap
     

    Attached Files:

    Last edited: May 3, 2022
  48. bcv

    bcv

    Joined:
    Sep 1, 2012
    Posts:
    34
    @raoul found another issue. I have a road network with multiple streets, and there is this specific long road that when I select it and click on scene view status to edit it (left arrow looking icon) everything gets really slow. If I try now moving my camera by using right mouse button and WASD, the camera will get stuck in a sort of loop and will move continuously despite releasing the keyboard buttons. In one instance I pressed S once to move the camera back a bit and the camera moved back continuously until my scene was not visible due to how far it was. Looks like the complex road network is making the system to crawl or lag incredibly when entering the edit state which in turns is causing the camera movement to get stuck in that cycle somehow. I'm on a 12900k with 64gigs of ram, I don't want to think my computer is the issue.
     
    Last edited: May 3, 2022
  49. keithsoulasa

    keithsoulasa

    Joined:
    Feb 15, 2012
    Posts:
    2,126
    How exactly do I add multiple lanes to a road, I'm seeing the option to visualize multiple lanes in the road editor, but I can't get multiple lanes to work in the scene
     
  50. raoul

    raoul

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

    First a reference to the road object is needed:

    ERRoadNetwork class:

    ERRoadNetwork roadNetwork = new ERRoadNetwork();

    The constructor will in this case create a reference to the road network in the scene.

    ERRoadNetwork class:

    public ERRoad[] GetRoadObjects()
    public ERRoad GetRoadByName(string name)
    public ERRoad GetRoadByGameObject(GameObject object)

    Or, if this is done per road object in the scene, this will create a reference to the selected road object in the scene:

    ERRoad road = EREditor.GetSelectedRoad();

    Side object related functions:

    ERRoadNetwork class:

    public SideObject GetSideObjectByName(string name)

    ERRoad class:

    public void SetSideObjectXPosition(SideObject obj, int markerIndex, float value)

    I see that currently there is no option to get the active state of a side object on the marker through the scripting API, that can be added. But, if that matters, it is not required to set the X Position.

    Is this info you need or do you need more details?

    Thanks,
    Raoul