Cities: Skylines (the Sim City we deserve)

  • Thread starter Akira AC
  • 1,530 comments
  • 129,980 views
I found the land type data and added it to the overlay I'm modelling the map from. White area is open, grey area is covered in trees.

overlay.png


Conclusion: I have a ton of trees to plant. Thinking about writing a Python script to plant them for me.
 
That would be a lot of trees. :eek: :lol:

Indeed, 176,142 trees to be precise. :cool:

Code:
>>>
 RESTART: C:\Users\Erik\Documents\Cities Skylines\Red River\forestgenerator.py
>>> planted = plantForest(f)
Forest ratio: 0.749
Forest area: 223.7 km^2
Gap between trees: 35.3 meters
176142 trees planted
>>>

Python is fantastic :D

Edit: If I plant 240,000 trees it looks like I can reduce the gap between trees to 30 meters. I doubt I'm going to place more than 10,000 trees manually anyway...
 
Last edited:
Edit: If I plant 240,000 trees it looks like I can reduce the gap between trees to 30 meters. I doubt I'm going to place more than 10,000 trees manually anyway...

It's a shame that dense tree coverage is such a hard thing to achieve in C:S. I think it was in the Parklife DLC where it gives you a variety of rock formations that can be overlapped to produce unique looking formations. They should have done a variety of tree clumps where you could do the same.
 

Primarily because I don't trust my computer to be able to handle it. But also, as I just learned from a test, that even with a script it takes quite a while to place that many trees. I think it was able to plop around 50 trees per second, so 240,000 trees is going to take an hour and twenty minutes to generate. But on the plus side it's pretty cool to watch the trees being added row by row, so it's not all bad ;)
 
I didn't expect to finish this script so soon, but sometimes everything just decides to work they way you want it to :)

It's based on the forest mask below, where areas where there shouldn't be any trees are coloured in black. By creating a histogram of the picture I could calculate the area of the forest and that way calculate a distance between the trees by dividing the area by the number of trees. Then I created a grid with this distance as the grid size, distorted it randomly to make it more natural and checked the pixel value at each point of the grid. If the pixel was white, a randomly picked tree from a selected group of tree types was planted on the location.

Iterating across the whole map took about 70-80 minutes in total.

skogmask2048.png

Here is the result, 237,000 trees planted:

full

full

full

full

full

full

full


The forest could be denser for sure, but I'm happy with the result, it looks pretty natural to me. I think the fact that the density is the same everywhere makes it look more realistic, that is something that can be really hard to achieve when placing trees manually because it's hard to be consistent with that.
 
I tweaked the forest script and recorded me replanting everything.



This time around I used two masks, one for the full forest area and a second one for the edges. The edge mask adds a bit of contrast to the transition between open area and forest and it makes the forest appear a bit thicker than it actually is.

skogmask2048.png kantmask2048.png

Because I'm using two masks I had to make sure that I didn't place overlapping trees, so I had to create a function to remove trees that were placed too close together (I used a limit of 4 meters apart). The first iteration of that script checked each tree along the edge (40,000 trees in total) against any other tree in the forest (200,000 trees in total), which resulted in 40,000*200,000 = 8 billion operations and was a huge waste of time. In the second iteration I subdivided the map into an 18x18 grid and just checked trees within the same square. That brought it all down to about 25 million operations and the job was finished in a matter of seconds.
 
I started modelling one of the bridges across the river in Blender, hoping that I can create an asset with the help of citywokcitywall's tutorial. I made the bridge one or two meters wider than in real life, just so I can fit a road across it. Still it's only 7 meters wide, so it's a bit of a gamble given that a basic vanilla road has a width of 16 meters.

bro_render01.png
bro_render02.png
bro_render03.png
 
Last edited:
Not the best texture work ever (GIMP was driving me crazy), but for being my first asset I'm pretty happy with the result :)

Skärmbild (470).png

Skärmbild (469).png
Skärmbild (468).png
Skärmbild (466).png
Skärmbild (465).png


The real bridge, I took this picture a few weeks ago:
bron.jpg


Actually, looking at the photo, I may have made a mistake. I made the arches circular, but it looks like they should be parabolic :embarrassed:

I'll see if I can fix that tomorrow.
 
Actually, looking at the photo, I may have made a mistake. I made the arches circular, but it looks like they should be parabolic :embarrassed:

I'll see if I can fix that tomorrow.
Mmm, if you can see a difference, :confused: and it bothers you, then change it of course, but it already looks pretty good to me. ;) 👍
 
I need to work on the top end of my town, but I've decided to use Eran's bridge to bring the traffic in from over the river. It's badly hooked up to a roundabout at the moment to keep things flowing, but once I figured out what I'm doing with the area it should be a lot better.

upload_2021-3-31_20-19-12.png


@eran0004 looks good, I'm not sure what road you favour to go with it, but in the end I PO'd it to stretch it to work with the standard 2 lane road. Needs lining up properly, but it works well.
 
I need to work on the top end of my town, but I've decided to use Eran's bridge to bring the traffic in from over the river. It's badly hooked up to a roundabout at the moment to keep things flowing, but once I figured out what I'm doing with the area it should be a lot better.

View attachment 1001289

@eran0004 looks good, I'm not sure what road you favour to go with it, but in the end I PO'd it to stretch it to work with the standard 2 lane road. Needs lining up properly, but it works well.

Looking good! I'm using one of the roads intended for pedestrians from Network Extensions 2, it's one unit wide which fits pretty nicely :)

I just finished my new map by the way, and uploaded it to the workshop: https://steamcommunity.com/sharedfiles/filedetails/?id=2443680597
I can recommend taking a walk around the forest with the first person camera mod :D Look out for the wildlife though, I placed quite a few spawn points...

Started building the village as well. One problem I ran into is that it's tricky to provide all the required services, this village ain't big enough to have its own police station and certainly not a hospital. I wish it was possible to import those services from outside connections, but perhaps I could just use service cubes instead.

Skärmbild (499).png
 
Last edited:
Haven't had much time to play this past week but the village is slowly growing. I have around 500 citizens now and all the required services have been sorted out thanks to the service cubes.

Skärmbild (503).png


Skärmbild (504).png Skärmbild (506).png
 
I've been building up a city after completing a scenario, as I usually do, and started having some issues with traffic starting to disappear if I altered a junction. The only way I found online to fix it was to restart, and that worked pretty much. Not sure what suddenly started causing the problems. :confused: The city has got quite large, 140k+, and was starting to get quite slow too, but now has started to stabilise speed wise. Again, a bit weird.

After watching a vid the other week I started putting in cycle lanes in this city, and was pleasantly surprised how well they were used. :)
 
I enjoy building these small farms and cottages scattered around the area :)

One problem I'm facing though is that the farms employ a lot of workers, so it's hard to keep them satisfied given that I've only got 500 citizens in total.

Skärmbild (513).png
Skärmbild (512).png
Skärmbild (510).png
Skärmbild (509).png
Skärmbild (508).png


I recorded a truck making a delivery to the local sheep farm. Might give you an idea of the scale of this build :)

 
Started working on a new asset: the village school. The main building is roughly 2x5 units and the gym is around 2x2 units. I might release the two buildings as separate assets, with the gym released as a miniature Sports Hall and Gymnasium to boost the health a little.

Skärmklipp.PNG
 
I've got a quote for a custom built 32gb of RAM PC with a 1050ti for £600, so fingers crossed, I can properly get into this seriously, soon.

I did have it on my stepson's PC, but we moved it into his new bedroom and now he's on Fortnite until bedtime, so it became unlikely I'd get to enjoy it in depth.

BeamNG, too. :)
 
Last edited:
Most of the school and gym has been modelled, just a couple of doors and windows remaining. I enjoy the challenge of adding detail while trying to keep the tris count low. Here is a gorgeous render with HDRI lighting and raytracing :D

render06.png
 
Currently creating textures for the new assets. I'm using a 1024x1024 texture file and half of it is taken up by the bricks.

render09.png

^ The school was built in 1956. A very typical school building for the time period, built in concrete and bricks.

render10.png

^ The gym was added in 1971, but uses the same kind of bricks as the school building, in addition to wooden panels on the walls facing east and west.

school_d.png

I'll try to make a normal map as well, hopefully it will make the panels pop out a bit more.
 
The school and the sports hall are now on the workshop! :cheers:

School: https://steamcommunity.com/sharedfiles/filedetails/?id=2458757240
Sports hall: https://steamcommunity.com/sharedfiles/filedetails/?id=2458745941

Skärmbild (523).png


I did a minimum of detailing in the asset editor so that people can add their own props and trees.

For the LOD model I used the old trick of cube-projecting the main model onto the simplest possible geometry and got the sports hall down from 849 tris to 41 tris, while the school went from 3389 tris to 94 tris.

school_lod_d.png


Edit: Did some detailing. Here is a comparison between the real location and what it looks like in game. Seems like the colours are a bit off, the concrete should be a bit brighter and the bricks a bit darker. It's tricky to get it right, because the lighting in Blender is completely different from the lighting in the game :D

Rodasel-skolan-juli2013.jpg
Skärmbild (532).png


A few more screenshots:
Skärmbild (541).png Skärmbild (535).png Skärmbild (533).png
 
Last edited:
I started working on a new map, using the heightmap of one of the Galapagos islands. I'm a bit tired of building replicas of various things (real or fictional) so for this city I think I'll build it all from my own imagination.

Skärmbild (554).png
Skärmbild (555).png Skärmbild (552).png
 
Looking good @eran0004, how long did it take you to do the School and Sports hall, all things included?

___


My progress has been slow to non-existent with Cooper County. I did start a new map just to get back to basics with the game, but since I don't use themes, the zoning was just choosing from all the assets and the neighbourhoods looked bloody awful! One house would be a 1960's British terraced house, the next would be an Alpine Ski lodge :D

I do need to get back into it though.
 
@MatskiMonk I think it took around 4-5 hours in total. The actual modeling was really fast, it's very simple geometry.

The new island map is complete! If anyone wants to give it a go you can subscribe to it here: https://steamcommunity.com/sharedfiles/filedetails/?id=2468913210

I started building already, feeling very inspired :)

As with my previous island map, there's no road connection to the outside so the harbor is the most important part of the build. I think I found a pretty good location for it.
Skärmbild (564).png
Skärmbild (563).png


I like this neighbourhood. Started with a regular grid and spiced it up a little (basically just adapted the grid to the shape of the terrain). Added a small pond and left plenty of green space.
Skärmbild (561).png


I found a nice storm-drain network on the workshop, creating a green corridor around it.
Skärmbild (560).png
 
Worked a bit on the city center and its skyline. Learned a city-building trick from Two Dollars Twenty's new Oceania series, that it's easier to start with the city center and then expand out with lower density, than to start with the lower density and then work your way towards the city center.

For this build I'm using mainly vanilla buildings (including DLC and content creator packs), it's easy to forget about them when you have a whole workshop full of assets.

Skärmbild (568).png
Skärmbild (567).png
 

Latest Posts

Back