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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

My Procedural city generator

Discussion in 'Assets and Asset Store' started by ElectroSphere, May 27, 2013.

  1. ElectroSphere

    ElectroSphere

    Joined:
    Nov 17, 2012
    Posts:
    50
    Hey guys ^^


    I'm so happy to introduce my latest personal work :

    A city/street generator I made using trigger, stacking and texturing system (pretty simple mechanics)

    I made this to save time for building urban environments.


    It will probably reminds you the famous blender plugin GhostTown :







    What it does [UPDATE 1.5] :

    > 4 Generators : Custom Prefab, normal, LowPoly, HighPoly

    >Build your own city using the coloring system on a sizeable grid.

    >Generate parks, parking lots, building (residential and shop) and road networks.

    >Use the arrays to add/delete objects you want to generate randomly (such as facade, window style, etc).

    >With the high Poly generator, you can have the night mode (a prefab system for "randomly" lit windows on facades)


    Customizable parameters , such as :

    >Texture variety (entrance, floors, roofs, etc)

    >minSize/maxSize (x, y and z axis)

    >shop details models (for highPoly) (can be replaced, modified, added, etc)



    Almost everything is randomly generated, according to the parameters and each elements are "parented" under one empty gameObject

    The city is generated at runtime BUT it can be saved as gameObject (tutorial in the ReadMe)


    Made in C#

    Descent PC/MAC config required /!\




    WEBPLAYER (1.5 building showcase) (close all your other web pages to let the webplayer load completely each buildings)






    Available here
     
    Last edited: Mar 4, 2014
  2. Gherid_lacksGPS

    Gherid_lacksGPS

    Joined:
    Dec 3, 2011
    Posts:
    111
    I as a landscape architect, I'm always looking to generate city / street / urban context with the quickness. Very interested.
     
  3. sefou

    sefou

    Joined:
    Aug 30, 2011
    Posts:
    287
    Bookmarked. ;)
     
  4. ElectroSphere

    ElectroSphere

    Joined:
    Nov 17, 2012
    Posts:
    50
    Thx for your answers, the webplayer is now available :)

    Don't hesitate to ask me if you have any questions/problems
     
  5. ElectroSphere

    ElectroSphere

    Joined:
    Nov 17, 2012
    Posts:
    50
    Ok, now it 's available for sale :D
     
  6. Ullukai

    Ullukai

    Joined:
    Aug 24, 2010
    Posts:
    746
    Sold...

    Do we get the updates free when there are any for this ?
     
  7. MacHulk

    MacHulk

    Joined:
    Apr 24, 2013
    Posts:
    23
    How about the performance on mobile?
     
  8. ElectroSphere

    ElectroSphere

    Joined:
    Nov 17, 2012
    Posts:
    50
    Thx Ullukai => yes if you buy the beta, you will get all the updates for free

    MacHulk => I did not tested about the mobile performance but basically in this version it generate simple cubes and apply textures, also you can remove all the shop 3D details (wich are just a list of prefab on arrays)

    So I think you can generate the city first, modify it yourself next to adapt it on mobile devices.
     
  9. ElectroSphere

    ElectroSphere

    Joined:
    Nov 17, 2012
    Posts:
    50
    So here are my future objectives for the next uptades :

    > Modify the road generator to generate square form networks (more realistic than the current version)

    > Remove the ability to generate infinite roads/buildings using the public variables

    > Add a "highPoly" mod, with detailled facades and entrances

    > Add the ability to generate parks /parking lots

    ;)
     
    Last edited: Jun 16, 2013
  10. ElectroSphere

    ElectroSphere

    Joined:
    Nov 17, 2012
    Posts:
    50
    I almost forgot to say something :

    The price will not change and all the buyer will receive the updates for free ^^
     
  11. ElectroSphere

    ElectroSphere

    Joined:
    Nov 17, 2012
    Posts:
    50
    Some WIP news about the 1.0 update :

    This new version will permit to draw your own street/city by coloring simple squares on a grid (the size is also customizable).
    You can build the road network, choose the position of each building, parks, etc.. (just like SimCity)

    Stay tunned for more :)





     
  12. ElectroSphere

    ElectroSphere

    Joined:
    Nov 17, 2012
    Posts:
    50
    The version 1.0 is now available, with some great new features :)

    Check the first post to see the features.



    I hope you will like it !

    $8ph.png

    $4qc.png

    $uws5.png

    $31b.png

    $1hds.png

     
  13. darryldonohoe

    darryldonohoe

    Joined:
    Jan 10, 2012
    Posts:
    55
    Is it also possible to use custom building meshes to be randomly spawned?
     
  14. ElectroSphere

    ElectroSphere

    Joined:
    Nov 17, 2012
    Posts:
    50
    The system stack each floors of the building, so if you modify the floor mesh, yes.

    But to achieve that, you will have to work on the lowPoly generator.
     
  15. GrumpyOldMan

    GrumpyOldMan

    Joined:
    Sep 29, 2011
    Posts:
    51
    Your plugin looks really cool, I'll probably get it when I'm done with my current project. However I'm also curious about being able to spawn custom building meshes. What do you mean you will have to work on the lowPoly generator? Is it a complicated process?
     
  16. ElectroSphere

    ElectroSphere

    Joined:
    Nov 17, 2012
    Posts:
    50
    Hey,

    Not really complex, however the script was created to generate only the same shape of building (that's mean you cant generate randomly cylinder and cube buildings using the grid system) BUT you can achieve this by generating only 1 by 1 building (that's mean you cant use the coloring grid system).

    The whole system use instantiation methods, by playing with the prefabs, you can probably do what you want.

    For the HighPoly, you can't really change the shape of the building, because it generate each window and facade chuck (so if you want a cylinder shaped building for example, you cannot use the HighPoly, because the facade will be flat and not curved).

    So with the LowPoly, you can do this since it not generate each window, but a whole floor with a texture on it.

    I hope you understand me ^^
     
  17. tyshock

    tyshock

    Joined:
    Jun 20, 2013
    Posts:
    6
    Great plugin. I think your niche is runtime generated content. If you could construct an api so a first person camera could walk around and fine tune the city layouts, I believe you would have something unique. I think your plugin stands out in terms of user generated content.
     
  18. ElectroSphere

    ElectroSphere

    Joined:
    Nov 17, 2012
    Posts:
    50
    Thanks man, I will make a little update with some more options later (with the custom mesh spawning option), for now I am finishing to work on a android game (with procedural systems on it too) :)
     
  19. darryldonohoe

    darryldonohoe

    Joined:
    Jan 10, 2012
    Posts:
    55
    But for example:
    If i use the LowPoly function, can i still select my own prefab which is a custom made building.
    Just a basic building like in the example, a block but with details and of course with custom textures.

    Will you also eventually make something like where you can define if the generator would generate suburbs surrounding the city,
    And than somewhat bigger buildings and in the middle like skyscrapers?

    Because than this would probably be the most advanced generator. Anyway this sounds and looks like a great generator and i would definitely buy this somewhere in the near future.

    Cheers,
    Darryl
     
  20. ElectroSphere

    ElectroSphere

    Joined:
    Nov 17, 2012
    Posts:
    50
    Thank you darryldonohoe for your support, you gave me some great ideas to the future updates. :)

    For the custom made buildings request, I will add an option for this to make things easier to do, in those next updates.
     
  21. darryldonohoe

    darryldonohoe

    Joined:
    Jan 10, 2012
    Posts:
    55
    Thanks for the reply, and if this will indeed have more functions. I would be happy to give more than € 5,-.
    Since it would probably be a lot of work and is therefore worth more than € 5,-!

    Cheers,
    Darryl
     
  22. ElectroSphere

    ElectroSphere

    Joined:
    Nov 17, 2012
    Posts:
    50
    Yes it will have more options , but the price will not change :)
     
  23. yavadoo

    yavadoo

    Joined:
    Mar 24, 2012
    Posts:
    102
    A bargain for 5 euro
     
  24. ElectroSphere

    ElectroSphere

    Joined:
    Nov 17, 2012
    Posts:
    50
    Guys, I plan to add two more generators on the package for the next update :)

    Custom mesh generator (with some options to speed up the desired rendering).

    Ultra Low Poly generator (usefull for mobile and flight simulators, it's gonna be pretty epic, hopefully :p).

    I will post more details, plus screenshots (and probably webplayers) on this topic as usual.



    Now it's time to work ! :)
     
  25. jessee03

    jessee03

    Joined:
    Apr 27, 2011
    Posts:
    729
    Looking very awesome
     
  26. darryldonohoe

    darryldonohoe

    Joined:
    Jan 10, 2012
    Posts:
    55
    Sounds great!
     
  27. ElectroSphere

    ElectroSphere

    Joined:
    Nov 17, 2012
    Posts:
    50
    Hey !

    I'm back, with a finished update :

    1.5 version !



    It contain 2 new generators :

    The modified version of the basic generator :

    Allow you to add your own prefab building on an array.

    A Low Poly version for mobile :

    Generate buildings with customizable size and roof + facade textures.


    There's still some minor adjustment errors on generated gameObjects.

    When I will have some free time I will try to fix them but you can also do it easily yourself.

    I think in the next update I should improve the Low Poly version to add little more LowPoly objects to the city.


    Get it here

    WEBPLAYER (buildings showcase) (close all your other web pages to let the webplayer load completely each buildings)

    For all the people who bought the older version, I have sent you a mail to download it, go check it !
     
    Last edited: Aug 24, 2013
  28. ElementalSpark

    ElementalSpark

    Joined:
    Jul 20, 2013
    Posts:
    9
    I've just been your next purchase! Can't wait to check it out..

    edit: I have played with it for about an hour.. I love it! THANK you!! This tool is amazing!! Keep updating! It would be nice if it could just export the prefab, rather than possibly crash unity via the copy to prefab, etc..
     
    Last edited: Jan 17, 2014
  29. austint30

    austint30

    Joined:
    Jul 1, 2013
    Posts:
    72
    The download 404's.
     
  30. ElectroSphere

    ElectroSphere

    Joined:
    Nov 17, 2012
    Posts:
    50
    @ElementalSpark, Thanks, I'm glad you appreciated my work, yes I know about the prefab export, it could be much better but I didn't have the time to learn how to do that sorry.


    @austint30, Ok, I will check that.

    Did you actually bought it and get the download 404 error after the purchase ? if yes send me your purchase informations in PM (for example your name and the date and the ticket number).
     
    Last edited: Jan 22, 2014
  31. Meceka

    Meceka

    Joined:
    Dec 23, 2013
    Posts:
    420
  32. Deleted User

    Deleted User

    Guest

    Hi, I'm new to Unity, and I've just downloaded your plugin to create an urban environment. The buildings, streets, and parking lots look good, but when I place a park tile, I'm seeing benches but no grass texture for the ground or trees as in the screenshots. There's probably something simple I'm missing as I've never worked with Unity before.
     
  33. ElectroSphere

    ElectroSphere

    Joined:
    Nov 17, 2012
    Posts:
    50
    @ Meceka, thanks man, for noticing my mistake !


    @ chris, for the grass or the trees, I think I just forgot to add them in the package, its not a big deal :

    You can find the missing stuff in Terrain Assets package (but you can use another trees, textures, etc)

    For the tree : you can just add it on the inspector variable located at the park generator (the prefab is called ParkSpot inside the ressources folder)

    For the ground : just find the related prefab of the park (called ParkSpot) and add it the texture you want (and dont forget to save the prefab indeed)

    hope you understand ^^
     
  34. Deleted User

    Deleted User

    Guest

    Okay, I imported the Terrain Assets package into my project.

    I see the ParkSpot prefab, but I'm not sure how add a tree or a texture to this prefab.
     
  35. Deleted User

    Deleted User

    Guest

    Okay, actually, now that I've downloaded the Terrain Assets, there is some grass texture showing up park tiles. And I see that I can add trees manually to the generated city. I guess this will probably be enough for my purposes.

    Maybe I should explain a little more what I'm trying to achieve. I want to have an urban environment in Unity that's complex enough so that I can plan a driving route through it that is somewhat complicated to learn (involving at least a dozen or so turns). I'd actually be fine with some existing city scene, if you could point me toward one that you think might work well.
     
  36. ElectroSphere

    ElectroSphere

    Joined:
    Nov 17, 2012
    Posts:
    50
    Sorry for the late reply, I'm extremely busy lately, I will help you soon, just send me your e-mail so we can discuss. Cya !
     
  37. m1735

    m1735

    Joined:
    Nov 28, 2013
    Posts:
    11
    Same as Chris - I'm not getting trees or grass... But the quick setup for buildings and roads is well worth 5 Euros alone :)
     
  38. ElectroSphere

    ElectroSphere

    Joined:
    Nov 17, 2012
    Posts:
    50
    Yeah sorry for those mistakes, I also forgot to assign a material to the window 14 prefab, when I will have free time, I will update it with the fixes.
    Thanks for your messages, I appreciate it !
     
  39. Iglander99

    Iglander99

    Joined:
    Feb 27, 2014
    Posts:
    4
    Does not work for me. I've got the warning message "The referenced script on this Behaviour is missing!" and nothing happens.
    My version of Unity is 4.3.4f1 pro version.
     
  40. ElectroSphere

    ElectroSphere

    Joined:
    Nov 17, 2012
    Posts:
    50
    Hi Iglander99,

    Send me your e-mail so we can discuss for your problem.
     
  41. GabrielFarrugia

    GabrielFarrugia

    Joined:
    Oct 10, 2011
    Posts:
    157
    Please release some documentation. I have no idea how to work your package.
     
  42. GabrielFarrugia

    GabrielFarrugia

    Joined:
    Oct 10, 2011
    Posts:
    157
    Also, please remove the term Procedural from your package. It is false advertising as there is nothing procedural about designing a city through a grid.
     
  43. ElectroSphere

    ElectroSphere

    Joined:
    Nov 17, 2012
    Posts:
    50
    I named it procedural because I use random function to generate the facades of the building. The PDF and the example scene should help you figure out how to use it.

    If you are stuck, tell me exactly what is the problem.
     
  44. GabrielFarrugia

    GabrielFarrugia

    Joined:
    Oct 10, 2011
    Posts:
    157
    Yeah I know but Procedural City Generator is a bit misleading. Would be better as Procedural Building Generator. I did not find any pdfs with the package. I will check when I get home.