Tips & Issues & Plans

These are some tips for using this asset, known issues, and future plans.

Sky/Ocean Draw Order

The sky/atmosphere and ocean are both transparent effects, so their draw order is based on the distance to the camera. However, since they're both wrapped around the planet, they have the same distance to the camera. This is an issue, because the sky should always draw on top of the ocean.

To enforce this draw order, the SgtSky component has the CameraOffset setting, which defaults to 0.1. This offset works well in most scenarios, however, for large planets like the Earth sized example below, this 0.1 offset is lost due to floating point precision issues. To fix this, an even larger offset like 1.0 is required. If your camera can fly far from the planet, then you may need an even larger value like 10.0.

The CameraOffset will move the sky a little bit toward the camera, and change the way it looks slightly. Therefore, you shouldn't use values that are too high, especially if your planet is small.

SgtSky.CameraOffset = 0.1
SgtSky.CameraOffset = 1.0

Underwater Artefact

When just below the water line of a planet, there is a thin line of flickering pixels that soon disappears when going deeper.

Landscape Global Sizes

The SgtLandscapeDetail and SgtLandscapeBiome components when using Space = Global apply detail to the whole of your planet.

This detail is tiled using the GlobalSize setting. For example, if your detail layer has a GlobalSize = 1000, and your planet has a circumference of 5000, then that detail layer will tile 5 times around your planet.

Since planets can be massive, and the detail can tile with a high frequency, the detail UV coordinates need to be baked into the planet mesh. Planet Forge bakes 4 sets of UV coordinates into your planet mesh, which can be specified using the SgtSphereLandscape component's GlobalSizes setting.

By default, GlobalSizes is X = 1 Y = 100 Z = 10,000 Z = 1,000,000

However, since there are only 4 baked UV coordinates, this means that you can't use any GlobalSize value you like for your detail layers. Indeed, the GlobalSize setting is merely a hint at the size you want the detail to appear at. The actual size will be the nearest baked UV multiplied by an integer scale.

Additionally, the GlobalSizes you specify are also just hints, because the baked UV coordinates must tile around the planet at an integer value, so if your planet has a circumference of 5000 units and you specify a GlobalSizes.w value of 6000, then it will just round to 5000.

Actual Waves

All planets that come with Planet Forge has a perfectly spherical ocean surface with only visual waves.

If you go to the SgtOcean component's SurfaceMaterial and set the Displacement setting to On, and set the SgtOcean component's WavesDisplacement setting to 1, then you can enable actual waves.

However, this is still a work in progress, and there are some artefacts, likely related to the aforementioned issue. Once these are resolved I will officially include it.

Underwater artefacts when enabling waves.

Last updated