Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

CiDy 2.7 Procedural City Designer

Discussion in 'Assets and Asset Store' started by RecklessGames_, Feb 11, 2016.

  1. RecklessGames_

    RecklessGames_

    Joined:
    Jul 30, 2010
    Posts:
    222
    Correct, The Terrain Blending Function has a limitation of One Terrain, so if you are building on a Unity Terrain. You will only be able to create on a single Terrain and have the Terrain blend to the Road. (This is no longer true, Version 2.5 IS Multi Terrain Compatible.)

    In version 2.4 if you try to build your road across two terrains the roads that are placed on the non referenced terrain will have the wrong heights and not get any blending when you do the BlendTerrain function.(This is no longer true, Version 2.5 IS Multi Terrain Compatible.)

    If you are not building on Unity Terrains and not needing the Terrain Blend Function then you can build across as many meshes that you want.

    The Limitation is in the Terrain Blend Logic in Version 2.4 not the placement of nodes and roads/cells. (This is no longer true, Version 2.5 IS Multi Terrain Compatible.)

    I have an update in the works that fixes this limitation(Working in test setup but not quite complete). (This update went live with Version 2.5)

    The New Update in the works Version 2.5 will come with multi terrain compatibility, and Building Spawn system for Rural Road Layouts that do not have Cells.

    But to answer your question, the current version is still single terrain blending.
    (This is no longer true, Version 2.5 IS Multi Terrain Compatible.)

    Thanks for Coming back to CiDy. :) I also updated the Code for Building placement since you and I last spoke. Before when you used it the Modular buildings did have issues when I would generate there Bounding Box, causing the Placement of buildings to be off. But I have since updated the logic and it now accounts for Sub Mesh Bounds in modular buildings as well.

    I tested this by using the free KitBash Kit and had fun results. :)

     
    Last edited: Dec 11, 2020
  2. theonerm2_unity

    theonerm2_unity

    Joined:
    Sep 7, 2018
    Posts:
    131
    I'm trying to run this thing but Unity keeps crashing and sometimes my PC is hard freezing. Not sure why. I think it's the graphics card. It's a TDR delay timeout. If I remember correctly.
     
  3. RecklessGames_

    RecklessGames_

    Joined:
    Jul 30, 2010
    Posts:
    222
    That is crappy, Hope your graphics card isn't dying on you. What version of unity are you running? URP/Builtin or HDR?

    TDR errors is a symptom produced by one or a combination of the following causes: Missing Windows® or application/game updates. Corrupted Windows® registry or system files. Corrupted or known graphics driver issue.

    Perhaps check and see if you can update your graphics driver.

    And I would recommend you run a GPU Memory Test Program that will tell you how well your gpu is able to handle graphics rendering or if there is a faulty memory issue.

    As Far as CiDy 2.4 is concerned, it doesn't run anything on the GPU for its calculations, and it doesn't employ GPU instancing. All Calculations are ran on the Main thread just as Unity uses.

    The Procedural Road Models generated by CiDy are efficient quad and triangles, the Building Prefabs that come with the System are Mid-Low Poly.

    The Custom CiDy shaders are the Standard Unity Shader with only an Offset added for z-Fighting correction.

    Your GPU is only involved in Rendering Unity and all its draw calls etc, unless you are running other assets that are using GPU calculations etc.

    Which isn't a CiDy Editor Tool issue, so I am not sure what else I can do for you on that end.
     
    Last edited: Oct 31, 2020
    theonerm2_unity likes this.
  4. theonerm2_unity

    theonerm2_unity

    Joined:
    Sep 7, 2018
    Posts:
    131
    I made a few modifications to the registry and I updated my drivers. No crashes so far. But I'm getting some errors in my project. Assets\CiDy\CiDyAssets\CiDyScripts\CiDyGraph.cs(3128,77): error CS1061: 'ImageMask' does not contain a definition for 'ImageMaskTexture' and no accessible extension method 'ImageMaskTexture' accepting a first argument of type 'ImageMask' could be found (are you missing a using directive or an assembly reference?)

    Any idea why?
     
  5. RecklessGames_

    RecklessGames_

    Joined:
    Jul 30, 2010
    Posts:
    222
    Do you have GAIA Pro or GAIA 2 scripting define in your project settings? This error should only appear if you have the "GAIA_2_PRESENT" or "GAIA_PRO_PRESENT" but do not actually have GAIA in the Project. This can happen when you have gaia but then manually remove it as it wont clear the Scripting Define (I had it happen to me)

    If that is the case Simply Open Player Settings and Remove GAIA Defines or reimport GAIA 2 or Pro as something may be missing.

    GAIA2.PNG

    Otherwise CiDy will try to Generate a Image Mask for the Biome Controller in GAIA and set the GAIA Biome Spawner "ImageMaskTexture".
     
    Last edited: Oct 31, 2020
  6. theonerm2_unity

    theonerm2_unity

    Joined:
    Sep 7, 2018
    Posts:
    131
    I have Gaia Pro and it is present in my project. I'll try updating it because I see there is a newer release.
     
  7. RecklessGames_

    RecklessGames_

    Joined:
    Jul 30, 2010
    Posts:
    222
    yea double check pro and cidy are up to date. But If you have gaia pro then you should be good to go. that is the Product I use with CiDy.
     
  8. theonerm2_unity

    theonerm2_unity

    Joined:
    Sep 7, 2018
    Posts:
    131
    It seems to be working now. Except it's not removing the vegetation when I blend.
     
    Last edited: Nov 1, 2020
  9. RecklessGames_

    RecklessGames_

    Joined:
    Jul 30, 2010
    Posts:
    222
    Are GAIA Spawners updating after the Terrain Blends?

    Join our Discord channel for better Support.

    https://discord.gg/5ErF9MU

    For GAIA Pro, I generate two Masks and store them in CiDyResources->GAIAMasks.

    One has grass in the CiDy Lots and One doesn't.

    The Grass and Fern spawners get the Grass Mask and the Rest get the standard mask.

    I do allow grass to be in lots.
    If your meshes have an issue with grass.
    You can simply switch the Referenced Mask in the BiomeSpawners "Grass" and "Fern" to the Other Mask and update those two spawners.

    It will then mask the grass from the building lots as well.
     
  10. skon

    skon

    Joined:
    Nov 2, 2014
    Posts:
    2

    Hello, When you will publish this update?
     
  11. RecklessGames_

    RecklessGames_

    Joined:
    Jul 30, 2010
    Posts:
    222
    The Next Update is Multi-Terrain Support. I am in the final Stages of it. (I have it working and working with GAIA but there are bugs when dealing with a Streamed Terrain Scene. At most I would put this Update 7 days out, if not sooner.

    Then Bridges and Overpasses is getting its Focus. So i would say 14 days. Possibly sooner.

    Then after that I will be rolling out Spawner Buildings upgrade. (This was originally coming with Multi-Terrain Update but its got too many bugs that has pushed it behind terrain and bridges support.)

    Holidays here in the states was also a factor on the slow down of updates but I'm back in the Swing of work now. :)

    Thank you for your support.
    Steven M.
     
    HeadClot88 and skon like this.
  12. skon

    skon

    Joined:
    Nov 2, 2014
    Posts:
    2

    I'm so excited for the new update, Especially for support multiple terrain and bridges.
    Thank you.
     
    RecklessGames_ likes this.
  13. RecklessGames_

    RecklessGames_

    Joined:
    Jul 30, 2010
    Posts:
    222
    ScreenShotSaturday8.PNG

    CiDy 2.5 Multi-Terrain Compatibility Update is Out Now.

    You can now Create Across Multiples Terrains in a Scene.

    You can Also create using a Streamed Scene Setup (Sub Scenes with Terrains in them).

    GAIA and Vegetation Studio Compatible as Well.

    Enjoy, and as Always, Thank you for your support.
     
    Last edited: Dec 11, 2020
  14. RecklessGames_

    RecklessGames_

    Joined:
    Jul 30, 2010
    Posts:
    222
  15. SquareBunnyBoy

    SquareBunnyBoy

    Joined:
    Feb 16, 2020
    Posts:
    27
    Hey! After adding CiDy to my project I get an error while trying to build:

    Assets\CiDy\CiDyAssets\CiDyScripts\CiDyGraph.cs(11,19): error CS0234: The type or namespace name 'SceneManagement' does not exist in the namespace 'UnityEditor' (are you missing an assembly reference?)

    Any ways to fix it?
     
  16. SquareBunnyBoy

    SquareBunnyBoy

    Joined:
    Feb 16, 2020
    Posts:
    27
    Another problem: Why I always get z fighting on roads? Is there any way to set height of generated roads or something?

    upload_2020-12-20_18-17-33.png
     
  17. staron82

    staron82

    Joined:
    May 22, 2017
    Posts:
    19
    Anyone tried using this with Synty Studios' City?
     
  18. RecklessGames_

    RecklessGames_

    Joined:
    Jul 30, 2010
    Posts:
    222
    Are you using the CiDyStandardShader on the Roads? It has an Offset in the Shader.
    Is that on a Unity Terrain? or Just a Square Plane Mesh?

    If its on a Terrain you will have to Click Blend Terrain from the CiDyEditorWindow.

    If its just a Plane mesh then it will require the CiDyShader or your shader will have to Change its offset to Render -1 (before others)

    ProperZFigthing.PNG

    If you still have issues and you are using the CiDyShader and Blending terrain etc.

    You can open the Shader and Modify this line to something like this.

    ProperZFigthing2.PNG
     
    Last edited: Dec 20, 2020
  19. RecklessGames_

    RecklessGames_

    Joined:
    Jul 30, 2010
    Posts:
    222
  20. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Hello,

    How do I change a cell's registered prefabs? I believe we need an 'update prefab resources list' button to re-populate the list when adding/removing prefabs from the district folders.

    I created some nodes with default districts the other day, today I added a custom district, but when applying it to a cell, it only generated buildings from its original district. I feel like the prefab list it's referencing is not being updated.

    When I replaced the buildings in DownTown theme folder as a test, and re-generate cell, I get a null error, which is why I think the list is not being updated:

    MissingReferenceException: The variable prefabBuildings of CiDyCell doesn't exist anymore.
    You probably need to reassign the prefabBuildings variable of the 'CiDyCell' script in the inspector.
    UnityEngine.GameObject.GetComponentInChildren[T] (System.Boolean includeInactive) (at <29ad182faa3f478c9310d6a2e7143c15>:0)
    UnityEngine.GameObject.GetComponentInChildren[T] () (at <29ad182faa3f478c9310d6a2e7143c15>:0)
    CiDyCell.ExtrudeLots () (at Assets/CiDy/CiDyAssets/CiDyScripts/CiDyCell.cs:1819)
    CiDyCell.UpdateMesh () (at Assets/CiDy/CiDyAssets/CiDyScripts/CiDyCell.cs:1139)
    CiDyCell.UpdateCell () (at Assets/CiDy/CiDyAssets/CiDyScripts/CiDyCell.cs:289)
    CiDyCellEditor.OnInspectorGUI () (at Assets/CiDy/CiDyAssets/Editor/CiDyCellEditor.cs:37)
    CiDyEditor.OnGUI () (at Assets/CiDy/CiDyAssets/Editor/CiDyEditor.cs:591)
    System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <9577ac7a62ef43179789031239ba8798>:0)
    Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <9577ac7a62ef43179789031239ba8798>:0)
    System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <9577ac7a62ef43179789031239ba8798>:0)
    UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at <7d90b28560b644ce87b8263efcc36eed>:0)
    UnityEditor.HostView.Invoke (System.String methodName) (at <7d90b28560b644ce87b8263efcc36eed>:0)
    UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at <7d90b28560b644ce87b8263efcc36eed>:0)
    UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect) (at <7d90b28560b644ce87b8263efcc36eed>:0)
    UnityEditor.DockArea.OldOnGUI () (at <7d90b28560b644ce87b8263efcc36eed>:0)
    UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <06214b245dbb4d10a9cefd10639bb04e>:0)
    UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <06214b245dbb4d10a9cefd10639bb04e>:0)
    UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <06214b245dbb4d10a9cefd10639bb04e>:0)
    UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Boolean canAffectFocus) (at <06214b245dbb4d10a9cefd10639bb04e>:0)
    UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUI (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus) (at <06214b245dbb4d10a9cefd10639bb04e>:0)
    UnityEngine.UIElements.IMGUIContainer.HandleEvent (UnityEngine.UIElements.EventBase evt) (at <06214b245dbb4d10a9cefd10639bb04e>:0)
    UnityEngine.UIElements.CallbackEventHandler.HandleEventAtTargetPhase (UnityEngine.UIElements.EventBase evt) (at <06214b245dbb4d10a9cefd10639bb04e>:0)
    UnityEngine.UIElements.MouseCaptureDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <06214b245dbb4d10a9cefd10639bb04e>:0)
    UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at <06214b245dbb4d10a9cefd10639bb04e>:0)
    UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <06214b245dbb4d10a9cefd10639bb04e>:0)
    UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at <06214b245dbb4d10a9cefd10639bb04e>:0)
    UnityEngine.UIElements.EventDispatcher.OpenGate () (at <06214b245dbb4d10a9cefd10639bb04e>:0)
    UnityEngine.UIElements.EventDispatcherGate.Dispose () (at <06214b245dbb4d10a9cefd10639bb04e>:0)
    UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <06214b245dbb4d10a9cefd10639bb04e>:0)
    UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at <06214b245dbb4d10a9cefd10639bb04e>:0)
    UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at <06214b245dbb4d10a9cefd10639bb04e>:0)
    UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <06214b245dbb4d10a9cefd10639bb04e>:0)
    UnityEngine.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <06214b245dbb4d10a9cefd10639bb04e>:0)
    UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <fe7ee1881b524b0d9443f74417fb598b>:0)
     
  21. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Switching between district themes, it eventually did seem to work, but somewhere in this process it did not update the array properly, but still did not recognize my updated prefabs without some trial/error. Perhaps an internal update call when generating may help it be more consistent when district prefab folder changes are made for existing cells to have immediate access.
     
  22. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    One more question. I'm having a lot of fun with the tool by the way, looking forward to getting all my assets organized and building.. really looking forward to the WIP stuff too. I can see this being one of the best road and design tools for Unity. Thanks for making it and keep it up!

    When I create a narrow angled street, there's some overlap of the corner buildings (like it should not spawn in this space since it only fits on one side) , I attached a screen shot. I'm wondering if there's an option to prevent this or if the prefab is improperly setup?
     

    Attached Files:

  23. RecklessGames_

    RecklessGames_

    Joined:
    Jul 30, 2010
    Posts:
    222
    Hello Stephen,

    I am Steven. :)

    First, I want to say thank you for your continued support, there is more coming for CiDy. :)

    CELL THEME CHANGING--

    Sorry you are having that issue with switching your cells themes.

    First lets make sure that we are up to date. (I do a lot of soft updates)

    Second, the Main Toggle on the Cell is the "Auto Fill Buildings" Toggle, When this is On,

    And you then Switch the Choice to whichever theme you want.

    DoubleCheckAutofill.PNG

    I will double Check the Code and see if there is a degen event happening to you, and I will correct it.

    CORNER BUILDING OVERLAP===

    The Overlap is not your Problem, Its a Bug in the Fitting Algorithm, In Tight Triangle Shaped Cells, These issues pop up.

    This overlap issue has been fixed and will be in the Next Update. For Now you may have to manually remove them or adjust them after you are satisfied with your full layout.
     
    Last edited: Dec 23, 2020
    Stephen_O likes this.
  24. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Hi Steven :)

    Thanks, I really just want to provide feedback while making sure I'm using it properly, neither are problems for me, I'm only testing and building up the art prefab library that I'll eventually use with the tool. The cells had default settings when I couldn't get new prefabs to load on version 2.4, I'll update and let you know if I reproduce the issue in 2.5 or later.

    I spent a lot of time this year trying to manually build out my world without reaching a completed state, I'll restart it using CiDy when I'm ready. My biggest desired feature would be multi-lane roads (do you know if/when that may come?).

    Keep up the great work, I'm thrilled to be able to use a tool like this - in it's current state it is a real game changer with the speed at which it allows iteration.
     
    RecklessGames_ likes this.
  25. C1B0

    C1B0

    Joined:
    Nov 23, 2018
    Posts:
    6
    Hello there.

    I'm posting this from DeepL translation

    I would like to use this asset to create a landscape of a Japanese city, and I would like to know if the following changes are possible

    Change the lane to left-hand traffic.
    Partially change the number of lanes.
    Partially change the width and texture of the sidewalks.
    Partially change the model data for white line decals and traffic lights at intersections.
    Partially change the positioning of props and the generation mechanism
     
    Last edited: Dec 23, 2020
  26. RecklessGames_

    RecklessGames_

    Joined:
    Jul 30, 2010
    Posts:
    222
    Hello.

    Thank you for your inquiry.

    Questions:

    1.) Change the lane to left-hand traffic.
    1.) No, Not Currently, However, the Next Update will have a Global Toggle that will allow this.

    2.) Partially change the number of lanes.
    2.) No, Currently the Number of Lanes is Default at 2, you can change the Texture on the Road to any lane texture you want and simulate that effect for now.

    3.) Partially change the width and texture of the sidewalks.
    3.) Yes, You can change the Width, Height and Texture of Sidewalks.

    4.) Partially change the model data for white line decals and traffic lights at intersections.
    4.) Yes, You can Change the Texture that is applied to the Decals on its Material and You can have multiple themes with there own Intersection Prefabs.

    5.) Partially change the positioning of props and the generation mechanism
    5.) Yes, you can change the Props that are generated along the Paths,

    You can also spawn, Procedural Guardrails, Concrete Barriers, Telephone/Power Line Poles and Any other Prefabs you desire to spawn along a spline.

    Let me know if you have any more questions.

    Thanks,
    Steven M.
     
    C1B0 likes this.
  27. RecklessGames_

    RecklessGames_

    Joined:
    Jul 30, 2010
    Posts:
    222

    "My biggest desired feature would be multi-lane roads(do you know if/when that may come?)."

    Actually the Next Update is going to have Multi-Lane Textures and Procedural Overpass Support.

    :) So.. with in a few weeks.

    Thanks,
    Steven M.
     
    Recon03 and Stephen_O like this.
  28. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Very cool, next update sounds awesome, thanks for the info!
     
  29. keithsoulasa

    keithsoulasa

    Joined:
    Feb 15, 2012
    Posts:
    2,126
    Is their an API to place to road waypoints ?

    If so I'll buy it on sale this weekend
     
  30. RecklessGames_

    RecklessGames_

    Joined:
    Jul 30, 2010
    Posts:
    222
    This product does come with Source Code.

    But, I don't want to miss lead anyone and its not fully setup for easy API Use.
    It would be easier if you could give me an example of use of the API?

    There are values exposed. You can make calls to Create Nodes and Connect two nodes (Creating a Road) and Closing the Roads into a Cell and Calling an Update Call Function that will Generate Cells of any enclosed areas.

    You can also access the Roads Spline Points (the Roads Waypoints etc)

    But I could probably direct you better if I understand the Main Desired Result. :)

    Thank you for your Interest in CiDy,
    Steven M.
     
  31. keithsoulasa

    keithsoulasa

    Joined:
    Feb 15, 2012
    Posts:
    2,126

    var roadController = GetRoadController() ;
    roadController.addPoint(new Vector3(0,1,1);
    roadController.build();

    I need to do that.
     
  32. RecklessGames_

    RecklessGames_

    Joined:
    Jul 30, 2010
    Posts:
    222
    If you are hoping for a Run-time solution for a Game, Its not going to work due to the Blending of Terrain.

    If you are wanting to do a Editor Time Procedural Creation of Roads through the API, Then Yes you can.

    You can Grab a Reference to the Scenes CiDyGraph.

    And from here you have a few choices.

    The Direct Path is to call CreateRoadFromKnots.

    But you have to keep in mind that this generates from that input. So the Points you feed into it are its Control Points(Bezier)

    After you call this you can then modify the road as normal with the CiDyEditor.

    Control Points (Three) for example

    BoundingLayout.PNG
    Resulting Road from the Three Control Points.

    BoundingLayout2.PNG

    You can Also Define the Ends by Creating Nodes at each End Point.

    Then Calling ConnectNodes in Graph to create a Straight 4 Point Bezier between the Two Nodes.

    Example Code: The Function you are interested in is the GenerateRoad() Function

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4.  
    5. [ExecuteInEditMode]
    6. public class TestRoadCreationAPI : MonoBehaviour
    7. {
    8.     public float nodeScale = 0;
    9.     public float roadWidth = 5;
    10.     public int roadSegLength = 12;
    11.     public float flattenAmount = 0;
    12.  
    13.     public CiDyGraph graph;
    14.     public Transform[] userPoints;
    15.     public bool generateRoad = false;
    16.  
    17.     private void Start()
    18.     {
    19.         GrabGraph();
    20.     }
    21.  
    22.     //Update is called once per frame
    23.     void Update()
    24.     {
    25.         if (generateRoad) {
    26.             generateRoad = false;
    27.             GenerateRoad();
    28.         }
    29.     }
    30.  
    31.     void GrabGraph() {
    32.         graph = FindObjectOfType<CiDyGraph>();
    33.     }
    34.  
    35.     //Generate Road
    36.     void GenerateRoad() {
    37.         Debug.Log("Generate Road");
    38.         if (graph == null) {
    39.             GrabGraph();
    40.         }
    41.         Vector3[] newKnots = new Vector3[userPoints.Length];
    42.         for (int i = 0; i < userPoints.Length; i++) {
    43.             newKnots[i] = userPoints[i].position;
    44.         }
    45.         //Input Values needed for Creating a Road from Preset Points.
    46.         //Vector3[] Knots, float RoadWidth, float NodeScale, int RoadSegmentLength, int FlattenAmount
    47.         graph.CreateRoadFromKnots(newKnots, roadWidth, 0, roadSegLength, 0);
    48.     }
    49.  
    50.     private void OnDrawGizmos()
    51.     {
    52.         if (userPoints != null && userPoints.Length > 0) {
    53.             Gizmos.color = Color.yellow;
    54.             for (int i = 0; i < userPoints.Length-1; i++) {
    55.                 Gizmos.DrawLine(userPoints[i].position, userPoints[i + 1].position);
    56.             }
    57.         }
    58.     }
    59. }
     
  33. keithsoulasa

    keithsoulasa

    Joined:
    Feb 15, 2012
    Posts:
    2,126

    You just made a sell, will buy this weekend. This would only be in editor mode .
     
  34. RecklessGames_

    RecklessGames_

    Joined:
    Jul 30, 2010
    Posts:
    222
    Thank you very Much, There is more to come. :)

    Thank you for your support.
    Steven M.
     
  35. keithsoulasa

    keithsoulasa

    Joined:
    Feb 15, 2012
    Posts:
    2,126
    Does this work on Unity 2020.2 ? Right now when I click around nothing happens.

    I've seen a bunch of other small issues here and there as well, I'm thinking I might need to downgrade back to 2020.1.16
     
  36. RecklessGames_

    RecklessGames_

    Joined:
    Jul 30, 2010
    Posts:
    222
    Did you set the Tags and Layers of the Terrain or mesh you are wanting to build your roads on to "Terrain"?

    I'm downloading Unity 2020.2

    It should work though.

    Feel free to join our Discord
    https://discord.gg/5ErF9MU
     
    Last edited: Dec 27, 2020
  37. keithsoulasa

    keithsoulasa

    Joined:
    Feb 15, 2012
    Posts:
    2,126
    Yes, in addition to that, 2020.2 a project won't compile with your asset in it.


    Good chance this is more of a Unity 2020.2 not being stable thing. Let's hope 2020 LTS comes soon, 2020 has been better in every way compared to any other Unity version, but it's definitely has issues.
    I work in software dev fulltime, so I understand things can just happen like this. Let me know when it's fixed.
     
  38. RecklessGames_

    RecklessGames_

    Joined:
    Jul 30, 2010
    Posts:
    222
    No worries, I'll test it out on 2020.2.0f1

    What Render Pipeline are you working in?

    Built-in, URP or HDRp?
     
  39. keithsoulasa

    keithsoulasa

    Joined:
    Feb 15, 2012
    Posts:
    2,126
    HDRP.

    Upgrading to 2020.2 broke like half my project, trying to downgrade too.

    Good old git to the rescue .
     
  40. RecklessGames_

    RecklessGames_

    Joined:
    Jul 30, 2010
    Posts:
    222
    I just tested CiDy in 2020.2.0f1

    The compile to Build error was fixed but that update is still sitting in Unity Review. Unity hasn't updated any packages this week. I am assuming do to holidays and I expect it to be updated this week coming.

    If you need to build you can simply add Compile Dependent Checks around the Two Offending Lines.
    #if UNITY_EDITOR
    //Error Line
    #endif

    But as for it working in 2020.2.0f1. (Built-in Render Pipeline)
    It is working for me after I setup the Tags/Layers.

    In the Update that is sitting in review you will not have to add them to your project, this is done automatically in the pending update. but you will still have to set the terrain colliders tag and layer to "Terrain" for CiDy Editor to build node and roads on it.

    :)

    Thank you for your support,
    More is to come.

    2020.2.0f1.PNG
     
  41. RecklessGames_

    RecklessGames_

    Joined:
    Jul 30, 2010
    Posts:
    222
    For HDRP and URP you will have to switch the CiDyStandard Shaders that are applied to the Materials to Standard Shader, Then Run the Conversion in Unity from Builtin-Standard to the URP or HDRP and then it will render properly.

    The Only difference Between the Unity Standard Shader and CiDyStandard is that I added an Offset -1, 1

    To the shader to Help combat Z-Fighting between Roads and Terrain when Viewing from a Distance.
     
  42. keithsoulasa

    keithsoulasa

    Joined:
    Feb 15, 2012
    Posts:
    2,126
    Awesome support.

    I rolled back to 2020.1.16 for now. 2020.2 was causing a multitude of other issues .


    I'll try again in a week once Unity updates the package
     
    RecklessGames_ likes this.
  43. RecklessGames_

    RecklessGames_

    Joined:
    Jul 30, 2010
    Posts:
    222
    Stephen_O likes this.
  44. RecklessGames_

    RecklessGames_

    Joined:
    Jul 30, 2010
    Posts:
    222
    CiDy Update 2.6 Multi-Lane Update = Work in Progress.

    Here are some Teaser images of what is possible with CiDy 2.6 Multi-Lanes Update.
    RoadLayouts.PNG

    Multi-Lanes will be coming with Preset options
    One Lane
    Two Lane,
    Four Lane,
    Six Lane

    Customizable Variables
    Shoulder Widths,
    Divider Lane Widths,
    Lane Type (One, two four and Six)
    Cross Walks and Left Hand Traffic Toggle.

    Screen Shots of a City Made Using CiDy 2.6
    CiDy2.6ShowcaseMulti_Lanes_9.PNG CiDy2.6ShowcaseMulti_Lanes_4.PNG CiDy2.6ShowcaseMulti_Lanes_2.PNG CiDy2.6ShowcaseMulti_Lanes_8.PNG
     
    Stephen_O and skon like this.
  45. keithsoulasa

    keithsoulasa

    Joined:
    Feb 15, 2012
    Posts:
    2,126
    On your January 07 release, Unity 2020.2.1f1 and when I click and the terrain tag is set nothing happens.
     
  46. RecklessGames_

    RecklessGames_

    Joined:
    Jul 30, 2010
    Posts:
    222
    Sorry, Just got your email.

    You set the Terrain in your Scene Tag and Layers to "Terrain"

    You opened CiDyEditor Window and it Created a CiDyGraph object into your Scene?

    Then with the CiDyEditor Window open you right click onto the Terrain and nothing happens?

    I'm Downloading 2020.2.1f1 to test with the Latest Update now.
     
  47. RecklessGames_

    RecklessGames_

    Joined:
    Jul 30, 2010
    Posts:
    222
    The Issue is that the newest package that is coming from the package store is not updated.

    Manually add your tags and layers to your Project then set the terrain to layers and Tags.

    I'm sending the New package to review, it will most likely be available for download within 24 hours of this writing.

    I confirmed the Newest Package does work in 2020 But until the update is passed review.

    Make sure your projects Tags and Layers have the following Items.
    "Node","Road","Cell","Terrain" in Both Tags and Layers.

    Then Set Terrain tag and Layer in Scene to "Terrain".

    Open Editor window and start right Clicking on Terrain. :)

    Here are three short tutorials to help you get up and running.

    First Setup


    //Custom Theme Setup


    //Using CiDy Spawners



    Thank you for your continued support,
    Steven M.
     
    Last edited: Jan 12, 2021
  48. keithsoulasa

    keithsoulasa

    Joined:
    Feb 15, 2012
    Posts:
    2,126

    Do you have a version number anywhere in the code base itself ?

    Can I email you my invoice number and get the package. I'm really hyped to get started !
     
  49. RecklessGames_

    RecklessGames_

    Joined:
    Jul 30, 2010
    Posts:
    222
    Sure, PM me your invoice ticket image.

    Thanks,
    Steven M.
     
  50. keithsoulasa

    keithsoulasa

    Joined:
    Feb 15, 2012
    Posts:
    2,126

    AWESOME Support and awesome product, got it working

    I am running into a bit of an issue with my script though , looks like I get this error


    [Physics.PhysX] cleaning the mesh failed
    UnityEngine.StackTraceUtility:ExtractStackTrace ()
    CiDy.CiDyUtils:GenerateDetailedRoad (UnityEngine.Vector3[],int,single,CiDy.CiDyRoad/LaneType,single,single,single,UnityEngine.Transform,CiDy.CiDyRoad,UnityEngine.Material,UnityEngine.Material,UnityEngine.Material,bool,UnityEngine.Vector3,UnityEngine.Vector3,bool,bool) (at Assets/CiDy/CiDyAssets/CiDyScripts/CiDyUtils.cs:8191)
    CiDy.CiDyRoad:SnipRoadMesh () (at Assets/CiDy/CiDyAssets/CiDyScripts/CiDyRoad.cs:908)
    CiDy.CiDyRoad:NodeDone (CiDy.CiDyNode,single,bool) (at Assets/CiDy/CiDyAssets/CiDyScripts/CiDyRoad.cs:603)
    CiDy.CiDyNode:processIntersection () (at Assets/CiDy/CiDyAssets/CiDyScripts/CiDyNode.cs:1637)
    CiDy.CiDyNode:AddRoad (CiDy.CiDyRoad) (at Assets/CiDy/CiDyAssets/CiDyScripts/CiDyNode.cs:727)
    CiDy.CiDyRoad:InitilizeRoad (UnityEngine.Vector3[],single,int,int,CiDy.CiDyNode,CiDy.CiDyNode,UnityEngine.GameObject,CiDy.CiDyGraph,bool,CiDy.CiDyRoad/RoadLevel,CiDy.CiDyRoad/LaneType,single,single,single,single) (at Assets/CiDy/CiDyAssets/CiDyScripts/CiDyRoad.cs:320)
    CiDy.CiDyGraph:CreateRoadFromKnots (UnityEngine.Vector3[],single,single,int,int) (at Assets/CiDy/CiDyAssets/CiDyScripts/CiDyGraph.cs:2277)
    CidyTracer:createPath () (at Assets/CustomEditorTools/Editor/CidyTracer.cs:87)
    CidyTracer:OnGUI () (at Assets/CustomEditorTools/Editor/CidyTracer.cs:61)
    UnityEngine.GUIUtility:processEvent (int,intptr,bool&)