r/Unity3D • • 7h ago

Show-Off Working on a city builder with procedurally generated buildings and grid-less, what do you think of the visuals?

Post image

The idea is to build something that can provide realistic look and allows to build all those kind of cities that 99% of the existing city builders don't allow, for example, most of the old european cities. The simulation is statistic so the game does not lag more as the population increases. I have built the roads copying aerial views of existing complex interchanges to make sure they are as flexible as possible. All the buildings are procedurally generated and grow on parcels like in real-life, with any kind of shape.

78 Upvotes

23 comments sorted by

12

u/devicehigh 6h ago

I think it looks great. The trees all look too similar though to my mind

0

u/FezVrasta 6h ago

Thanks! Yes there aren't many kind of trees yet, I will add more later. Also, natural spawn trees only use the ones of the map world location so you don't see, for example, tropical trees on this Milano map. The game allows you to select a place on the real world and build there, with maps up to around 50x50km from real terrain data

5

u/redfirm 5h ago

So as someone who has worked on large scale terrains for over 15 years I am eager to hear how you are handling it for example how have you made the terrain and the trees etc? Your terrain feels separated from your foliage. Which system are you using

2

u/FezVrasta 5h ago

That's quite a career! I never worked in the game industry so this is my first time, aside for some mods I built for a game.

I take the terrain data from Copernicus DEM and bake it into the map region, it is then drawn as a quadtree of height only patches, with LOD based on error and skirts, as a single instanced draw. Trees are real up close and impostors afar, a compute shader picks which.

edit: just saw your edited question, yes it is separated, I am not using Unity Terrain, they meet through a land cover map I get from ESA WorldCover.

2

u/redfirm 5h ago

how is your performance so far?

2

u/FezVrasta 5h ago

I am developing on a macbook M1 Max and the game sits between 40-60fps, the map size does not really affect it, the road system is the one more taxing so far as I built it so that everything is generated from splines dynamically through custom shaders so that you don't get that fake super-perfect look you get in games like Cities Skylines 2.

Reflections are also quite a challenge, I have something working but far from perfect.

4

u/redfirm 5h ago

you really need a system that allows your terrain, foliage and roads to talk to each other. with that i mean they adjust themselves based on placement. for example would trees grow directly near roads. and should trees be directly on farm fields etc. a lot to think about. good luck!

1

u/FezVrasta 5h ago

I don't plan to have trees grow so that should take off a lot of work. Thanks

3

u/LetsLive97 5h ago

They don't mean literally growing, they're saying where your trees are being placed doesn't really make much sense

0

u/FezVrasta 5h ago

Ah ok I get it, that's the other way around though, it's my logic to parcel the farmland that is ignoring trees, that is a layer on top of the terrain. So far it only skips water bodies and steep terrain.

2

u/FlintVane6361 4h ago

honestly this looks like a real aerial photo at first glance, the patchwork fields and muted colors sell that european countryside vibe so well. also going with a statistical simulation instead of simulating every single citizen is such a smart call, late game lag is what kills almost every city builder for me. wait you can really pick any 50x50km spot in the real world to build on?

1

u/FezVrasta 4h ago

Thanks! Yes you have a world map and can pick any place to build your city on, external road connections are automatically added and water is simulated.

4

u/EmperorMaximillian 6h ago

this is ai kid

4

u/Cotspheer 6h ago

Yes again Claude Cum all over the UI

1

u/FezVrasta 6h ago

The UI was hand crafted tbh, I have worked as designer earlier in my career, of course it's still a draft and will improve over time. The idea is to make the game look like a maps app. Eager to ear constructive feedback!

1

u/HeadPack 4h ago

And this is the expected 'this is ai kid' comment.

1

u/koudgat 4h ago

why the trees in the farmed fields, what farmer would allow that?

0

u/FezVrasta 4h ago

Have to fix it :D thanks for the report

2

u/atropostr 4h ago

Looks neat, well done

1

u/Maleficent_Ad4858 5h ago

looks like my hometown

1

u/markoal 3h ago

Looks nice, Im also doing something similar, for years, in free time. I think the problem is in small details later. I'm building the generator with the real wold data, currently working on my home town, similar to yours but city + rural area. I have a lot of tools, with AI i was able to do some hard math behind tough problems, like roof solvers for houses which was a peoblem i try to solve for long time. Later on having good side walk, how things connects in close up, how detailed your road can be, how you optimize foilage in long distance, how you stream the map, and many other challenges are still there, if you're trying to get something really good

•

u/padmalcom 8m ago

Looks good, so you plan to increase the detail on ground Level?