Cities

A quieter space for design discussion of long-term projects
joonicks
Posts: 38
Joined: Thu Sep 17, 2015 7:23 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Cities

Post by joonicks » Mon Sep 21, 2015 2:34 pm

I hope to be part of making cities a more visually pleasing aspect of landing planetside.

It would be a multi-step process but some things can be done in parallell.

A) adding more buildings, variations, ..

B) altering the city generator to create more realistic layouts and taking new metadata into account

C) altering the terrain generator to create suitable landscapes underneath city layouts.

this is the metadata I have come up with so far:
mindensity, # default 0, (0-100?) city edge, small cities, single buildings, ...
maxdensity, # default 100, (0-100?) city core, high density skyscrapers

landscape: flat | sloped | any # default=any
function: industrial | business | residential | ... # default: none
faction: federation | empire | alliance | alien | ... # default: none
age: ruins | old | contemporary | modern | futuristic | ... # default: none

flags:
landmark, # default=false, should only be placed once in a city
city=__name__, # default=undefined, object can only be placed in city named __name__
atmospheric, # default=false, only placed on planets with breathable atmosphere
non-atmos, # default=false, only placed on planets entirely without atmosphere
military, # default=false, only placed in cities with military theme

# not all flags need to be set, flags are independent of eachother
# parser must handle undefined flags (futureproofing models)
# parser must handle models without any flags

example:

#
model=bigben.obj
city=london
landmark


example 2:


#
model=barn.obj
mindensity=0
maxdensity=10

function=industrial
atmospheric=true


example 3:

#
model=missilesilo.obj
military=true

FluffyFreak
Posts: 1310
Joined: Tue Jul 02, 2013 1:49 pm
Location: Beeston, Nottinghamshire, GB
Contact:

Re: Cities

Post by FluffyFreak » Mon Sep 21, 2015 3:31 pm

A) Good but this is what we need an artist for. We have city building models but we need more of them, or a way to generate buildings.
There is a word of warning here though and that is that I have optimised the city rendering quite a bit and it now uses instancing. If you add more types of buildings that means there are going to be more unique groups of buildings to render and so the size of each group goes down, reducing the effectiveness of the instanced rendering.
That will eventually reach a point where it heavily affects the rendering.

A-better) Increase the total number of types of building by a small amount, and have a few unique buildings in there too.
Create a way of generating buildings from prefab parts so that all buildings within a city are similarly customised, in the same way that apartment blocks are fairly generic but those from New York are clearly distinct in style from Shanghai.

B) I started on this, I was going to use perlin noise and a placement mask to control the height of the buildings and where they could be placed. The orientation of the buildings could be based on the gradient of the noise sampled which would make buildings face in coordinated directions. There are lots of different ways to do it though.

C) This is the hard part though a possible technique has been implemented before and so might be worth looking at.

joonicks
Posts: 38
Joined: Thu Sep 17, 2015 7:23 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Cities

Post by joonicks » Mon Sep 21, 2015 6:24 pm

I just realized "ruins" dont have to be time-related, it could be because of war.

impaktor
Posts: 892
Joined: Fri Dec 20, 2013 9:54 am
Location: Tellus
Contact:

Re: Cities

Post by impaktor » Tue Sep 22, 2015 7:24 pm

A) I'm all about getting different building sets for different factions. Like, keep the ones we have for one faction, add another set like "New York"-set you (joonicks) showed in IRC for another faction. Then fluffy's optimization stays optimized. Just something I generally have many plans on how to make the player notice they're in a new/different faction.

FluffyFreak
Posts: 1310
Joined: Tue Jul 02, 2013 1:49 pm
Location: Beeston, Nottinghamshire, GB
Contact:

Re: Cities

Post by FluffyFreak » Wed Sep 23, 2015 8:38 pm

FluffyFreak wrote: <FluffyFreak> Cities need a few things,
<FluffyFreak> 1) blending with the terrain beneath them - either modifying it or replacing it entirely.
<FluffyFreak> 2) better orientation, placement and layout
<FluffyFreak> 3) interconnection, roads, walkways etc.
<FluffyFreak> 4) interconnection between cities
<FluffyFreak> 5) more variations so we can have sets of buildings suitable for different factions and worlds
<FluffyFreak> 1 already has had a PR in the past that could be improved if someone is interested.
Just archiving here from IRC since it seems relevant.

FluffyFreak
Posts: 1310
Joined: Tue Jul 02, 2013 1:49 pm
Location: Beeston, Nottinghamshire, GB
Contact:

Re: Cities

Post by FluffyFreak » Thu Sep 24, 2015 10:23 am

I'll just ... leave this here.

DraQ
Posts: 149
Joined: Sun Mar 23, 2014 10:02 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Cities

Post by DraQ » Tue Nov 03, 2015 9:11 pm

I think having at least some larger prefabs and big structures could be a solution to at least some of the problems (both optimization and cosmetic ones, plus it's sci-fi and what's sci-fi without massive arcologies?).

It might also help with landscaping as large prefabs may include platforms extending long way down and compensating for terrain unevenness. Those platforms could involve things like multi-level streets and make cities look more involved and denser. With some creative design allowing certain objects to overlap without looking bad (for example buildings and street decks) and connect at variety of angles (basically by giving meshes sections that could stick into one another without care for exact alignment, plus maybe some helper meshes for masking seams) could also help with more organic and diverse looks, but it would require some good city generating code to use properly.

Large prefabs would also help with rendering issues that currently exist - since cities are currently just collections of comparatively tiny buildings they suddenly vanish when viewed from over 200km away or so, while ideally they should be visible even from high orbit (also can someone point me at the code that decides when to start drawing object as billboard and when to stop drawing something altogether? - me and this code have some talking to do).

FluffyFreak
Posts: 1310
Joined: Tue Jul 02, 2013 1:49 pm
Location: Beeston, Nottinghamshire, GB
Contact:

Re: Cities

Post by FluffyFreak » Tue Feb 21, 2017 4:52 pm


nozmajner
Posts: 1031
Joined: Mon Jul 01, 2013 3:25 pm
Location: Budapest HU
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Cities

Post by nozmajner » Sat May 27, 2017 2:24 pm

Just found this medieval city generator. Don't know if any source is available, but might be interesting even then.

nozmajner
Posts: 1031
Joined: Mon Jul 01, 2013 3:25 pm
Location: Budapest HU
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Cities

Post by nozmajner » Thu Jan 04, 2018 6:25 pm

Can't find if this one popped up here before, so:
https://josauder.github.io/procedural_city_generation/

Post Reply
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Who is online

Users browsing this forum: No registered users and 1 guest