CityGen3D

Limitations

  • For some complex generated roads may end up with artifact & may require manual fixing for them.

  • Currently, pedestrian nodes are not generated.

How To Use

  1. Buy & download, import the following asset plugin:

Getting Started

  1. Add the CITYGEN_3D scripting define to the Player Settings of the project.

  2. Open your scene.

  3. Create City base, in the Unity toolbar open:

    Spirit604/CityEditor/Create/City Base

  4. Create a new game object & add CityGen3D_RoadGenerator component.

  5. By default CityGen3D overrides layers, to assign the required layer for the current project, open the package init window:

    _images/citygen1.png
  6. Untick all toggles, set new layers for Traffic & Pedestrian nodes (for example 13 & 14) & press Apply button.

    _images/citygen2.png
  7. Open CityGen3D Data tab.

    _images/citygen3.png
  8. In the Data tab:

    1. Set Data source to Download.

    2. Make sure the Locked toggle is unchecked.

    3. Place the cursor on the OSM map for the desired location.

    4. Press Download button.

      _images/citygen4.png
  9. After the download is complete, scroll to the bottom of the page.

    _images/citygen5.png
  10. Press Process, Load Generator, Run Generator buttons in sequence.

    _images/citygen6.png

    Result

  11. In the CityGen3D_RoadGenerator, press Generate button.

    _images/citygen7.png
  12. In the Debug tab, enable Show select buttons.

  13. In the Generated tab, check all problems, also check for road artifacts in the scene & fix them by selecting segments & fixing nodes & paths for them.

    _images/citygen8.png
  14. Generate a subscene when all steps are done.

  15. If you want to regenerate roads, press Move back button in the Hub & regenerate roads in CityGen3D_RoadGenerator & generate subscene in the Hub again.