ProceduralPlanets

◆ TextureLODClouds

int [] ProceduralPlanets.PlanetManager.TextureLODClouds
staticgetset

Gets or sets the texture LOD Clouds texture resolutions array.

The Clouds texture defines the clouds around a planet. It is generally important to keep the Clouds texture as high of a resolution as you can since it is not tiled as frequently as, for example, the Biome textures.

If you can only have a few textures at a higher resolution, make it the Clouds texture and the Compositionns texture.

Array size must be same as TextureLODSteps property.

Valid values in the array are 0 (16 x 16) - 7 (2048 x 2048).

0 - 16 x 16 pixels,
1 - 32 x 32 pixels,
2 - 64 x 64 pixels,
3 - 128 x 128 pixels,
4 - 256 x 256 pixels,
5 - 512 x 512 pixels,
6 - 1024 x 1024 pixels,
7 - 2048 x 2048 pixels

The texture LOD Composition array.



using System.Collections;
// This example requires a PlanetManager instance to be present in the scene.
// Add the "Procedural Planets/Prefabs/PlanetManager" prefab to the scene first.
// Then create another gameobject and attach this example script to it.
public class Example : MonoBehaviour
{
void Start()
{
// Create a random planet at the center of the scene
PlanetManager.CreatePlanet(Vector3.zero);
// Set planet texture detail mode to LOD (texture resolution for all planet textures are independently
// generated at a level of detail specified for a given size of the planet on the screen.
PlanetManager.TextureDetailMode = PlanetManager.TextureDetailModes.LOD_Separate;
// Set number of LOD steps to 5.
PlanetManager.TextureLODSteps = 5;
// Set LOD resolution array to: 7 (2048 x 2048), 6 (1024x1024), 5 (512x512), 3 (128x128), 1 (64x64)
PlanetManager.TextureLODComposition = new int[5] { 7,6,5,3,1 };
// Set the planet sizes used to transition between mesh LOD levels
// Note: There are only 4 entries in this array because it specifies the size *between* the LOD levels.
// The float values in the array represent the ratio between screen height and the height of a planet as seen by the camera.
// E.g. the value 0.5f = when the planet takes up half the screen height.
PlanetManager.TextureLODPlanetSizes = new float[4] { 0.6f, 0.4f, 0.2f, 0.05f };
}
}
See also
TextureDetailMode, TextureLODSteps, TextureLODPlanetSizes, TextureLODCommon, TextureLODComposition, TextureLODBiome, TextureLODCities, TextureLODLava, TextureLODPolarIce, TextureLODGas