ProceduralPlanets

◆ TextureStaticComposition

int ProceduralPlanets.PlanetManager.TextureStaticComposition
staticgetset

Gets or sets texture resolution for Composition texture when TextureDetailMode is set to TextureDetailModes.Static_Separate.

All planets share this resolution for the Composition texture.

The Composition texture controls the layout of continents, mixture of biome materials, water coverage, shorelines, polar coverage and more. It is generally more important to have this texture at a higher resolution compared to Biome textures for example. If you can only have a few textures at a higher resolution, make it the Compositionn texture and the Clouds texture.

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

Note: Changing this value forces a rebuild of textures of existing planets in the scene.



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 Static (same texture resolution for all planets and textures)
PlanetManager.TextureDetailMode = PlanetManager.TextureDetailModes.Static_Separate;
// Set all planet Composition textures to level 7 (which is 2048 x 2048 pixels)
// This automatically rebuilds any textures displayed by any planet
PlanetManager.TextureStaticComposition = 7;
}
}
See also
TextureDetailMode, TextureStaticCommon, TextureStaticBiome, TextureStaticClouds, TextureStaticCities, TextureStaticLava, TextureStaticPolarIce, TextureStaticGas

> > > > > > > >