[REFERENCE] Planet Type, Biome, Feature & Decal Blueprints

Discussion in 'Mod Discussions' started by Raevn, June 23, 2013.

  1. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    Planet Type, Biome, Feature & Decal Blueprints
    Alpha Disclaimer: This information is still being compiled, but is currently based on PA Build 51118 and may change.
    See PA Modding Changes for any changes that may have been made after this build.


    Planet Type
    Planet Types define an overall archetype for a planet, such as earth, moon, tropical and ice. Each planet type has it's own blueprint in the \PA\media\pa\terrain directory.

    Biomes
    Planet types are composed of a number of areas on the planet known as biomes. Examples of these are sand, ice, moutains, grass etc. The same biome can be used in multiple planet types, and each has it's own sub-folder and blueprint within the terrain folder.

    Biomes comprise a number of different assets: brushes (models that deform the terrain, such as moutains and crevasses), decals and features.

    Features
    Features are small objects such as trees, rocks (and wreckages) which can be interactive on a planet's surface. The placement and quantity of these is defined with the Biome blueprint.

    Decals
    Decals are textures painted onto the surface of a planet.

    File Format
    Planet types, Biomes and Features in PA are defined in .json files.

    JSON files can be opened in any text editor such as notepad, however viewing them can be difficult due to the formatting. Using a josn parser can help, such as http://jsonlint.com/, or see this thread on a tool to re-format all .json files: viewtopic.php?f=72&t=47529.

    Note that as planet generation is currently performed on the server, there is limited ability to change these blueprints until the server component is released. However, changes will show up when using the planetary editor. To add additional custom planet types, see the Planet Type & Biome Creator and [REFERENCE] Custom Planet Types & Enabling Them In Editor

    Planet Type Blueprint

    General Attributes
    Below is a list of attributes for planet type blueprints.

    "atmosphere": See Atmosphere section, below.
    "base_biome": Path (Biome). The path to a biome JSON file for the planet's default biome.
    "biomes": See Biomes section, below.
    "enable_features": Boolean. Shows or hides all features.
    "lighting": See Lighting section, below.
    "name": String. The name of the planet type.
    "water": See Water section, below.

    Atmosphere
    This section is optional. Omitting it results in no visible atmosphere for the planet.

    "color": Array (4 Floats). RGBA color values of the atmosphere surrounding the planet.
    "density": Float. How dense the planet atmosphere is

    Example atmosphere section from /pa/terrain/earth.json:
    Code:
      "atmosphere": {
        "color": [0.29, 0.72, 0.95, 0.5], 
        "density": 6.0
      }, 
    Biomes
    At least 1 biome must be present.

    "elevation": Array (3 Floats). Unknown
    "spec": Path (Biome). The path to a biome JSON file for this biome.
    "temperture": Array (3 Floats). Unknown. (Spelling mistake intentional)
    "water_distance": Array (3 Floats). Unknown

    Example biome section from /pa/terrain/earth.json (sand biome):
    Code:
      "biomes": [
        {
          "elevation": [-1, 0.2, 1], 
          "spec": "/pa/terrain/sand/sand.json", 
          "temperture": [0.0, 1, 1], 
          "water_distance": [null, 40, 1]
        }, 
      ],
    Lighting
    There are two parts to the Lighting attribute: ambient and sun.

    "ambient": -> "back": Array(3 Floats). TODO
    "ambient": -> "directional_intensity": Float. TODO
    "ambient": -> "front": Array(3 Floats). TODO
    "ambient": -> "in": Array(3 Floats). TODO
    "ambient": -> "intensity": Float. TODO
    "ambient": -> "out": Array(3 Floats). TODO
    "ambient": -> "radial_intensity": Float. TODO
    "sun": -> "diffuse": Array(3 Floats). TODO
    "sun": -> "intensity": Float. TODO
    "sun": -> "specular": Array(3 Floats). TODO

    Example lighting section from /pa/terrain/earth.json:
    Code:
      "lighting": {
        "ambient": {
          "back": [0.7, 0.7, 0.8], 
          "directional_intensity": 0.8, 
          "front": [0.5, 0.5, 0.6], 
          "in": [-0.3, -0.3, -0.2], 
          "intensity": 1.0, 
          "out": [0.3, 0.3, 0.4], 
          "radial_intensity": 0.5
        }, 
        "sun": {
          "diffuse": [1.0, 1.0, 0.7], 
          "intensity": 1.1, 
          "specular": [0.2, 0.2, 0.2]
        }
      }, 
    Water
    This section is optional. Omitting it results in the planet having no water.

    "shader": String. The name of a shader to use for the water.
    "textures": -> "DepthColorTexture": Path (Texture). A 64x1 pixel texture to use as the color for varying water depths (left is shallow, right is deep)
    "textures": -> "DiffuseTexture": Path (Texture). The general texture to use for the surface of the water.
    "textures": -> "NoiseTexture": Path (Texture). The noise texture to use for the surface of the water.
    "textures": -> "NormalTexture": Path (Texture). The normal texture to use for the surface of the water.

    Example water section from /pa/terrain/earth.json:
    Code:
      "water": {
        "shader": "planet_liquid_transparent", 
        "textures": {
          "DepthColorTexture": "/pa/effects/textures/waterDepthColor.png", 
          "DiffuseTexture": "/pa/effects/textures/waterDiffuse.png", 
          "NoiseTexture": "/pa/effects/textures/CloudNoise.png", 
          "NormalTexture": "/pa/effects/textures/waterNormal.png"
        }
      }
    lulamae and Quitch like this.
  2. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    Re: [REFERENCE] Biome & Feature Blueprints

    Biome Blueprint

    General Attributes
    Below is a list of attributes for biome blueprints.

    "base_texture": String. TODO
    "brushes": See Brushes section, below.
    "color": TODO
    "decals": See Decals section, below.
    "features": See Features section, below.
    "layers": See Layers section, below.
    "name": String. TODO
    "normal_texture": String. TODO

    Brushes
    Brushes are the 3D models that form fixed terrain features, such as chasms, plateus etc.

    "bias": Integer. Unknown
    "brush_spec": Path (Brush). The path to a brush JSON file for this brush.
    "layer": Integer. The layer number this brush appears on.
    "op": String. How the brush is incorporated into the planet. Accepted Values:
    • BO_Add
    • BO_Subtract
    "scale": Array (3 Floats). The XYZ scaling of the brush mesh.
    "simplex_range": Array (2 Floats). Unknown
    "threshold": Integer. Unknown
    "weight": Float. Unknown

    Example brush section from /pa/terrain/grass/grass.json:
    Code:
      "brushes": [
        {
          "bias": 1, 
          "brush_spec": "/pa/terrain/grass/brushes/grass_hill_01.json", 
          "layer": 0, 
          "op": "BO_Add", 
          "proj": "BP_Bend", 
          "scale": [1, 1, 1], 
          "simplex_range": [0.2, 0.21], 
          "threshold": 1, 
          "weight": 1.0
        }, 
    Decals
    TODO

    Features
    TODO

    Layers
    TODO
    Quitch likes this.
  3. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    Re: [REFERENCE] Biome & Feature Blueprints

    Features

    General Attributes
    Below is a list of attributes for features. Not all features will have all of these; any missing values may inherit from a base class (see base_spec)

    "base_spec": String. File path to inherited blueprint. Any values not present in a blueprint will use the values in the blueprint defined in base_spec.
    "burns": Boolean. Unknown. Possibly determines whether the unit catches fire (like trees in TA)
    "max_health": Integer. The health of the feature.
    "metal_rate": Integer. Unknown. Possibly controls metal extractor output?
    "metal_value": Integer. The reclaim value of the feature, if reclaimable = true.
    "model": See Model section, below.
    "reclaimable": Boolean. Whether the feature can be reclaimed or not.

    Model
    The model field has the following attributes:

    "filename": String. The filename of the feature model.
    "arrows": See this post.
    Quitch likes this.
  4. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    Re: [REFERENCE] Planet Types, Biomes, Feature & Decal Bluepr

    <reserved>
  5. aevs

    aevs Post Master General

    Messages:
    1,051
    Likes Received:
    1,150
    Something that's been bugging me about biomes and brushes; there's quite a bit of missing information regarding a few attributes.
    • The layers section isn't entirely self explanatory (inherit_noise, zoom, scale, simplex_persistence, etc.)
    • It's not entirely clear how the weight, weight_hard, weight_scale, sample_scale and threshold attributes work. I can guess at a few of them, but they all work together so it's hard to test their effects.
    • Bias isn't explained; I'm assuming higher bias means a brush is placed sooner that brushes with lower bias, but I'm just guessing there.
    I'd like to tweak the settings of some brush placements, but without more information on these attributes, I'm kinda taking shots in the dark here.

Share This Page