ProceduralPlanets

◆ TextureDetailMode

TextureDetailModes ProceduralPlanets.PlanetManager.TextureDetailMode
staticgetset

Texture detail mode specifies how textures should be generated. Planets consists of multiple textures (e.g. Composition Texture, 2 x Biome Textures, Clouds Texture, etc.).

Static: All textures for planet have a fixed resolution.


Static_Separate: Different textures for planets have individually fixed resolutions. Progressive: All textures for a planet have the same resolution but iteratively improves when planet is created to give fast load time. Progressive_Separate: Textures iteratively improves with independently controlled progression for different planet textures. LOD: All textures have the same resolution but varies based on Level of Detail (LOD) which determines and updates textures based on how large the planet is visibly on the screen. LOD_Separate: Textures have independently controlled Level of Detail (LOD) resolutions to determine and update textures based on how large the planet is visibly on the screen.

Note: Changing the TextureDetailMode forces rebuild of all planet textures.



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;
}
}
See also
TextureStaticCommon, TextureStaticComposition, TextureStaticBiome, TextureStaticClouds, TextureStaticCities, TextureStaticLava, TextureStaticPolarIce, TextureStaticGas

> > > > > > > >