Search Unity

World Building EasyRoads3D v3 - the upcoming new road system

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

  1. Actiter

    Actiter

    Joined:
    Jan 3, 2018
    Posts:
    2
    Hi Raoul,

    I have the same issue as mentionned previously regarding build fails with error :
    Shader error in 'EasyRoads3D/Terrain/ER Terrain Mesh Tesselation': maximum ps_5_0 sampler register index (16) exceeded at line 147 (on gles3)

    I easily reproduce the issue with even empty scene as long as the EasyRoads3D asset is imported (no need to have terrain or road network). I try to build to Android device and my Unity version is latest 2017.3.1f1.

    I have tried to change the #pragma line trick at line 58 but it still fails.

    Thanks for helping
     
  2. raoul

    raoul

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

    Does it still fail when creating a build with a scene where that shader is used? Or only when building a scene where this shader is not used like you described above?

    In that case, below is a link to what Unity support suggested to try.

    https://forum.unity.com/threads/eas...g-new-road-system.229327/page-89#post-3396467

    This has been confirmed as a working fix. Does that work for you as well? Unity support still ideally likes to receive a bug report. If you want can send you a small package with this situation isolated.

    This is updated in the latest version on the asset store.

    In any case, like mentioned before, this is a non road related shader used for terrain meshes. You can remove it if you do not intend to use it.

    Thanks,
    Raoul
     
    Last edited: Feb 26, 2018
  3. Actiter

    Actiter

    Joined:
    Jan 3, 2018
    Posts:
    2
    Unfortunately, the fix proposed does not work. However, removing the file allows to build (but it crashes when is launched... need to investigate that). I'd be glad to have the small package to do isolated tests.
     
  4. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    It is still not entirely clear if this is a similar situation. Does the build fail when the scene includes this shader, when creating a build with scenes where this shader is not used, or in both cases?

    I am not sure about the crash? Because you mention that this happens when the shader is removed in which case the crash cannot be related to that shader.

    I have started a conversation with links to the test package.

    Thanks,
    Raoul
     
  5. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    anyone tested it on 2018.1 ? I've just load the project and the easyroad/transparent/diffuse materials are not displayed. Not sure what changed on 2018 but they just go invisible
     
  6. raoul

    raoul

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

    That is one of the older v2 shaders. It is no longer part of the package.

    Can you you try one of the current shaders? for example, the one based on the Unity Standard shader.

    Thanks,
    Raoul
     
  7. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    I can't use unity standard shaders since they are crazy slow on mobile, i have to use the legacy/mobile versions.
    To give you an idea, placing a standard shader on my android, just for the fact of being on the screen, drops by 10 the fps... and in this case i have a bunch of roads so I avoid standard shaders like the plague.
     
    Last edited: Mar 1, 2018
  8. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
  9. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    Thanks, unfortunately that seems to work just like a regular transparent... it doesn't seem to blend on the terrain, it either goes above/under the terrain instead of blending like the previous one.
     
  10. MythicalCity

    MythicalCity

    Joined:
    Feb 10, 2011
    Posts:
    420
    Hello,
    We are also experiencing build errors when we have Easy Roads in our project. If I delete the easy roads folder I can build a windows build without any errors. However with the package (I tried the latest version that was on the asset store yesterday) I get these errors. I'm not sure why a plugin from the asset store should cause an entire game build to fail for any reason.

    GetBool is not allowed to be called during serialization, call it from Awake or Start instead. Called from MonoBehaviour 'ERCrossingPrefabs' on game object 'Default X Crossing'.

    UnityException: GetBool is not allowed to be called during serialization, call it from Awake or Start instead. Called from MonoBehaviour 'ERCrossingPrefabs' on game object 'Default X Crossing'.

    Broken text PPtr in file(Assets/EasyRoads3D/Resources/dynamic prefabs/Default X Crossing.prefab). Local file identifier (124534) doesn't exist!
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    GetBool is not allowed to be called during serialization, call it from Awake or Start instead. Called from MonoBehaviour 'ERCrossingPrefabs' on game object 'Default X Crossing'.
    See "Script Serialization" page in the Unity Manual for further details.
    UnityEditor.EditorPrefs:GetBool(String, Boolean)

    UnityException: GetBool is not allowed to be called during serialization, call it from Awake or Start instead. Called from MonoBehaviour 'ERCrossingPrefabs' on game object 'Default X Crossing'.

    Broken text PPtr in file(Assets/EasyRoads3D/Resources/dynamic prefabs/Default X Crossing.prefab). Local file identifier (124534) doesn't exist!

    GetBool is not allowed to be called during serialization, call it from Awake or Start instead. Called from MonoBehaviour 'ERCrossingPrefabs' on game object ''.
     
  11. raoul

    raoul

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

    The previous transparent shader was the regular Unity transparent shader with an offset applied. The shader in the previous email seems to work very similar.

    Thanks,
    Raoul
     
  12. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735

    Hi capitalJmedia,

    This is mentionend in various posts. It is also mentioned in the Known Issues section in the manual:

    -------------------------------------------------------------------------------------

    Errors/warnings after package import

    In Unity 2017 you may get GetBool and Broken text PPtr in file... errors/warnings after the package import. This has been discussed with the Unity devs. It is a known Unity issue related to prefab file ID's that have become invalid. The tool includes a fix for this that will be triggered as soon as the main road network object is selected in the hierarchy.

    --------------------------------------------------------------------------------------

    Hope this helps,
    Raoul
     
  13. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    what did the offset do? just move it vertically? in any case the one you had on easyroad was perfect for me and this one goes over and under the terrain all the time.
     
  14. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    That is indeed what the offset was used for, to deal with z-fighting. You can add the below line at line 12

    Offset -1, -1

    The lower the value the stronger the Offset effect.

    Thanks,
    Raoul
     
    Last edited: Mar 2, 2018
  15. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    Thanks, i got an official reply from unity:
    Ok, turns out we've already fixed this on our development branch but it hasn't yet been backported to 2018.1 (thank you for reminding us, it will get done now).

    The root cause for this is the fact that we've (finally) moved away from Cg for surface shader analysis and use DX for it now. DirectX is more picky about the case sensitivity of the shader semantics, so you can work around the problem by simply switching the casing of the color input:
    float4 color: Color
    ->
    float4 color: COLOR
    . This should get you unblocked. And, as said, a proper fix will show up in the next few betas.
     
    hopeful and raoul like this.
  16. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Yes, that does indeed fix the issue with the transparent version. As these older shaders still appear to work fine in Unity 2018 I will add them back to the package as more mobile friendy shaders.

    Thanks!
    Raoul
     
  17. cygnusprojects

    cygnusprojects

    Joined:
    Mar 13, 2011
    Posts:
    767
    Hi @raoul,

    according to your website it's possible to import road data from OSM. However clicking the tutorials and more info buttons do get me to the same page I'm currently on. Any more info to spare on how to do this?

    Thanks,
    Wim
     
  18. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    cygnusprojects likes this.
  19. knifeyau

    knifeyau

    Joined:
    Dec 23, 2016
    Posts:
    3
    are there any videos? I am finding it impossible to do the simplest things. I even built a road and it appeared like it was missing a texture, then I ran the game it made my character black and white when I stood on the road. So obviously it was some kind of shader/lighting issue making the road look black and without texture. Nothing about this asset seems to work right.
     
  20. raoul

    raoul

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

    New videos will be added. However, you seem to have issues which rather need support then a video.

    What do you mean with missing a texture? Does the road appear in pink (missing material) or in black which you mentioned later?

    If the road appears in black then your material is probably using normal maps. In that case the road mesh requires tangent info. Please make sure that "Calculate Tangents" in both the Build settings (middle mountain tab) and in General Settings > Scene Settings is switched on.

    Can you show screenshots of the issue if the above doesn't help?

    This is quite a comprehensive toolset with many features and options. What else does not work well for you?

    Thanks,
    Raoul
     
  21. cygnusprojects

    cygnusprojects

    Joined:
    Mar 13, 2011
    Posts:
    767
    Just one important question: the values you have to enter for the Global Terrain Coordinates, how should those be calculated? Leaving them on 0 does scale the network according to the terrain (as mentioned) however I want to target a specific location of terrain tiles (some out of the 256) in my scene.
    Any other non zero value currently results in none of the roads being build.
     
  22. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    The values for the terrain coordinates are indeed optional. Usually you don't want to calculate these cordinates. Instead either the osm data file coordinates match the terrain coordinates or other DEM material is used for the terrain for which the longitude latitude coordinates are also known. That is how we use this.

    How many terrains of the 256 should be targeted? Because before extracting the data file you could disable all terrain tiles and only enable those that should be targeted. When selecting the road network object afterwards only the enabled terrain tiles will be found. Do these specific terrain tiles exactly match the osm data file coordinates?

    Also, when entering coordinates manually, do these longitude / latitude values cover those in the data file? If not, then indeed 0 roads will be extracted.

    Thanks,
    Raoul
     
  23. MythicalCity

    MythicalCity

    Joined:
    Feb 10, 2011
    Posts:
    420
    Thank you for the quick reply. That worked :)
    Would be great if that wasn't needed though, hope you can find a workaround to the issue that prevent builds when you first try out the plugin.
     
  24. rapidrunner

    rapidrunner

    Joined:
    Jun 11, 2008
    Posts:
    944
    HI, I am considering this package, but I have some doubts.

    The first is the integration with Gaia: does this works with Gaia? I can make my own streets with other means, but if I have to spend time to adapt the road to the terrain, then it is a big waste of time. From my understanding, easyroads3 is able to set a path and it will conform to the terrain, requiring only minimal adjustments. Is that the case?

    The second is related to training material. I did find some youtube videos with the features, but nothing that really walk through the process of building different types of roads. Usually I buy the products that have a good amount of training material, so I won't have to go dig into forums to get answers :)

    I see that there is a free "trial" version of the product; although I would rather hear from actual users, how this package behave, compared to other solutions. Thanks!
     
  25. raoul

    raoul

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

    Glad to hear that worked for you too :)

    As mentioned in my previous post, this is not something we have full control over, it is a known Unity issue. And usually you will have selected the road network and actually created roads before doing a build.

    But yes, we are looking further into this.

    Thanks,
    Raoul
     
  26. raoul

    raoul

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

    Yes, EasyRoads3D does work with Gaia and it will flatten the terrain to match the road shape.

    In a post today further above I mentioned that a new video will be available together with the v3.1 release which includes additional scene view workflow options. This new video will also walk you through the tool in general.

    Different road types can be created in General Settings > Road Types. You can then select the preset and create a new instance in the scene. You can also set up crossings to match this road type.

    The main resource at the moment is the demo package which includes featured zones with links to short tutorials on our website. The Quick Start section in the manual explains the basics to get started.

    Please let me know if you have any questions.

    Thanks,
    Raoul
     
  27. rapidrunner

    rapidrunner

    Joined:
    Jun 11, 2008
    Posts:
    944
    Thanks for your reply; it is appreciated that you put in some demo scenes; they really help, although the step by step setup tutorials, really makes things easier.

    So it is not the road that adapt to the terrain, but the terrain that get deformed to adapt to the road? I saw some of your videos, where you have nice windy roads around cliffs; I assume these are made by hand, positioning the road elements?

    Also regarding bridges and other areas where the level of the terrain drop; are you making these by hand or is the package able to see that there is a gap, and create a suspended elements to accommodate the scene? Trying to figure out if I can use this package also for scenes where I do not have just a flat-ish terrain. Thanks!
     
  28. cygnusprojects

    cygnusprojects

    Joined:
    Mar 13, 2011
    Posts:
    767
    Indeed, it works if I only enable those terrain tiles affected by the OSM file. Ah, the values for latitude and longitude needs to be covered by the OSM, sounds logical as well. Thanks, make completely sense now.
     
    hopeful and raoul like this.
  29. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Roads can adapt to the terrain through the scripting API but generally you want the terrain to match the road shape.

    Everything in the videos is done using EasyRoads3D.

    For bridges you can test the free version, road markers can be pulled upwards higher above the terrain, the terrain will match shape. The steepness of the terrain can be controlled through the "Surrounding" values in the Inspector. Furthermore terrain deformation can be disabled for markers, that way you can create bridge sections where the terrain is not updated. This can be done manually but it is already automatically done when activating bridge side objects for these markers.

    Thanks,
    Raoul
     
  30. rapidrunner

    rapidrunner

    Joined:
    Jun 11, 2008
    Posts:
    944
    Much appreciated for the reply. You have a new customer :)

    Looking forward to the tutorials that you mentioned; in the meantime I will try to experiment a bit with the current terrain I did create in Gaia; and see how it goes. Thanks
     
    raoul likes this.
  31. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    The v3.1 beta will be available this week, depending on feedback the final release will hopefully follow soon afterwards together with the new video tutorial.

    Meanwhile please let me know if you have questions.

    Thanks,
    Raoul
     
  32. StaggartCreations

    StaggartCreations

    Joined:
    Feb 18, 2015
    Posts:
    2,266
    I'm only getting my feet wet with this asset. So far I've only set up a main (closed) road, but I'm at the point where I'm required to start adding intersections. I need several Y-shaped crossing, so I'm trying to make a custom crossing prefab for it.

    So far so good. But I can't connect any of my roads to the prefab. After reading the documentation, it seems like the Road Types do not match, which makes sense.

    However, in the editor, I cannot set a Road Type on my connection points. The dropdown menu doesn't list any of my Road Types, it just says "None". I tried the "New Road Type" option, and made one called "TEST". Which then becomes available in my "Default Road Types", but not on my other connections.



    The documentation on this reads "After selecting the connection vertices the system will check the list of available road types for matches and will auto select a matching road type. You can change this when there are more matches.".

    But it's unclear to me what it's trying to match with. Does the vertex count have to match?
     
  33. raoul

    raoul

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

    Yes, the road type dropdown should be populated with road types that match the vertex count, vertex count matches are required when connecting roads to crossings. When the road shape (vertex positions) also match, taking into consideration a small margin, that road type will be auto selected when there are more matches on vertex count.

    Since all 3 connections in the screenshot do not match built-in road types (2 vertices at the moment) indeed the dropdown will be empty initially and new road types can be created inside the editor window by pressing the "New Road Type" button. Looking at the screenshot, at least one road type is available "Test", the road type you mentioned.

    It seems the top connection is selected so the "Test" road type refers to that connection which seems to have 5 vertices. The new road type will not be available for the other two connections which have 3 vertices.

    Also, the bottom two are not symmetrical. Connecting the start of a road to the bottom left connection and the end of the road to the bottom right connection will work well. Connecting the end of the road to the same bottom left connection of another instance will work as well as vertices will snap but it will probably not look the way you want.

    Does this help, otherwise please let me know what exactly doesn't work. You can always send the prefab so I can look at it.

    Thanks,
    Raoul
     
    Last edited: Mar 7, 2018
  34. br0kenp0ly

    br0kenp0ly

    Joined:
    Jun 3, 2008
    Posts:
    481
    upload_2018-3-8_9-44-41.png

    Sorry if this has been asked earlier, but scrolling through 90+ pages to find the answer is not on my todo-list today :) I got this strange behavior in my side objects when they enter custom crossing prefabs. On one side, they are shot upwards and on the other side they are heading downwards. End offset seems to do the trick, but it keeps resetting itself all the time and/or doesn`t work the way it should. Anyone experienced the same? Any solutions out there?

    Cheers!
     
  35. br0kenp0ly

    br0kenp0ly

    Joined:
    Jun 3, 2008
    Posts:
    481
    upload_2018-3-8_9-50-16.png

    Left stripe goes down, right stripe goes up.
     
  36. raoul

    raoul

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

    This is unknown so hopefully you can provide additional info.

    It appears as if the last spline point is inaccurate. Do you have more custom crossing prefabs and is this indeed related to this specific prefab? The other side of the prefab looks like a similar connection. Does the same happen on that side?

    Since you mentioned end offset, this must be the end of the road. Does this happen regardless whether it is the end or the start of the road?

    Indeed adjusting the start /end offsets of these side objects a little bit for the involved road marker should fix that. After which action does it reset?

    Thanks,
    Raoul
     
  37. bac9-flcl

    bac9-flcl

    Joined:
    Dec 5, 2012
    Posts:
    829
    Hi! I've just started using the asset, noticed a few issues and had a few questions.

    1. Your Standard shader fork called "EasyRoads3D/Unity 5 Standard" is based off outdated shader source and handles ambient occlusion incorrectly, resulting in complete absence of ambient lighting on any roads using them:



    I fixed the shader for you, here is a version based on 2017.3 built-in shader source files:
    https://hastebin.com/kohikowufu.cs



    2. The demo project throws PPtr errors when importing crossing prefabs, and while you mention in one of the Asset Store review replies that it's a Unity bug, there is no mention of it in the Troubleshooting section of your manual or anywhere else on the net. What's the correct way to handle it?

    3. Minor nitpick - it's probably worth using the warning layer (yellow), not the error layer (red) of Debug.Log for the crossing angle warning; it's not exactly the right place for user warnings. Usually, you'd expect to only see stuff like null reference exceptions and other actual errors in there. I'm referring to this error:

    Code (csharp):
    1. new road 35: The angle with the crossing is too sharp Default T Crossing (EasyRoads3Dv3.ERCrossingPrefabs)
    2. UnityEngine.Debug:LogError(Object)
    3. EasyRoads3Dv3.ERModularRoad:OOQCQCDOOQ(Boolean, Boolean)
    4. EasyRoads3Dv3Editor.ODCDOODOQO:ODQCCCDQOD(Vector3&, Boolean, Event, ERModularBase)
    5. EasyRoads3Dv3Editor.ODCDOODOQO:OQOCQCOODO(Vector3, Boolean, Event, ERModularBase, Boolean)
    6. EasyRoads3Dv3Editor.ODCDOODOQO:OnSceneGUI()
    7. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    4. What is the purpose of tiny red handles scattered around some road segments in Scene view?



    5. Where can I configure the slope angle or offset used for terrain adjustment? Terrain adjustment seems to be locked to a small fixed distance, which results in extreme slopes around roads whenever it significantly deviates from terrain height. This makes it a bit of a pain to create good-looking raised roads, bridge approaches, railroads in hilly terrains etc.

    6. How can I reset X/Z rotation of road markers, turning them perfectly vertical again? After creating a winding road with significant height gradient between nodes and adjusting terrain to it, I noticed that my markers were rotated away from vertical orientation, which made it inconvenient to move them around on X/Z plane and rotate them on Y axis.

    7. Let's say I'm making a scene where a winding road climbs up a hill, with some flattened lots neighboring it.



    The lots are flattened to accommodate fences, house decks, various set dressing like garden props and so on. What is the correct non-destructive workflow for building a scene like this? Initially, my understanding was that I could do this:

    - Build a road network with markers at different heights
    - Conform the terrain to it
    - Sculpt the terrain around autogenerated harsh slopes, creating smooth hills and mountains (that the road was "purpose built" to wind around)
    - Sculpt some flat plots at spots next to the road in preferred locations, close to height of the road in a given spot
    - Dress the plots with buildings, props etc.

    So far, so good, but trouble starts when you try to make adjustments to the road network. Returning to edit moves the terrain into a strange state where areas underneath the road are reverted to an old flat state while some post-conformation sculpting survives a distance away from the roads. Edges of most lots are broken, now cut by harsh slopes into flat area far below, where road used to conform the terrain. Re-conforming the terrain sometimes results in artifacts and (obviously) distorts all surface area of lots within a certain distance to the road.

    So, I don't see a way to non-destructively adjust the road network - any adjustment would first revert the terrain, then re-conform it once I'm done, wrecking any terrain adjustments I made around roads. Maybe I'm misunderstanding something and I missed some functionality, so I'd like to know this:

    - Is it possible to commit to terrain changes once you conform the terrain to your road network, disabling the undesired reversal of terrain state whenever you enter edit mode again? In other words, when a road creates a hill, I'd like to save that hill and rely on it staying untouched when I continue to edit the network.
    - Is it possible to conform terrain only around selected segments of the road network, not around whole network at once? That would allow me to add new streets with conformed terrain around them without nuking all the manual sculpting work I did around other streets in the same network.

    Both of these possibilities would make it a lot easier to do environments with dressed slopes, neighboring lots and other features which rely on stable underlying terrain state. There is no value in reverting terrain under the road into a pit after you finished sculpting a mountain around it, and there is no point in reconforming the terrain on another side of the map (nuking terrain tweaks in the process) when you are working on a new street half a mile away. :)



    8. What is the correct way to fading ends of roads into transparency? I remember seeing that in the demo scene, but I don't see a setting enabling it, and shaders don't seem to feature anything like vertex color driven fading, so I'm not sure how it works.

    9. Could you point me to correct places in the documentation or video tutorials showing how to create a set of custom roads and connections (I-transitions and crossings) utilizing these custom roads, from start to finish? I found the section of the documentation on custom crossings, but I feel like I'm missing a lot of context.

    10. Found a bug in the settings tab of ER Modular Base component - clicking "Manage Project Road Types" results in a null reference exception with the following trace (nothing opens up, I can't access road type management at all):

    Code (csharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. ERSideObjectImporter.SetRoadTypes (EasyRoads3Dv3.ERModularBase bscr, System.String path)
    3. EasyRoads3Dv3Editor.OQQDDDQCDC.OOOQDQDOOQ (EasyRoads3Dv3.ERModularBase scr, EasyRoads3Dv3Editor.ODCDOODOQO eScr)
    4. EasyRoads3Dv3Editor.ODCDOODOQO.OnInspectorGUI ()
    5. UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor[] editors, Int32 editorIndex, Boolean rebuildOptimizedGUIBlock, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect) (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1253)
    6. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    Sorry for the large number of questions, I'm just excited to put this tool to work in the most productive way possible. :)
     
  38. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi bac9-flcl,

    Indeed the standard shader is still the Unity 5 version. It needs an update, specially for Unity 2018. In any case, the only difference is the "Offset -1,-1" lines. Thank you for the link!

    This is covered at the top of the Known Issues page and in various recent posts:

    ----------------------------------
    Errors/warnings after package import

    In Unity 2017 you may get GetBool and Broken text PPtr in file... errors/warnings after the package import. This has been discussed with the Unity devs. It is a known Unity issue related to prefab file ID's that have become invalid. The tool includes a fix for this that will be triggered as soon as the main road network object is selected in the hierarchy.

    ----------------------------------

    We are looking into ways for a complete workaround that eliminates the warnings completely.

    That can be made yellow :) The only reason for it being displayed in red is too put extra focus on it.

    These red handles appear in areas where the road is very close to the terrains Y position or perhaps even below it due to the nature of spline curves. The unity terrain object doesn't support negative height values. When the road is below this y value the terrain cannot be deformed accurately. So the red handles point to areas you may want to double check in built mode. The display can be switched of in General Settings > Scene Settings > Display Critical Areas

    You want to use the Left / Right Surrounding sliders in the marker settings for this.

    I am not sure, are these indeed the rotation values? You can manually set these values in the marker settings. But this should only be necessary if you changed the rotation which doesn't seem to be the case?

    Changes to the terrain heightmap in Build Mode will only be preserved when switching back to Edit Mode in those areas that are not affected by the road network. So yes, if the terrain was changed in this area it may result in irregularities. Also with regard to your earlier question related to the surrounding values, potentially there will be major terrain adjustments. If the terrain would not be reset when switching back to Edit Mode, the old road shape would still be visible, so I cannot see how this can be avoided. Let me know if you have a suggestion :). Of course there is always a chance you may want to change the road shape in a later stage, but it is recommended to wait for the final manual terrain adjustments near roads as long as possible.

    You can switch of resetting the terrain in General Settings > Scene Settings > Enable Back to Edit Mode without Terrain Restore. But it is not recommended.

    The demo package includes various examples. When selecting the first or last marker of a road you will see Fade In Distance / Fade Out Distance options in the marker section. The fade itself requires a shader that can handle this based on the alpha channel of the vertex colors. The "ER Road Transparency" shader can be used as a reference.

    The Customized Road Network videos in the Quick Start section of the manual cover this process. New videos will follow. It is recommended to start with simple model to get the feel, once you have done this once or twice, it should be straight forward process. Is there anything specific here that is not clear at this stage?

    That should work just fine. What is the status of your project? Do you have road types available? I will look at this anyway and make sure a proper error is thrown when something is wrong when opening the road types window.

    No problem :) thank you for the feedback!

    Raoul
     
  39. bac9-flcl

    bac9-flcl

    Joined:
    Dec 5, 2012
    Posts:
    829
    Thanks for the quick reply!

    To point it out just in case, I'm using 2017.3 - ambient handling in the standard shader changed before 2018.x.

    Left/right surrounding marker properties and edit mode entry without terrain restore work perfectly for my workflow, thanks a lot for putting this much thought into the toolset! I'll be able to minimize the impact of the road on the manual terrain edits by disabling terrain reverting, initially conforming the terrain to the network with high surrounding slope radius, then tweaking problematic markers to have almost no influence on terrain conformation to avoid damage to manually sculpted areas next to roads. This can work really well for an iterative workflow where I continuously shape the environment with roads, leave roads to sculpt the terrain some more, continue working on roads after that, and so on.

    Ah, got it - I think I see how end fading works now. Glad I'm right about it being vertex driven in nature.

    I'll go over that video again, thanks! It's a bit hard to follow without text or narration, but it indeed seems to cover the subject.

    That null reference exception doesn't seem to appear in a project where both Pro core and Demo package are imported, but it appears in a project where only Pro core package is used.

    By the way, is there a way to remap the hotkeys road manager is using? Shift+S to select every single marker in the network is a very inconvenient combo, because S is a key in WASD navigation set you are constantly using to fly around the scene, and Shift is also constantly used to toggle fast camera speed. That binding makes every single marker selected pretty much every single time I readjust the position of my camera in the Scene view, which is not ideal. :)
     
  40. kittytrillah

    kittytrillah

    Joined:
    Jan 1, 2013
    Posts:
    16
    Hello, I am using the EasyRoads3D v3 and have encountered some issues trying to create custom crossings.
    Firstly this issue was appearing when I was trying to use anything custom (in crossings), so I just used dynamic prefabs for some time. But now the problem is even when I am trying to use dynamic prefabs I am getting these errors:
    • EasyRoads3Dv3 error: The connection prefab was not properly initialized through Shift + Click in the scene after creating it.
    • NullReferenceException: Object reference not set to an instance of an object
      EasyRoads3Dv3.ERCrossings.ODODOODOQD (Boolean rebuildRoads)
      EasyRoads3Dv3.ERCrossings.ODOQQDOCOC (Boolean sidewalkSceneHandleFlag, Boolean rebuildRoads)
      EasyRoads3Dv3.ERCrossings.ODOOCDQDOQ (EasyRoads3Dv3.ERCrossings source)
      EasyRoads3Dv3.ERModularBase.ODOCCCDDDQ (UnityEngine.GameObject prefab, Vector3 hitPos, UnityEngine.GameObject& newPrefab, EasyRoads3Dv3.ERCrossingPrefabs& prefabScript, EasyRoads3Dv3.ERCrossings& crossingsScript)
    I was trying to refresh road network and do some stuff, but it just doesn't help. Help me, please, to solve this issue
    P.S. Thanks for EasyRoads though, this stuff is amazing
     
  41. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Yes, I only mentioned Unity 2018 because there are more issues then ambient handling with the current Standard shader replacement.

    Let me know if you have further questions about importing models in the custom prefab system.

    The null reference exception doesn't happen over here with only Pro imported, but I will go through that code anyway. The same script is used for importing / exporting road types and similar options in the side object manager. Does that work well on your end?

    Shift + S is on the list to improve, but this has only been brought up once or twice over time, that is why it still is as it.

    Thanks,
    Raoul
     
  42. raoul

    raoul

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

    Is this about instantiating dynamic prefabs in the scene or about new dynamic source prefabs? When exactly does this happen? What are the steps that result in this warning / error?

    In any case, did you use Shift + click to instantiate it in the scene?

    Because the above warning will for example appear when newly created dynamic source prefabs (through General Settings > Crossing / Connection Prefabs) are dropped manually in the scene from the project folder instead through a simple Shift + click in the scene. Is that what happened?

    Thank you, glad you like it!

    Raoul
     
  43. kittytrillah

    kittytrillah

    Joined:
    Jan 1, 2013
    Posts:
    16
    This happened right after I choose crossing and use Shift+click.
    Like this: 2018-03-09_11-19-01.png
    I just as usually choose crossing then use shift+click but get these errors and can't work with instantiated crossings after this.
    The only thing helped me to solve this issuse was just deleting Road Network (now I don't have any errors) and create the new one. Probably my mistake was about dropping manually newly created prefabs and saving the scene after this.
    Thank you!
     
  44. bac9-flcl

    bac9-flcl

    Joined:
    Dec 5, 2012
    Posts:
    829
    Another thing I forgot to ask: What paths is EasyRoads3D dependent on to save and load it's data? I prefer not to pollute the root project folder with dozens of asset folders - are there any non-relative paths ER depends on which would break if, for instance, I drop ER into a root folder called "Packages", like I do with every third-party asset?

     
  45. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Unless it is indeed related to what I mentioned in my previous post, please let me know if this happens again or if you find a way to reproduce this.

    Thanks,
    Raoul
     
  46. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735

    That should work fine or are you having issues with that?

    Thanks,
    Raoul
     
  47. bac9-flcl

    bac9-flcl

    Joined:
    Dec 5, 2012
    Posts:
    829
    Just wondered if this might be a potential cause for road management failing to load with that NRE (assumption of some path staying in root, assumption of some asset always being loaded from it, and voila, NRE).
     
  48. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    This was requested a long time ago, I belief v2 supported it as well. There are no known issues, that is why I was asking.

    Thanks
    Raoul
     
  49. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    v3.1 beta note

    I was hoping to have this update with scene view workflow improvements ready before today. It is fairly stable and I had a package and short video prepared but some final tests in other scenes proved it is too unstable when roads with no road type assigned are involved. Involved road markers will snap to (0,0,0) and more, this needs a fix first.

    In an hour I will be leaving for a long weekend, so this will be done next week. Email and forum replies may take a little bit longer then usual.

    Thanks,
    Raoul
     
    hopeful likes this.
  50. rafvasq

    rafvasq

    Joined:
    Feb 6, 2018
    Posts:
    16
    Hi there,

    Using EasyRoads for the first time. I believe my terrain and road is flat but the road seems to render inconsistently for some reason; sometimes the road will look like the attached image. I doubt it's an issue with ER but is there an obvious reason why this happens?
     

    Attached Files: