Repository navigation
generated_nebula.tbl
Revision information OFP Revision: #77 Set the revision to your PR when your PR changes what this page documents. Leave it alone for edits that only fix or improve the documentation.
This table exists only in OFP.
The generated_nebula.tbl defines the patterns and colors of the generated nebula: a soft cloud backdrop drawn on a sphere behind the stars, the modern version of FreeSpace 1's background nebula. A mission picks one pattern and one color (see Using it in a mission).
This table is one of the Modular Tables and can be extended with xxx-gneb.tbm.
Code: /starfield/nebula.cpp. See Tables for every table.
The engine includes a built-in copy of this table with FS1's three patterns (Nebula01, Nebula02, Nebula03) and nine colors. A mod that ships its own generated_nebula.tbl replaces the built-in copy entirely; a *-gneb.tbm adds to it or overrides entries by name.
- Format
- #Generated Nebula Colors
- #Generated Nebula Patterns
- Loading rules
- How a pattern is drawn
- Using it in a mission
- Sample
Field index (every field, one per line in table order; click one to jump to it)
- The table has two sections,
#Generated Nebula Colorsand#Generated Nebula Patterns, each ending with#End. - Either section may come first, and either may be left out, so a
*-gneb.tbmcan carry just colors or just patterns. - Entries begin with
$Name:. Every other field is optional, but the fields an entry does use must appear in the order listed on this page. - Anything after the last
#Endis reported as a table error.
- Section header for the tint colors. Ends with
#End.
- The name of the color. Missions refer to it in
+Color:. - Names are case-insensitive. Using an existing name overrides that color.
- Syntax: String
- The color of the brightest parts of the nebula. Dimmer parts fade evenly toward black.
- Each value is clamped to 0 to 255.
- The built-in colors are FS1's exactly. Each FS1 mission palette held a 20-step ramp from black to one color, and
+RGBis that ramp's brightest entry. -
Default:
255 255 255 -
Syntax: Integer list,
red green blue
| Built-in color | +RGB |
|---|---|
| Red | 151 0 0 |
| Blue | 0 55 183 |
| Gold | 107 91 27 |
| Purple | 107 0 95 |
| Maroon | 107 0 39 |
| Green | 0 95 0 |
| Grey blue | 0 67 91 |
| Violet | 63 51 79 |
| Grey Green | 0 87 63 |
- Section header for the patterns. Ends with
#End.
- The name of the pattern. Missions refer to it in
+Nebula:. - Names are case-insensitive. Using an existing name overrides that pattern, changing only the fields the entry lists.
- Syntax: String
-
YESdraws only the placed clouds, with no procedural background. -
Default:
NO - Syntax: Boolean
- How much the pattern's noise breaks up the placed clouds:
0leaves them as smooth soft shapes,1carves them into ragged wisps. The clouds keep about the same overall brightness either way. - Clamped to 0 to 1.
-
Default:
0.35 - Syntax: Float
- A placed cloud: a soft ellipse on the nebula. Repeat the field once per cloud.
- Listing any
+Cloud:in an entry replaces that pattern's whole cloud list, so an override restates every cloud it wants. -
Syntax: Float list,
lon lat width height angle brightness- lon: center longitude in degrees, 0 to 360. It wraps, so a cloud can cross the seam.
- lat: center latitude in degrees, -90 to 90.
- width: size across, in degrees of longitude, measured where the cloud is at half its peak brightness.
- height: size along the other axis, on the same scale as width.
- angle: rotation of the ellipse, in degrees.
- brightness: peak brightness, 0 to 1. Where clouds overlap, their brightness adds up, capped at 1.
- Procedural background: roughly how much of the sky has bright patches, 0 to 1.
-
Default:
0.30 - Syntax: Float
- Noise frequency around the sphere and from pole to pole. Unequal values stretch the noise into streaks.
- Each value is clamped to 0.1 to 64.
-
Default:
2 5 -
Syntax: Float list,
around along
- Layers of noise detail. Fewer gives broader, smoother masses; more gives a busier look.
- Clamped to 1 to 8.
-
Default:
4 - Syntax: Integer
- How much the noise is swirled, stretching it into wisps.
- Clamped to 0 to 8.
-
Default:
0.4 - Syntax: Float
- Procedural background: the falloff curve of the bright patches. Higher values give tighter, harder-edged patches.
- Clamped to 0.05 to 10.
-
Default:
1.5 - Syntax: Float
- Overall brightness multiplier for the whole pattern.
0turns it off. -
Default:
1 - Syntax: Float
- Noise seed. Patterns with the same settings and different seeds look different.
- Clamped to -1000000 to 1000000.
-
Default:
0 - Syntax: Integer
- How finely the background sphere is built, around and from pole to pole. The brightness is drawn per pixel either way, so this only affects how round the sphere is.
-
Default:
24 12 -
Syntax: Integer list,
around along
- The part of the sphere covered, from 0 (one pole) to 1 (the other).
-
Default:
0 1 -
Syntax: Float list,
start end
- The game's own
generated_nebula.tbl, if it has one, otherwise the built-in copy. - Then every
*-gneb.tbm, in the usual modular table order. A$Name:that already exists is overridden in place; a new name adds an entry.
- A pattern has two layers:
- a procedural background made from noise (
+Densitythrough+Seed), unless+Clouds Onlyis set; - the placed clouds (
+Cloud), broken up by the same noise according to+Cloud Detail.
- a procedural background made from noise (
- The layers are combined with a screen blend, so clouds brighten the background without clipping to flat white.
- The result is tinted by the mission's color, baked into a 1024 x 512 texture, and drawn additively on a sphere behind the stars and in front of the skybox.
- The built-in patterns are clouds only, laid out to match where FS1's originals had their bright regions.
The mission's #Background bitmaps section picks the pattern and color with the existing FS1 fields, and an OFP field turns it on:
| Field | Meaning |
|---|---|
+Nebula: |
Pattern name |
+Color: |
Color name |
+Pitch:, +Bank:, +Heading:
|
Orientation, in degrees |
+Generated Nebula: true |
|
+Generated Nebula: exists because many missions saved by older FRED versions carry an unchosen +Nebula: Nebula01 and +Color: Blue. Those missions stay as they always were.
In qtFRED, set all of this in the Background Editor's Generated BG Nebula group: tick Generated Nebula, then choose the pattern, color and orientation. The viewport shows the nebula as you edit. It isn't available while Full Nebula is on.
Pattern or color names that the current tables don't define are kept and written back unchanged when the mission is saved.
#Generated Nebula Colors
$Name: Teal
+RGB: 0 140 130
#End
#Generated Nebula Patterns
;; a fully procedural pattern
$Name: Drift
+Density: 0.4
+Frequency: 3 6
+Octaves: 3
+Warp: 0.6
+Seed: 7
;; placed clouds over a faint background
$Name: Twin Streaks
+Cloud Detail: 0.5
+Cloud: 90 10 70 12 15 0.8
+Cloud: 250 -20 60 10 170 0.6
+Density: 0.2
+Intensity: 0.8
#End
Getting Started
Features
SEXPs
Lua Scripting
Tables
-
Tables
- ai.tbl
- Animation (-anim.tbm)
- armor.tbl
- asteroid.tbl
- autopilot.tbl
- cheats.tbl
- colors.tbl
- controlconfigdefaults.tbl
- coordinate_points.tbl
- credits.tbl
- curves.tbl
- cutscenes.tbl
- Decals (-dcl.tbm)
- default_settings.tbl
- Dynamic SEXPs (-sexp.tbm)
- editor.tbl
- fireball.tbl
- fonts.tbl
- game_settings.tbl
- generated_nebula.tbl
- glowpoints.tbl
- help.tbl
- hud_gauges.tbl
- icons.tbl
- iff_defs.tbl
- intel.tbl
- lighting_profiles.tbl
- lightning.tbl
- mainhall.tbl
- medals.tbl
- messages.tbl
- mflash.tbl
- mission_profiles.tbl
- music.tbl
- nebula.tbl
- objecttypes.tbl
- Particle Effects (-part.tbm)
- post_processing.tbl
- props.tbl
- rank.tbl
- scripting.tbl
- ships.tbl
- sounds.tbl
- species_defs.tbl
- ssm.tbl
- stars.tbl
- strings.tbl
- tips.tbl
- traitor.tbl
- tstrings.tbl
- virtual_pofs.tbl
- weapons.tbl