Giter Site home page Giter Site logo

procedural-cities's Introduction

Procedural-Cities

This project aims to provide a framework and a solid implementation of different techniques for generating complete seamless procedural cities with interiors for all buildings.

Small demo: https://www.youtube.com/watch?v=n1eZOV8r_g4

This project was done as a master thesis at LTH, link to thesis is available here: http://lup.lub.lu.se/luur/download?func=downloadFile&recordOId=8929185&fileOId=8929189

The source code is available to everyone under the MIT licence and you're very welcome to clone or fork the reposity, but keep in mind that it is mostly a proof-of-concept and the code is hardly optimized or refined.

Most parameters are accessible from the "Spawner" blueprint-class, one is spawned in the default map, so edit the values inside of that. Some parameters can be found in ProcMeshActorBP, PlotBuilderBP and HouseBuilderBP. The most interesting parameters to change might be length, maximum turn rate for roads and heatmap settings.

Starting the project generates the city, the defalt character can either walk (with collisions enabled) or fly (with collisions disabled), switch by pressing R.

Some pictures:

Interior apartment Interior several apartments 1 Interior several apartments 2 Interior several apartments 3 City overview 1 City overview 2 City overview 3 City map 1 City map 2 City map 3 City map 4 Large city

procedural-cities's People

Contributors

chozabu avatar hdhauk avatar magnificus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

procedural-cities's Issues

Plugin

Hi!

Any chance to get this wrapped up in a plugin? :)

Nice work!

Make procedurally generates meshes destructible

First off, this is an awesome project that’s been undertaken. Very nice.

But I do have a question.

Where would be the best place to hook into this code to allow for the runtime meshes generated to be made into destructible meshes, using the APEX plugin?

Thank you

Looping 360 the same value when calculation best rotation for initial FRoadSegment

Hi,

First of, what a great project!

I think I found a small bug though.

When you spawn the initial road in Spawner.cpp
You rotate 360 degrees to find the best rotation for the initial segment, however it doesn't use the calculated variable 'Testpoint'.

So currently it loops 360 times around point 0,0.
Which is pretty pointless (sorry couldn't resist the pun ;) )

Anyway this line:

if (NoiseSingleton::getInstance()->noise(point.X, point.Y) > bestVal) {

All 'point' should be 'testPoint'. (also the line below it ofc)

Sidenote: Also NoiseSingleton::getInstance()->noise( is called twice, it might be better to store it in a temporary value to improve performance.

No Buildings Generated

It seem that no buildings are generated. I see streets, lights, and the things on top of buildings; but no buildings! When looking at the log I see a bunch of warning like this:

LogTemp: Warning: dist between start and end: 7150.078125
LogActor: Warning: ProcMeshActorBp_C /Game/FirstPersonCPP/Maps/UEDPIE_0_standardmap.standardmap:PersistentLevel.ProcMeshActorBp_C_688 has natively added scene component(s), but none of them were set as the actor's RootComponent - picking one arbitrarily
LogTemp: Warning: dist between start and end: 7150.046875
LogActor: Warning: ProcMeshActorBp_C /Game/FirstPersonCPP/Maps/UEDPIE_0_standardmap.standardmap:PersistentLevel.ProcMeshActorBp_C_689 has natively added scene component(s), but none of them were set as the actor's RootComponent - picking one arbitrarily
LogTemp: Warning: dist between start and end: 7150.045898
LogActor: Warning: ProcMeshActorBp_C /Game/FirstPersonCPP/Maps/UEDPIE_0_standardmap.standardmap:PersistentLevel.ProcMeshActorBp_C_690 has natively added scene component(s), but none of them were set as the actor's RootComponent - picking one arbitrarily
LogTemp: Warning: dist between start and end: 7150.028320
LogActor: Warning: ProcMeshActorBp_C /Game/FirstPersonCPP/Maps/UEDPIE_0_standardmap.standardmap:PersistentLevel.ProcMeshActorBp_C_691 has natively added scene component(s), but none of them were set as the actor's RootComponent - picking one arbitrarily
LogTemp: Warning: dist between start and end: 9049.761719

I'm running 4.20.3. Pulled from master today.

Procedural

Great Tool really, thanks for sharing it!!
I have some questions.First, Is this only generated runtime??I mean, if i want to use this , i must make them fixed (So, Can I turn the whole city to static meshes?? Or If given heatmaps, Is the city generated the same each runtime??Second, I can not generate interiors , this is strange. Does it need some settings to generate interiors?? Can you give some tutorials about this software?
Thank you very much and again, Great work

Building your project

Hi!

Your project looks great, but I cannot seem to get it to compile on Ubuntu 18.04 targeting Unreal Engine 4.19.

My error messages are:

error: '&&' within '||' [-Werror,-Wlogical-op-parentheses]
error: call to 'abs' is ambiguous

I do not really care about UE's version so if you got it to work with a precise version I'd be willing to give it a shot.

Screenshots from the blueprints

Well, I'll share this with you, maybe somebody can find this useful.

I'm a Unity3D dev and I don't have the possibility to have Unreal Engine on all of my computers, as long as I port the code of this project, but is nice to have a screenshot to follow the flow of this application in order to port it.

RoadGeneration until PlotGeneration
image

PlotGeneration until House placement:
image

Maybe I'm missing Room generation.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.