Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

World Building EasyRoads3D v3 - the upcoming new road system

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

  1. Nunggi

    Nunggi

    Joined:
    Apr 7, 2018
    Posts:
    7
    Hi Raoul
    We have a problem.
    An error occurred while trying to build.
    I am currently using Unity 17.3.1
    It only occurs when the color space is linear, not when it is gamma.
    How should I handle it?


    Shader error in 'EasyRoads3D/Terrain/ER Terrain Mesh Tesselation': maximum ps_5_0 sampler register index (16) exceeded at line 147 (on d3d11)
    Compiling Fragment program with SPOT SHADOWS_DEPTH
    Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR
     
    Last edited: Jul 4, 2018
  2. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,613
    Hello serberusno1,

    It really is as simple as described in my previous posts:

    1) Activate the side object in the main side object settings. The side object will be build instantly unless "Default active state for each marker" in the side object manager is switched off for that specific side object.

    2) Optionally activate / deactivate the side object per marker below the general marker settings. In this section a dropdown is displayed with all active side objects. Select the side object you want to edit.

    Is something else involved here? In my first reply I asked about your side object. Can you give more details about this side object, what is the setup?

    Have you tried all this with the example side objects in the demo package? Does that work? if not, for which side object does this not work?

    What button are you pressing? In the process of activating a side object there are no buttons involved. Only side object category tabs and checkboxes for each side object.

    New videos in general are being worked on, but the initial side objects video shows what I mentioned above. The only difference is that meanwhile category tabs are added and there are more options. But so far you asked how to get strated with this, this is visible in the below video



    The HD Roads video also shows side object related processes in v3.1, starting at 1.40



    Thanks,
    Raoul
     
    Last edited: Jul 4, 2018
  3. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,613
    Hi PunkPuffin,

    There are no known issues with any vehicle system, at the end the roads are standard unity game objects with a meshcollider attached.

    The scripting API can be used for AI purposes / traffic system. Below is a post that might be useful.

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

    V3.2 will include an upgrade to road types. It will be possible to define lane info including traffic direction. This will make AI easier.

    Thanks,
    Raoul
     
    JamesWjRose likes this.
  4. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,613
    Hello Nunggi,

    This is related to two more advanced example shaders in the demo package for terrain mesh overlays also using terrain textures. These errors can indeed be raised depending on the build settings, too many textures involved.

    Are you using these shaders? If not then you could remove them:

    /Assets/EasyRoads3D/shaders/Misc/ER Road Splat 4 UV4
    /Assets/EasyRoads3D/shaders/Misc/ER Terrain Mesh Tesselation

    Thanks,
    Raoul
     
  5. jeromeWork

    jeromeWork

    Joined:
    Sep 1, 2015
    Posts:
    422
    Hi @raoul

    I'm getting errors that break the Build process. This is happening even without using EasyRoads3D in a build scene (just having the asset in my projects causes this). Deleting it allows me to build ok.


    Code (CSharp):
    1. Broken text PPtr in file(Assets/EasyRoads3D/Resources/dynamic prefabs/Default T Crossing.prefab). Local file identifier (100002) doesn't exist!
    2. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    3.  
    4. Broken text PPtr in file(Assets/EasyRoads3D/Resources/dynamic prefabs/Default X Crossing.prefab). Local file identifier (1004286425583388) doesn't exist!
    5. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    6.  
    7. Broken text PPtr in file(Assets/EasyRoads3D/Resources/dynamic prefabs/Roundabout 4 connections.prefab). Local file identifier (1662397013494394) doesn't exist!
    8. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    9.  
    10. Broken text PPtr in file(Assets/EasyRoads3D/Resources/dynamic prefabs/Roundabout 4 connections.prefab). Local file identifier (1662397013494394) doesn't exist!
    11. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    12.  
    13. Broken text PPtr in file(Assets/EasyRoads3D/Resources/dynamic prefabs/Default T Crossing.prefab). Local file identifier (100002) doesn't exist!
    14. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    15.  
    16. Broken text PPtr in file(Assets/EasyRoads3D/Resources/dynamic prefabs/Default X Crossing.prefab). Local file identifier (1004286425583388) doesn't exist!
    17. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    18.  
    19. Error building Player: 6 errors
    20.  
    21. Build completed with a result of 'Failed'
    22. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    Using Unity 2017.4.2f2 Windows 10

    This happens in any project, even completely empty ones with nothing except EasyRoads3D. I've tried it a number of times. It also happens on different machines (each on different networks) so unlikely to be because of a corrupted asset package download. Let me know if you want me to send you a test project.

    Any fix for this? Thanks.
     
  6. jeromeWork

    jeromeWork

    Joined:
    Sep 1, 2015
    Posts:
    422
    Ah, sorry... Stupid me.... read the ReadMe file ! I'll leave this blatant example of my stupidity in case anyone else comes through the forum asking the same stupid question. :rolleyes:
     
    hopeful likes this.
  7. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,613
    Hi jeromeWork,

    It is also mentioned at the top of the Known Issues section in the manual. It is a known Unity issue related to prefab file IDs that have become invalid. It is usually already visible after importing the package. For anyone else who runs in this issue, selecting the road network object in the hierarchy will fix it.

    Thanks,
    Raoul
     
    hopeful likes this.
  8. jeromeWork

    jeromeWork

    Joined:
    Sep 1, 2015
    Posts:
    422
    @raoul . Just downloaded Pro v3.02 from the asset store (as well as the HD update), and getting the same error as was mentioned back in MAy
    Code (CSharp):
    1. Assets/EasyRoads3D/Scripts/ERVegetationStudio.cs(33,61): error CS0246: The type or namespace name `ERVSData' could not be found. Are you missing an assembly reference?
    Can you clarify what's going on and what impact deleting ERVegetationStudio.cs will have? (if it isn't needed why is it still in the package?)

    EDIT: Just to clarify. I downloaded the asset yesterday, and looking at the asset store I see that in fact this is version 3.1 - the 3.02 mentioned above is just the number showing in Release notes.txt


    Thanks
     
    Last edited: Jul 5, 2018
  9. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,613
    Looking at the error you posted, there are no known issues related to that in v3.1. Can you double check the version in the most right tab in the Inspector?

    Just to make sure your current setup is compiled correctly, indeed ERVegetationStudio.cs may have to be deleted first. This by itself will not cause issues.

    You specifically mentioned that you downloaded v3.02. Did you perhaps download the demo package, overwriting v3.1 files? The release notes of v3.1 in the EasyRoads3D directory should say: "v3.1 : 15-06-2018"

    Thanks,
    Raoul
     
  10. jeromeWork

    jeromeWork

    Joined:
    Sep 1, 2015
    Posts:
    422
    Yes I did also install the demo. That makes sense, if that includes older versions I just wouldn't have known what not to import. Might be worth keeping all these asset packages in sync? ;)

    Out of interest, what does ERVegetationStudio.cs actually do? Why can it be deleted without causing any issues? Is it a legacy file from previous versions that was never removed?

    Also, for info...
    I just reopened the project and got this pop-up window:

    Not sure if that blank image is what's meant to display?
    Clicking on 'Download Now' just opens my Project folder in explorer. What's this meant to actually do?

    And... the broken asset ID errors are all back on reload. A bit odd.
    - the docs mention clicking on 'ER Road Network' to fix, but for a new user, it's not immediately obvious where that file exists in the hierarchy. You might want to be more specific e.g. Assets/EasyRoads3D/Resources/ER Road Network
     
    Last edited: Jul 5, 2018
  11. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,613
    Installing the demo package will indeed downgrade at the mode. Just make sure to import the EasyRoads3D Pro package. You are right about keeping the packages in synch. In this case however, the idea was to upgrade the package further with v. features which is partially done but there are some more things to add. We will upload it as is to avoid this specific situation.

    ERVegetationStudio.cs comes with v3.1 and is required for Vegetation Studio integration. It will automatically remove Vegetation Studio objects within a specific definable perimeter. It can be removed safely if Vegetation Studio is not used. But there is no need for that if v3.1 is installed.

    That pop-up (something for later) is strange, especially when EasyRoads3D was already used before, I will check that. Thank you for reporting this!

    The broken PPtr file errors are known to be thrown after package imports / updates. The fix mentioned in the manual says "The tool includes a fix for this that will be triggered as soon as the main road network object is selected in the hierarchy". This will happen anyway once you start building your road network so no additional steps are actually required apart from perhaps clearing the console. We are looking into ways to completely eliminating these errors from appearing.

    Thanks,
    Raoul
     
    Last edited: Jul 5, 2018
  12. 40detectives

    40detectives

    Joined:
    Apr 9, 2016
    Posts:
    74
    Hi raoul:

    Sorry to bother, but I can't get the download link in your web page, maybe is the page down right now (http://unityterraintools.com/download.php)?

    - The version of EasyRoads3D in the Unity Asset Store is the latest, right?
    - Does it include the last beta update (if any at the moment)?
     
  13. rapidrunner

    rapidrunner

    Joined:
    Jun 11, 2008
    Posts:
    944
    Hi, I did delete the 2 shaders and I still get a ton of errors coming from your package, when building for Win 64. Using the latest Unity shipped (2018) on Windows (W10 i7 7700 7th gen 32 GB RAM GTX 1070 8 GB VRAM)
    These are the ones that are printed the most:

    Code (CSharp):
    1. GetBool is not allowed to be called during serialization, call it from Awake or Start instead. Called from MonoBehaviour 'ERCrossingPrefabs' on game object 'Default T Crossing'.
    2. See "Script Serialization" page in the Unity Manual for further details.
    3. UnityEditor.EditorPrefs:GetBool(String, Boolean)
    4. SyntaxTree.VisualStudio.Unity.Bridge.Configuration.GlobalConfiguration:get_SendConsoleToVisualStudio()
    5. SyntaxTree.VisualStudio.Unity.Bridge.Configuration.ActiveConfiguration:get_SendConsoleToVisualStudio()
    6. SyntaxTree.VisualStudio.Unity.Bridge.VisualStudioIntegration:OnLog(String, String, LogType)
    7. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    8.  
    9. 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 T Crossing'.
    10. See "Script Serialization" page in the Unity Manual for further details.
    11. SyntaxTree.VisualStudio.Unity.Bridge.Configuration.GlobalConfiguration.get_SendConsoleToVisualStudio ()
    12. SyntaxTree.VisualStudio.Unity.Bridge.Configuration.ActiveConfiguration.get_SendConsoleToVisualStudio ()
    13. SyntaxTree.VisualStudio.Unity.Bridge.VisualStudioIntegration.OnLog (System.String message, System.String stacktrace, LogType type)
    14. UnityEngine.Application.CallLogCallback (System.String logString, System.String stackTrace, LogType type, Boolean invokedOnMainThread) (at C:/buildslave/unity/build/artifacts/generated/bindings_old/common/Core/ApplicationBindings.gen.cs:577)
    15. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    16.  
    17. Broken text PPtr in file(Assets/EasyRoads3D/Resources/dynamic prefabs/Default T Crossing.prefab). Local file identifier (100002) doesn't exist!
    18. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    These are printed for all the crossings, followed by a lot of these:

    Code (CSharp):
    1. Assertion failed: Assertion failed on expression: 'ptr == NULL || !HAS_ROOT_REFERENCE(GET_CURRENT_ALLOC_ROOT_REFERENCE()) || GET_CURRENT_ALLOC_ROOT_REFERENCE() == GET_ROOT_REFERENCE(s_MonoDomainContainer, kMemMono)'
    2. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    Last but not least, errors from the editor folder script; probably these are related to the shader I did delete from the shader folder?

    Code (CSharp):
    1. Shader error in 'EasyRoads3D/Terrain/ER Terrain Mesh Tesselation': maximum ps_5_0 sampler register index (16) exceeded at line 147 (on d3d11)
    2.  
    3. Compiling Fragment program with UNITY_PASS_FORWARDADD SPOT SHADOWS_DEPTH
    4. Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR
    5.  
    6. Shader error in 'EasyRoads3D/Terrain/ER Terrain Mesh Tesselation': invalid subscript 'texcoord1' at line 303 (on d3d11)
    7.  
    8. Compiling Vertex program with UNITY_PASS_FORWARDADD DIRECTIONAL SHADOWS_SHADOWMASK
    9. Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR
    10.  
    11. Shader error in 'EasyRoads3D/Terrain/ER Terrain Mesh Tesselation': invalid subscript 'texcoord1' at line 381 (on d3d11)
    12.  
    13. Compiling Vertex program with UNITY_PASS_FORWARDBASE DIRECTIONAL SHADOWS_SHADOWMASK LIGHTPROBE_SH
    14. Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR
    15.  
     
  14. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,613
    Hello 40detectives,

    The download page appears to be working fine. The latest version is v3.1, the EasyRoads Pro package on the asset sstore is up to date.

    There is no v3.2 beta available yet.

    Thanks,
    Raoul
     
  15. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,613

    Hello darshie1976,

    Both issues are covered in recent posts abaove.

    For the shader issue please see this post:

    https://forum.unity.com/threads/eas...-new-road-system.229327/page-106#post-3552903

    If these errors are still raised, that can only be because these shaders are still present in the project. The demo package is mainly intended to show different uses of the tool. These two shaders are more complex terrain mesh related shaders and will not work for all builds. They use many textures, road textures, terrain textures, tesselation related textures.

    It also looks as if an older version of the demo package is imported? The texcoord1 errors/warnings should be fixed in the current version.

    The other errors are all related to the same known Unity issue where prefab file IDs get invalid, it is discussed above in the posts by jeromeWork. These posts were more related to package imports / upgrades. The same error(s) can be thrown when doing a final build when this issue wasn't repaired yet.

    The fix is the same, please open a scene with a road network and select this object in the hierarchy, please try to build again afterwards.

    Thanks,
    Raoul
     
  16. 40detectives

    40detectives

    Joined:
    Apr 9, 2016
    Posts:
    74
    I'm having a similar problem with a different shader:

    Code (CSharp):
    1.  
    2. Shader error in 'EasyRoads3D/Unity 5 Standard': invalid subscript 'uv2' at /Program Files/Unity/Hub/Editor/2018.1.6f1/Editor/Data/CGIncludes/UnityStandardMeta.cginc(21) (on d3d11)
    3.  
    4. Compiling Vertex program
    5. Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR
    6.  
    Unity 2018.1.6f1 - Build Target Windows <DX11>

    Should I delete EasyRoads3D/Unity 5 Standard too?
     
  17. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,613
    You can delete the adapted version of the Unity 5 Standard shader.

    But there is an issue in Unity 2018 in general with adapted versions of the standard shader. So this error may appear for the Unity 2018 version aswell.

    Selecting the shader in the project folder (/EasyRoads3D/shaders/) > right click > Reimport should fix that.

    Thanks,
    Raoul
     
    40detectives likes this.
  18. rapidrunner

    rapidrunner

    Joined:
    Jun 11, 2008
    Posts:
    944
    Hi Raoul,

    I did indeed read the post before making my post; as you can see; I did mention that I did remove the 2 shaders, as suggested in the post that you mention, but it did not fix the build issue.
    I did download the latest update and did import it; not sure if that is enough to overwrite the old package content, of if Unity just import what is not present already. Just in case, I did delete both the easyroads asset folder and the demo scene folder, and imported them again; will check if that is fixing the build failures.

    Just FYI, I had no road network in the scene when building, so I am not sure how can I select it in the hierarchy if it is not even in the scene. BTW do I need to remove the demo project when I build the final product? I assumed that Unity won't be adding anything to a final build, unless it is used, and I did load the demo project only to get the assets and the road types. As side note, would be nice to add in the main package the road types templates; I am still struggling to find out how to easily create highways and other road types.

    Thanks!
     
  19. 40detectives

    40detectives

    Joined:
    Apr 9, 2016
    Posts:
    74
    Thank you very much for your quick replies =)
     
    raoul likes this.
  20. raoul

    raoul

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

    Do you mean you still get the shader errors pointing to that specific shader "EasyRoads3D/Terrain/ER Terrain Mesh Tesselation" even after removing this shader from the project? That would be strange. Have you tried a search for "ER Terrain Mesh Tesselation" in the project folder?

    The "Broken text PPtr" and related errors point to prefabs in the project folder. This is fixed after selecting the road network object. If you do not have any scene with a road network (which explains the build error because it was never fixed) you could open "/EasyRoads3D Scenes/scene main/" and select the road network in that scene. Or you can do what jeromeWork mentioned, select the ER Road Network prefab in the project folder: /Assets/EasyRoads3D/Resources/ER Road Network/.

    First 3.1 includes quick crossing prefab build options in General Settings > Road Types. Crossing prefabs for that road type will be generated automatically. Highway exit/enter options will be introduced in v3.2.

    Thanks,
    Raoul
     
  21. rapidrunner

    rapidrunner

    Joined:
    Jun 11, 2008
    Posts:
    944
    Yes, I was still getting errors regarding the shaders; and I did not move them anywhere else, beside where the import process path is set.

    I did remove completely all the folders related to easyroad and import it again, and the shader error is gone. I guess Unity keep a cache of builds, which is weird, since from VS I can clean a build folder and start from scratch.

    Now I am getting an interesting bug: when I modify a road, connecting and creating crossings; I get parts of the road that "disconnect" on their own. Fundamentally what happen is that the connection is broken.
    I did redo the same area like 6 times; every time I add a new connection and try to build a network; one piece somewhere on the same area I touch, get broken and disconnect. You can tell which area break, because the sidewalks disappear, and you see in console print warnings.

    Are you aware of this issue?
    broken roads.JPG
     
  22. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,613
    Hello darshie1976,

    I quess a shader error still being thrown even after removing the shader is something for the Unity devs, certainly if it is critical for final builds. But glad to hear you managed to get that working.

    Is the disconnecting crossings related to the warning in the screenshot? The warning in the screenshot is raised when the road is connected to a crossing on both ends and the crossing connections have different shapes. Usually that is the case when sidewalks are toggled on / off and these settings do not match the connection on the other end. But this should be in synch once a road is connected to both crossings. Disabling sidewalks on one end, will automatically disable the sidewalks on the crossing on the other end.

    Does this consistently happen in your scene for different roads, or always the same roads? Would it be possible to look at this? In that case please email me a link or send a link through a PM.

    Are all other issues you posted yesterday resolved?

    Thanks,
    Raoul
     
  23. 40detectives

    40detectives

    Joined:
    Apr 9, 2016
    Posts:
    74
    Hi Raoul!

    All dynamic prefabs are giving me the error:

    Broken text PPtr in file (<path to the dynamic prefab>) Local file identifier (100002) doesn't exist!


    This is in a fresh import on a project.



    It's a little bit disturbing, because it pops again the message from time to time.

    I've been playing around a bit with the prefab file (serialized to text) and found that it's the "sourcePrefab" YAML field that seems to be pointing at a fileID that isn't found. Just in case in helps it debug it faster.

    I've also seen this is an old issue, that is non critical but...
    Could it be that these prefabs in origin are pointing to an object which is not pressent in exported package of EarsyRoads3D?
    Thats kind of what Unity Answers say about this errors.
     
  24. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,613
    Hi 40detectives,

    Thank you for the feedback. I will see if there is anything useful in that post.

    This issue has been discussed with the Unity devs. Apparently it is related to something deeper in the engine. Indeed this prefab ID becomes somehow invalid even without being used / changed. We already tried completely replacing these prefabs manually with new versions.

    The fix, suggested by the Unity devs for now, is very simple, just update a property in the prefab and the file ID will be reset. That is what what is done when selecting the road network object in the hierarchy. We are looking for ways to fix / intercept this issue before the errors are thrown in the console.

    Thanks,
    Raoul
     
    40detectives likes this.
  25. rapidrunner

    rapidrunner

    Joined:
    Jun 11, 2008
    Posts:
    944
    Hi Raoul,

    Basically this is what I did: started with the first leg of my road, went all around the map, using shift-click to create the new road points. Then in some areas, I did click on a road point and added either a T or X crossing; then stretched out a road from it.
    Went back to the road before inserting the T or X crossing, and added a new crossing; so I can create a sort of "urban" network (square lots in between to place buildings, fundamentally), and then tried to attach the road to the existing parts of the road, that extend to the other crossings, as you see in the image posted, and that's when I started to notice the weird warnings in console, and after the warning, one road would fundamentally remove automatically the sidewalks, and refuse to connect to anything. Even the crossing would show disconnected; so if I would use the gizmo, they would move while not being connected to the rest of the road.

    Went back and forth for an hour, fixing each part that would break. The only way to fix it was to remove ALL the points on the road without sidewalk, and start all over dragging a new road.
    Not sure if that is related or not, but while clicking on the road, to select a road point, the selection would go away, and the inspector would show the properties of a crossing, same for the Unity hierarchy, but the points on the road object were not highlighted. It was like I did click on a different element, and that would usually happen when the road would break and the sidewalks would disappear.

    I can't reproduce consistently, but I assume it is due to the fact that I am not creating the roads from a single road, but I create crossing, then extend the road from them, then go back to a different road area. Maybe this is upsetting the road manager and cause the roads to break?

    Also the behavior seems to be different, if I try to connect directly a road that start from a crossing; compared to connecting a road that start from a crossing, on which I add more extra points using shift+click. Thanks
     
  26. MrG

    MrG

    Joined:
    Oct 6, 2012
    Posts:
    357
    This is a wrong assumption. If it's in the project anywhere other than in an Editor folder or a couple specially named folders that Unity recognizes to exclude, or scene files that you didn't select in the build settings, it will end up in your final build. Unity has no idea what you might call forth in code, even if it's never referenced in any inspector or used in any of your selected scenes, so it all goes in. You have to clean out all the cruft yourself. You might find something on the asset store to help find such things, but in the long run I think you'll find it easier to make asset bundles of exactly what you know you've used and take them into a separate project that will be your final game build. In a larger project you'll have a bunch of these kinds of projects that are just chunks of your game that you work on separately and forward to a final game project.
     
  27. MrG

    MrG

    Joined:
    Oct 6, 2012
    Posts:
    357
    Does it work better if you place all your crossings first, then pull roads out from them to connect them?
     
  28. rapidrunner

    rapidrunner

    Joined:
    Jun 11, 2008
    Posts:
    944
    Thanks for the insight; do you have any official documentation mentioning this? From what I heard on the forum and among other Unity users, this was a thing. IF something is not called in any scene, from any game object, is not included in the final product, because at compile time, Unity engine goes through the code.
    Kinda hard to say that "it does not know what you call in code", because this is how the linking process works :) Each script is compiled, each library and call is parsed against the existing libraries and linked in the executable, when the process of converting intermediary code to machine code is performed by the compiler.

    If things are different from how they were before, I would be happy to update myself
     
  29. rapidrunner

    rapidrunner

    Joined:
    Jun 11, 2008
    Posts:
    944
    I can try it out; although I am not sure that it would be a feasible workflow. Usually you lay down a street, then start to expand from it; selecting where do you want to place a crossing. But it is worth the try; it means that I have to plan ahead where to put crossing first, and then stretch out the roads from it and make connections.
     
  30. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,613
    Hello Darshie1976,

    You mention that you tried to attach the road to the existing parts of the road. What do you mean with that?

    There are some changes in v3.1. Before, attaching one of the available dynamic prefabs resulted in a road and crossing with sidewalks because that is the default setup of these prefabs in the EasyRoads3D Pro package. In v3.1 however, the prefab will adjust to the road. I just double checked this in the build project, the one used for uploading to the asset store. This appears to be working just fine. X crossings are added without sidewalks, no errors.

    What is the history of this scene, is this a new fresh scene or a scene initially created with an older version? When selecting a road connected to a crossing (one of the older road, not the new roads), do these roads have a road type selected in the dropdown?

    This does sound as if something is wrong in your scene. Selecting a road should really show the road properties, not crossing properties. I have never seen that happening so I cannot give feedback on this witout seeing this myself as suggested in in my previous post or perhaps in a video?

    This is very standard workflow. Create a road, attach a crossing, pull out new roads from that crossing, attach crossing prefabs to these roads, drag / attach roads instantly between crossing prefabs, etc.

    Or can you see a pattern, does this happen to roads which were added all in a specific way? V3.1 does include new options to auto insert crossings by road snapping, is this involved?

    In what way is the behaviour different in these situations?

    Thanks,
    Raoul
     
    Last edited: Jul 7, 2018
  31. MrG

    MrG

    Joined:
    Oct 6, 2012
    Posts:
    357
    I stand corrected, with the following caveat from the docs (which may have been what I was thinking but said it wrong):

    Unity strips most unused Assets during the build, so you don’t gain anything by manually removing Assets from the Project. The only Assets that are not removed are scripts (which are generally very small anyway) and Assets in the Resources folder (because Unity can’t determine which of these are needed and which are not). With this in mind, you should make sure that the only Assets in the Resources folder are the ones you need for the game.

    Demo assets and such may have Resources folders, perhaps deeply buried, that would be included.
     
    rapidrunner likes this.
  32. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,613
    If you know in advance what the road network will look like, the workflow suggested by MrG is the fastest workflow, especially for rectangular type of city maps and when using grid snapping. After spawning a crossing you can continue spawning the same crossing simply through Shift + Click. Afterwards it is a matter of instantly pulling out roads and snapping them to another crossing prefab in one action.

    Thanks,
    Raoul
     
    Last edited: Jul 7, 2018
  33. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,613

    This is one of the reasons (upon request) why the demo package is a separate package and the main EasyRoads3D Pro package assets are minimal. The Resources folder is used for the runtime functionality.

    It is still not always clear how this works, for example editor scripts can cause final builds to fail yet they should never be included in final builds especially when they are marked as editor only (DLLs).

    Thanks,
    Raoul
     
  34. MrG

    MrG

    Joined:
    Oct 6, 2012
    Posts:
    357
    I do the roads and rivers after I do sculpting and buildings and non-procedural landscaping, leaving room for the road between all that stuff, maybe spraying a simple color ground texture as a temp visual sort of guide to where I think the road will be. Crossings don't have to be perfectly placed initially...they can be moved to adjust fitment. It's the other content that sort of dictates where the road ends up being laid in.
     
  35. serberusno1

    serberusno1

    Joined:
    Jan 28, 2017
    Posts:
    84
    I may have finally figured out the problem. I don't seem to have any of the side object prefabs in my project for some reason. Or at least I couldn't find them in any of the folders. At 0:11 in your first video there appears to be a guard rail prefab plugged into the source object slot. There's nothing in mine by default and as I don't appear to have any prefabs in my EasyRoads3D folder surely this would cause a problem. I plugged in a random prefab and it showed up so this is likely the issue. can you please advise as I've previously re-imported everything and there still don't appear to be any side object prefabs in my project.
     
  36. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,613
    Hi serberusno1,

    The Demo package includes a separate folder /Assets/EasyRoads3D Assets/. This is where all side object source assets and materials are located. Can you check and see if it is is present in your project? Can you try reimporting the package again if this is not the case on your end and check the package contents in the import window?

    This folder is for example visible in the package contents section on the asset store page. There are no known issues with this.

    Thanks,
    Raoul
     
  37. 40detectives

    40detectives

    Joined:
    Apr 9, 2016
    Posts:
    74
    In the meantime I've done this before even setting any road network, and it definitely did the trick. Thanks a lot! :)
     
    raoul likes this.
  38. serberusno1

    serberusno1

    Joined:
    Jan 28, 2017
    Posts:
    84
    Ok I had no idea I would have to download the demo project. I'll get back to you thanks
     
  39. serberusno1

    serberusno1

    Joined:
    Jan 28, 2017
    Posts:
    84
    Quick question, do you have any idea how to deal with this error? Using unity v2017.3.1f1
     

    Attached Files:

  40. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,613
    Hi serberusno1,

    It looks like the EasyRoads3D version is downgraded from v3.1 to v3.02. Please import the current EasyRoads3D Pro version from the asset store.

    Thanks,
    Raoul
     
  41. rapidrunner

    rapidrunner

    Joined:
    Jun 11, 2008
    Posts:
    944
    Hi Raoul, trying to answer your questions.

    Basically I created 1 road object, did click on the add road button in inspector, and that was my initial road. then I did select some areas and created forks, using the T crossing, and went toward a different area of the map.
    Then, I came back with that road, to the initial road, and tried to create a grid pattern with connections; which is what you see in the image I posted

    I am not sure what did I do at this point. When I started laying down the road, I was using the only road setting available in the package; which is a small road with sidewalks. I did not create any dynamic crossing prefabs, nor modified any of the settings. Just added the road object, clicked on the inspector to generate a road, and went all over the map shift-clicking. I am starting a new map in a totally different project; to check out if I can isolate the issue, so it is much easier to show you what am I doing

    This is a scene I created months ago; was made with Gaia, Enviro and Aquas; among other assets.I did buy Easyroads and imported the package; tried it out but I was having issues; so I did not use it anymore until the new version was released. I did delete the package from the project, downloaded the package from the asset store and imported it, so everything should be as in a new import state. I did get some errors on import, like
    "Unity 5 standard invalid subscript 'uv2' at CGIncludes/UnityStandardMetacginc(21) (on d3d11)"
    , but nothing beyond that.
    The roads once selected, show only one single road type, because the package seems to contain only one road (on a side note, a tutorial about how to export road types would really be helpful, so I can import the ones from the test project).

    Can't really say what is the issue; I have a terrain made with Gaia, with all its spawners and scripts; then I have the Aquas plane right below, and on top of it, there is the Easyroads. It does not happen all the time, but sometimes, you are connecting a road, you connect it and when you try to click on a different road marker, it select something else and I can't select the road object unless I click on something else. I did notice that the CPU load spike to 100 when doing so, and then it return back to normal as soon as I select something else and go back to the road object. It is almost like it get stuck trying to do some sort of operation on the road object; although I see nothing on the console. I will try to reproduce and post a video.

    Ok, so I am not doing it as you described; because I create crossing first from road marks; then I pull a road from somewhere else; then I swap between roads and finally I drag the road from the crossing, to the other road, to create junctions automatically. I will try to go only one direction as you mention, and see if that make any difference.

    Yes, this is happening when using road snapping. I did start to use the asset mostly because of this new feature; which was my main problem when using the previous build, since connections would never work as I wanted; while now I can actually make a network by auto-snapping parts together.

    As mentioned above; connecting a road to a crossing or stretching out a road from a crossing, and drag it on another road to generate a crossing automatically; seems to behave differently. I think the best way to show you is to record a video, so you can see it in action.
     
  42. raoul

    raoul

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

    "Unity 5 standard invalid subscript 'uv2' at CGIncludes/UnityStandardMetacginc(21) (on d3d11)"
    .

    This shader error is discussed in recent posts here on the forum. It is a known Unity 2018 issue in general related to modified versions of the Standard shader. Select shader in project folder > Reimport, fixes it. It is mentioned on the up to date online Troubleshooting pages.

    Pressing a road marker resulting in another marker being selected is known to occasionally happen after splitting a road. Whether that happens depends on which road / marker you select. Deselect / reselect should fix that. But I can't see how this is related to crossings being disconnected.

    Ok, so roads get disconnected from crossings in some situations after using the new v3.1 road snapping option? What are these situations?

    In my previous post I mentioned road types and asked to verify if road types are assigned to the roads where this happened. Did you check that? You mentioned that you use the assets in the Pro package itself, do all these roads have the "Default Road" road type selected?

    How are you creating a crossing from road markers? And how is this different from what I described? It sounds like this is also related to v3.1 features, auto insert a crossing on any marker. But this by itself should not disconnect roads from other crossings. A video of what you describe also showing the roads being disconnected from crossings and what is behaving differently would be very helpful.

    Thanks,
    Raoul
     
    Last edited: Jul 8, 2018
  43. serberusno1

    serberusno1

    Joined:
    Jan 28, 2017
    Posts:
    84
    Got another question- I'm using Edy's vehicle physics with EasyRoads3D pro and I'm having trouble with the physics material I apply to the roads. The problem is, no matter what physics material I apply they all feel the same. eg I have an ice physic material with a super low friction and a tarmac physic material with a super high friction. They're applied to different roads but I can't actually tell the difference when I drive on the different roads. Is something over-writing the physic material setting for the road meshes? I'm also using Gaia for the terrain so I dunno if tat's affecting it either
     
  44. rapidrunner

    rapidrunner

    Joined:
    Jun 11, 2008
    Posts:
    944
    Hi Raoul, I guess we have a tad of a problem in understanding each other; I am not a native English speaker, so that may explain why there is a bit of confusion in the troubleshooting of the problem.

    Let me try to phrase it in the most simple and linear way, with short sentences.

    1) Yes, I am aware of the problem, since I went through this whole thread. I was just pointing out that it is still happening when you import the package in a new project.

    2) I was not pointing out that the selection/deselection issue was the cause of the disconnection problem. I was notifying you that it happen at the same time. Since you wrote the source code, you may know if this is a related issue or not. I just pointed it out, because I do not have access to the source code.

    3) Yes, the road get disconnected and so does the crossing. The operation performed is the snapping of a road mark, on another road, or on a crossing. If you select different markers on a road, like alternating between different areas of the road network, the issue happen (more details later).

    4) When I add the road component to the scene, there is only the default road type. So the answer is "yes, I did check" and the only road I see is "default road". If I import the test project package, I get a prompt about importing road types; but the roads does not look like the ones in the test scene, once I try to use them. Not a problem since I am not using the test project; but it would be nice to have the main package include different pre-made road types.

    5) This is my workflow:
    • add road network component to the scene
    • click on the icon to add a new road; start to click-Shift to place markers.
    • go around the map, doing click-shift; the road appear, and it has sidewalks. The type is "default"
    • get to the middle portion of your road network, select a road marker, then click on the crossing icon to add a T crossing.
    • Drag the square from the crossing to create a road
    • click on another road marker, 3-4 markers away from the one you just selected to create the T crossing
    • create a new T crossing and pull the road from the crossing a bit, like you did with the previous T crossing
    • Do this for 5-6 times, so you end up with a stretch of road that has T connections at intervals of few road markers from each other.
    • start from the last T crossing; pull the road from the crossing and start to click-shift , going parallel to the main road, until you reach the first T crossing you created. So far, all the roads you created have sidewalks and are connected
    • Now drag one of the roads that is coming from a T crossing, click-shift to put some markers and try to snap it on the parallel road you created, and snap it on so a T connection is created
    • Select a road marker on the parallel road, and create a T crossing, stretch the road from it and try to connect it to a road that is coming from the main road T connection.
    • (ISSUE) at this point a section of the road does not show the sidewalk anymore, T crossing from which you started to stretch the road, become disconnected.
    • (ISSUE) Console show warnings about the road being incorrect
    • (ISSUE) if you try to select a different road marker to continue your road design, something else is selected; if you try to select the road again, the road markers do not appear, until you click in the scene hierarchy root object. Then you can select again single road points
    • (ISSUE) you try to fix the road, deleting with shift-R each point, and start again. This time the road is created and connected correctly; but as soon as you switch to another junction or road coming from a junction, and try to connect it to the road you just fixed, another T crossing is disconnected and the sidewalks disappear; if you try to snap to the road, the UI show a red dot on it; it was just fine before, but now it is red if you try to snap the roads together.
    I am trying to make a video too; probably before the end of the day; so it will be probably clearer than me trying to describe what is going on. The behavior is not consistent, which is why I am having issues to deal with it. As soon as I can isolate the problem, will give you more details.

    Thanks for your time.
     
  45. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,613
    Hello serberusno1,

    Physics Material is something to add for Road types and individual roads. So, currently at no point this is overwriting already manually added physics materials. You can check this by selecting the individual road objects in the hierarchy and look at the Physics Material assigned to the Mesh Collider component.

    Thanks,
    Raoul
     
    Last edited: Jul 8, 2018
  46. raoul

    raoul

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

    1) I assume this is related to the Unity 5 standard invalid subscript 'uv2' error? This is out of our control, it is general issue with modified versions of the Unity Standard shader in Unity 2018. The mentioned shader reimport fixes it.

    2) Thank you. It is not related, roads being disconnected is actually done in the code for a safety measure, related to what I mentioned in the very first reply, a mismatch of road and connection settin gs due to for example different sidewalk settings. I am not saying this is the case in your situation but it could be?

    3) Ok, I will await more details.

    4) The demo package includes different road types. During beta , different road types were available. Upon request this has been changed to a clean project because many people use their own road types / materials / side objects, 2) package updates will download import fast. Those people who like to use the road types and side objects in the demo package can chose to use the demo package as a starting point for their own scenes.

    5) Yes, this is all standard workflow. We have been testing this over the full v3 beta period and by itself have not experienced roads being disconnected unless there is a mismatch in sidewalk settings between crossings associated with a road section. We will see if we can recreate this by testing this again, but exact repro steps would be very much appreciated.

    Thanks,
    Raoul
     
    Last edited: Jul 8, 2018
  47. Barritico

    Barritico

    Joined:
    Jun 9, 2017
    Posts:
    372
    Hi.

    After updating to version 3.1, I have eliminated the errors, reconstructed the roads and .... pressing the "START" button of Vegetation Studio (version 1.3.1.0), unity crash.

    Any recommendation?

    Thank you.
     
  48. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,613
    Hello Barritico,

    What did you do with EasyRoads3D related to this? Vegetation Studio support is, for example by default switched off in General Settings > Scene Settings.

    Apart from that, there are no known situation regarding Unity crashing. Are you certain this is related to EasyRoads3D? All it does is, add a Vegetation Studio "Vegetation Mask Line" component to the road objects.

    Thanks,
    Raoul
     
    Last edited: Jul 9, 2018
    Barritico likes this.
  49. Barritico

    Barritico

    Joined:
    Jun 9, 2017
    Posts:
    372
    I have another question, in this case about the shaders.

    I use a weather system (Enviro) to rain, snow ... depending on the weather at real time that occurs at the place of the event.

    I would like to add the water effect and the snow effect to the roads. Is it possible with the current version?

    If not (and as a simple suggestion), an integration would be great. ;)

    Thank you.
     
  50. Barritico

    Barritico

    Joined:
    Jun 9, 2017
    Posts:
    372

    Sincerely I dont know.
    I have updated to version 3.1 and Vegetation Studio has not worked again.
    However, I have restored the copy to version 3.0 and it does work.

    And without any other change.

    Do not worry. At the moment it is not urgent. I'll look for the problem.
    I am more interested in the topic of shaders for the weather, which would leave my game INCREDIBLE.

    Thank you.