Skip to content

Commit

Permalink
Merge branch 'Kopernicus:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
DeltaDizzy authored May 22, 2024
2 parents 82a1bc8 + 98baa3f commit 4252cf3
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
14 changes: 6 additions & 8 deletions content/Ocean.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ layout: default
title: Ocean
---

The `Ocean { }` subnode contains all of the information needed to produce an ocean for the specified body. Note that the ocean is one of the two Procedural Quad Spheres on the body it is applied to. This means that some PQS Settings can be applied to Oceans.
The `Ocean { }` subnode contains all of the information needed to produce an ocean for the specified body. Note that the ocean is one of the two Procedural Quad Spheres on the body it is applied to. This means that some PQS Settings can be applied to Oceans. If you want to set a certain ocean height, see [the note regarding Height Map offsets]({{ site.baseurl }}{% link content/PQSMods/VertexHeightMap.md %}).

**Subnodes**
* Material { }
Expand All @@ -19,11 +19,10 @@ Body
{
ocean = True
oceanColor = 0,0,1,1
oceanHeight = 100
density = 1.25
minLevel = 1
maxLevel = 6
minDetailDistance = 8
minDetailDistance = 6
maxQuadLengthsPerFrame = 0.03
Material
{
Expand Down Expand Up @@ -83,7 +82,7 @@ Body
}
Mods
{
// just put PQSMods here. WHether they work is a different story
// just put PQSMods here. Whether they work is a different story
}
Fog
{
Expand Down Expand Up @@ -113,9 +112,8 @@ Body
|--------|------|-----------|
|ocean|Boolean|Whether the ocean is enabled.|
|oceanColor|Color|The color of the ocean on the map.|
|oceanHeight|Decimal|The height of the ocean in meters.|
|density|Decimal|The density of the ocean in g/m3. 1 is the density of actual water.|
|minLevel|Integer|The PQS minimum level of triangles needed to display the ocean. Advised not to touch.|
|maxLevel|Integer|The PQS maximum level of triangles needed to display the ocean.|
|minDetailDistance|Decimal|The minimum detail distance of ???.|
|minLevel|Integer|The PQS minimum subdivision level. Advised not to touch.|
|maxLevel|Integer|The PQS maximum subdivision level.|
|minDetailDistance|Decimal|The minimum subdivision level for scatters to spawn.|
|maxQuadLengthsPerFrame|Decimal|Unknown use. Advised not to touch.|
2 changes: 1 addition & 1 deletion content/PQSMods/PQS.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Body
|--------|------|-----------|
|minLevel|Integer|The minimum level of triangles needed to render the PQS (subdivision level). Advised not to alter.|
|maxLevel|Integer|The maximum level of triangles needed to render the PQS (subdivision level). Higher levels can lead to more detailed, yet much more noisy and sharp, terrain.|
|minDetailDistance|Decimal|The minimum distance needed to render scatters?|
|minDetailDistance|Decimal|The minimum subdivision level for scatters to spawn.|
|maxQuadLengthsPerFrame|Decimal|Unknown use. Advised not to alter.|
|fadeStart|Decimal|The altitude, in meters, in which the PQS begins to fade out. Should line up with ScaledVersion's `fadeStart`.|
|fadeEnd|Decimal|The altitude, in meters, in which the PQS is fully faded. Should line up with ScaledVersion's `fadeEnd`.|
Expand Down
10 changes: 8 additions & 2 deletions content/PQSMods/VertexHeightMap.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ title: VertexHeightMap

The `VertexHeightMap` PQSMod is a mod that *adds* a given height map to the terrain. This means that height mods are additive, i.e. heightmaps don't set a fixed height.

**Notes on Heightmaps**
A common desire for planets with oceans is to set the ocean to a certain height relative to the terrain to make spots like shorelines be in the correct places. This is simple to do in 2 main steps:

1. Make sure your heghtmap is normalized (darkest value is 0 and highest is 255).
2. Set `offset` in VertexHeightMap to `-1 * (deformity * travel)`, where `travel` is the percentage of the deformity up from the lowest point of the height map that you want the sea surface to be at. For example, a `travel` of 0.5 would mean the ocean surface is at 50% grey on the height map.

**Example**
```
PQS
Expand Down Expand Up @@ -36,6 +42,6 @@ PQS
|Property|Format|Description|
|--------|------|-----------|
|map|File Path|The texture containing the height map in greyscale. Black is the `offset` height, and White is the `deformity + offset` height.|
|offset|Decimal|The offset of the height map from the body's radius.|
|offset|Decimal|The offset of the height map.|
|deformity|Decimal|The deformity of the height map (difference between lowest and highest point).|
|scaleDeformityByRadius|Boolean|Whether to multiply the deformity by the planet's radius (in case the deformity is in radii or something).|
|scaleDeformityByRadius|Boolean|Unknown|

0 comments on commit 4252cf3

Please sign in to comment.