Jump to content

[Discussion] Feasibility Study of procedurally-generated Kerbal civilization


sumghai

Recommended Posts

Premise

One thing I've always felt that was missing from KSP since its inception was the depiction of the Kerbal civilization itself - namely, towns and cities where the civilian population live on Kerbin.

There have been a number of fanon explanations, such as Kerbals being sentient plants that don't need accommodation, Kerbals living underground in fear of falling debris from exploding rockets, or Kerbals as a stranded species trying to return to their homeworld; however, none adequately explain why the Kerbal Space Center itself is built above ground, in an architectural and ergonomic manner suited to surface-dwelling upright biped hominids.

Personally, I prefer to consider the current state of affairs as being based on the concept of Last Thursdayism (or Last Updatism), in which the history and circumstances of Kerbal society is subject to retroactive redefinition (with each update), so it could very well be that Kerbals have always lived in above-ground cities, towns and population centers - it's just that we haven't noticed yet.

Purpose of Thread

The main aim is to devise a procedural city system / plugin to depict a plausible society from which the titular Space Program would have been based from, for the purposes of in-game exploration.

In addition to functioning as a add-on request, I'll also be using this topic to gather ideas / expertise to determine the feasibility of the idea, as well as what parameters the majority of the userbase would find acceptable in procedurally-generated cities.

Literature Review of Current Community Implementations

One of the earliest attempts at implementing Kerbal buildings and cities, this plugin by Razchek used PQSCity to allowed users to directly spawn custom models/objects into the enviroment at desired location(s), and was the basis of a number of community projects. The most famous of these was
, where contributors were assigned plots in which they could design buildings and other architectural wonders.

The main advantage of KerbTown was the ease of customisability in the selection / placement of models, allowing users with different headcanon to fashion the surface of Kerbin their own way. However, the problems with this approach were mostly logistical as well as technical (manual placement of each model severely restricts scalability of the system; Kerbin City's reliance on a central project manager to vet contributions caused delays in updates; individual sites were too small and sparse to be viewable from Low Kerbin Orbit; gradual lack of interest by their respective developers / maintainers led to their demise)


The successor to KerbTown, actively maintained by AlphaAsh. It similarly permits direct placement of static models/object into the environment, but is heavily advertised as being able to provide a wide range of alternative launch/landing sites for rockets and spaceplanes. As with KerbTown, Kerbin-Side structures tend to be sparse, lacks scalability required for population centers, and are not easily viewable from LKO.


Developed by rbray89, this plugin adds layers of cloud cover and city lights to Kerbin, viewable from the air and Low Kerbin Orbit (LKO). This purely visual approach quickly permits the entire surface of Kerbin to be covered with faux city lighting to emulate major and minor population centers, without the need for physical models. Unfortunately, at lower altitudes and at ground level, such effects disappear, resulting in situations where a city visible from the air would appear as empty grasslands to a rover at the same location.


As a precursor / side project to EnvironmentalVisualEnhancements, rbray89 also experimented with procedural city generation. Despite the rudimentary nature of the building models (high-rises only) and the lack of roads, rbray89 successfully demonstrated the scalability of the concept, as well as procedural generation of the corresponding city lights emissives, allowing visibility of population centers from both ground level, high altitudes and LKO. Unfortunately, development appears to have been stalled as of September 2014, and there have been no WIP releases.


Developed at roughly the same time as Kerbin Real-Estate, tobyb121's proof-of-concept also included procedurally-generated roads and intersections, automated block subdivision, building height scaling dependent on proximity to city centre, and simple box colliders to allow interaction with player-built vessels. However, scalability of population centers and visibility from high altitudes / LKO has not been sufficiently demonstrated, and while there had been one WIP release, development also faltered at around the same time as the demise of Kerbin Real-Estate.

Primary Goals of Proposed System

- A hybrid approach, consisting of city light emissives visible from medium-to-high altitudes/orbit, transitioning smoothly to static physical models visible at low altitudes/ground level

- Procedural generation from a seed value (as opposed to randomized ground scatter), to permit easy customisation as well as sharing between savegames / scenarios

- Low impact on physics

- Building and scenery generated from a small library of common assets (models / textures)

Basic Implementation Details

- A typical city is not a plot of land solely comprised of skycrapers, nor is it houses randomly spread across the entire landscape ; instead, population centers propagate out from a focal point, with administrative and commercial districts concentrated in the city center in neat grid-like patterns, surrounded immediately by suburbs arranged semi-organically, while farms and industrial complexes tend to lie on the outskirts.

- The size of population centers should vary between major cities with skyscrapers, small towns and rural villages.

- For the most part, the art style of buildings should be similar to what is used for the Kerbal Space Center, with medium fidelity visual meshes and details such as fire escapes, HVAC units, awnings, balconies etc. Most metropolitan buildings could, in fact, directly use the existing stock KSC textures, with variations created by having the plugin re-colorize selected elements without the need for additional textures.

- Physics colliders should be simplified to bounding boxes; skycrapers of varying heights may have individual bounding boxes, while entire blocks / streets of suburban houses of similar height may share a single box collider. As such, Kerbalnauts will have no access to staircases or balconies, but should be able to walk down major streets just fine.

- Vessel/debris collision with buildings would result in affected structures and nearby areas within a certain radius being temporarily replaced by a universal, generic rubble pile and fire/smoke effects, before being fully regenerated within five minutes; no complex building destruction animations are required

- At high altitudes, models should be unloaded (since they'd be ridiculously small too be visible), and replaced with a generic, greyish tiled pattern of "streets" (augmented by city lights at nighttime)

Effects of Biomes on Procedural City Generation

- Most major population centers would typically be located in the grasslands, and in areas with relatively little variation in topography; town and villages may be found in both grasslands and highlands, while very small settlements may be found in lower altitudes of mountainous or warmer tundra regions

- If a major city is located near coastal and ocean biomes, it is likely to have a harbour/port to faciliate trading

- [sTRETCH GOAL] Biomes may also influence the art / architectural style of population centers; for instance, cities and towns in desert biomes by take on a Middle Eastern flavour, while those in tundra and adjacent grassland regions may resemble Eastern European/Russian architecture.

Allowances / Support for other Add-ons

- Users should obviously be able to substitute building asset models for the procedually-generated population centers, or to specify what assets should be included for generation (e.g. Maybe for a certain savegame, the user doesn't want regional/ethnic variations in buildings)

- skykooler has proposed an improved ground scatter system for foliage, and the proposed procedural city generation system should obviously be compatible with his work; the combined system would either prioritize city placement (in which case there may be a handful of forest areas left as nature reserves) or foliage placement (in which case cities would be built around existing forest areas)

- Allowances need to be made for special structures placed by Kerbin-Side, such as monuments, sports stadiums, alternative launch sites or government administrative buildings. If these special structures are located within or near major population centers, the procedural building and road generation must adapt to seamlessly include them. Kerbin-Side structures should retain their own instrinsically high level of visual / physical fidelity (i.e. a Kerbalnaut might not be able to walk up the steps of a generic apartment block, but s/he should be able to explore the insides of a Kerbin-Side airport just fine)

Acknowledgements

Kagame - clever reuse of stock KSC textures, replacing models with 2D generic street textures at medium-to-high altitudes.

Final Thoughts

This is a Working Document - suggestions, ideas and critiques are welcomed.

Edited by sumghai
Added Kagame's suggestions
Link to comment
Share on other sites

I'd like to see this too.

ON VISIBILITY FROM ORBIT:

This would require two things: an EVE dependency for night-time city visibility, and either the TextureReplacer mod or a properly made up plugin to make the city overheads (just an overhead view of the city, as you can't see individual models from orbit- they unload at about 50KM and would be laughably puny anyways.) Probably the best bet is to just make the areas where the cities are be a kind of cold grey on the map?

ON MEMORY FOOTPRINT: This is an honorable goal. I would personally like to go all hardcore and restrict it to KSP stock textures- between the VAB, SPH, Old KSC, and Old Airfield, there's plenty of fodder for well-realized architecture.

ON BIOME-BASED SETTLEMENTS: One step at a time, man! One step at a time!

General thoughts:

If you need an artist to plan this project out, I'd be more than happy to.

Link to comment
Share on other sites

ON VISIBILITY FROM ORBIT:

This would require two things: an EVE dependency for night-time city visibility, and either the TextureReplacer mod or a properly made up plugin to make the city overheads (just an overhead view of the city, as you can't see individual models from orbit- they unload at about 50KM and would be laughably puny anyways.) Probably the best bet is to just make the areas where the cities are be a kind of cold grey on the map?

A bespoke plugin to handle as many functions as natively possible would be ideal, but some EVE integration would be acceptable.

And yeah, once the building models get unloaded, a simple tiled pattern of streets (plus emissives for city lights at night) would suffice.

ON MEMORY FOOTPRINT: This is an honorable goal. I would personally like to go all hardcore and restrict it to KSP stock textures- between the VAB, SPH, Old KSC, and Old Airfield, there's plenty of fodder for well-realized architecture.

I'm not sure if modded buildings would have direct access to KSC stock textures, but assuming that's technically possible, I think that would work fine for most metropolitan areas.

One "stretch goal" of sorts that this inspired is the ability to dynamically vary the color of certain elements - for instance, some doors could make use of the existing KSC stock textures, but dynamically recolored by the plugin (There's some libraries to do so on the Unity Asset store, but in time, we'll be able to write our own implementation from scratch).

ON BIOME-BASED SETTLEMENTS: One step at a time, man! One step at a time!

Haha, yeah, this should definitely be reserved for later versions.

General thoughts:

If you need an artist to plan this project out, I'd be more than happy to.

Most excellent - I look forward to seeing your interpretation of stockalike Kerbal civilian buildings :)

theres the cities of kerbin mod by Eskandare

He's pretty much focused on modelling, without any discussion on how they would actually be placed in-game, nor are there provisions for procedural generation.

Edited by sumghai
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...