Class NoiseComponent
java.lang.Object
gaiasky.scene.record.NamedComponent
gaiasky.scene.record.NoiseComponent
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable, IComponent
-
Field Summary
FieldsModifier and TypeFieldDescriptionfloatBase level for noise.com.badlogic.gdx.graphics.glutils.FrameBuffercom.badlogic.gdx.graphics.glutils.FrameBufferdoublebooleanGenerate emissive map (lights).doublefloatLatitude influence on the temperature.intdoublefloatThe height at which plains end, in the [0,1] range.floatSlope of plains.booleanRemap after base level operation.booleandouble[]floatbooleanbooleanfloatFrequency of the warp noise.floatStrength of the domain warping.Fields inherited from class NamedComponent
name -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcopyFrom(NoiseComponent other) voiddispose()com.badlogic.gdx.graphics.glutils.FrameBuffergenerateClouds(int N, int M, float[] color) com.badlogic.gdx.graphics.glutils.FrameBuffergenerateMask(int N, int M) Generates the mask, which is a single low-resolution texture for the water/land areas.com.badlogic.gdx.graphics.glutils.FrameBuffergenerateProceduralSurface(int N, int M, String biomeLUT, float lutHueShift, float lutSaturation, int channels, boolean generateNormalMap) Generates the procedural surface (merged old biome and surface shaders).voidprint(Logger.Log log) voidrandomizeAlien(Random rand) Randomizes the noise component parameters to generate an alien planet.voidrandomizeDesert(Random rand) Randomizes the noise component parameters to generate a desert planet.voidrandomizeEarthLike(Random rand) Randomizes the noise component parameters to generate an Earth-like planet.voidrandomizeForClouds(Random rand) Randomizes the noise component for cloud generation.voidrandomizeForTerrain(Random rand) Randomizes the noise component for terrain generation.voidrandomizeGasGiant(Random rand) Randomizes the noise component parameters to generate a Gas giant.voidrandomizeMask(Random rand) Randomizes the noise component parameters for a high-level land/sea mask.voidrandomizeRockyPlanet(Random rand) Randomizes the noise component parameters to generate a rocky planet.voidrandomizeSnowPlanet(Random rand) Randomizes the noise component parameters to generate a Snow planet.voidrandomizeTropical(Random rand) Randomizes the noise component parameters to generate a tropical island planet.voidsetBaseLevel(Double value) voidsetFrequency(Double frequency) voidsetGenEmissiveMap(Boolean value) voidsetLacunarity(Double lacunarity) voidsetLatitudeInfluence(Double value) voidsetOctaves(Long octaves) Sets the number of octaves.voidsetPersistence(Double persistence) voidsetPlainsHeight(Double value) voidsetPlainsSlope(Double value) voidvoidvoidsetScale(double[] noiseScale) voidvoidvoidvoidvoidvoidvoidsetWarpFrequency(Double value) voidsetWarpStrength(Double value) Methods inherited from class NamedComponent
createCubeSphereParameters, createIcoSphereParameters, createOctahedronSphereParameters, createUVSphereParameters, gaussian, gaussian, gaussian, initialize, uniformModifier and TypeMethodDescriptioncreateCubeSphereParameters(long divisions, double diameter, boolean flip) createIcoSphereParameters(long recursion, double diameter, boolean flip) createOctahedronSphereParameters(long divisions, double diameter, boolean flip) createUVSphereParameters(long quality, double diameter, boolean flip) protected doubleprotected doubleprotected doublevoidinitialize(String name) protected double
-
Field Details
-
scale
public double[] scale -
octaves
public int octaves -
persistence
public double persistence -
frequency
public double frequency -
lacunarity
public double lacunarity -
type
-
seed
public float seed -
turbulence
public boolean turbulence -
ridge
public boolean ridge -
smoothing
public boolean smoothing -
baseLevel
public float baseLevelBase level for noise. Strip everything below, then remap or clamp result. -
latitudeInfluence
public float latitudeInfluenceLatitude influence on the temperature. Only for procedural surfaces (no clouds). -
remap
public boolean remapRemap after base level operation. -
plainsHeight
public float plainsHeightThe height at which plains end, in the [0,1] range. -
plainsSlope
public float plainsSlopeSlope of plains. Lower values produce flatter plains, while higher values produce steeper plains. -
warpStrength
public float warpStrengthStrength of the domain warping. -
warpFrequency
public float warpFrequencyFrequency of the warp noise. -
genEmissiveMap
public boolean genEmissiveMapGenerate emissive map (lights). -
fbMask
public com.badlogic.gdx.graphics.glutils.FrameBuffer fbMask -
fbMain
public com.badlogic.gdx.graphics.glutils.FrameBuffer fbMain
-
-
Constructor Details
-
NoiseComponent
public NoiseComponent()
-
-
Method Details
-
generateClouds
public com.badlogic.gdx.graphics.glutils.FrameBuffer generateClouds(int N, int M, float[] color) -
generateMask
public com.badlogic.gdx.graphics.glutils.FrameBuffer generateMask(int N, int M) Generates the mask, which is a single low-resolution texture for the water/land areas.- Parameters:
N- The width in pixels.M- The height in pixels.- Returns:
- The mask buffer.
-
generateProceduralSurface
public com.badlogic.gdx.graphics.glutils.FrameBuffer generateProceduralSurface(int N, int M, String biomeLUT, float lutHueShift, float lutSaturation, int channels, boolean generateNormalMap) Generates the procedural surface (merged old biome and surface shaders).- Parameters:
N- The width in pixels.M- The height in pixels.biomeLUT- LUT for the biome.channels- The number of noise channels (1: elevation, 2: moisture, 3: temperature).generateNormalMap- Whether to generate a normal map.- Returns:
- The frame buffer with all the render targets.
-
setType
-
setScale
-
setScale
public void setScale(double[] noiseScale) -
setOctaves
-
setPersistence
-
setFrequency
-
setLacunarity
-
setSeed
-
setSeed
-
setSmoothing
-
setTurbulence
-
setRidge
-
setBaseLevel
-
setRemap
-
setLatitudeInfluence
-
setPlainsHeight
-
setPlainsSlope
-
setWarpStrength
-
setWarpFrequency
-
setGenEmissiveMap
-
copyFrom
-
randomizeForTerrain
Randomizes the noise component for terrain generation.- Parameters:
rand- The RNG.
-
randomizeForClouds
Randomizes the noise component for cloud generation.- Parameters:
rand- The RNG.
-
randomizeRockyPlanet
Randomizes the noise component parameters to generate a rocky planet.- Parameters:
rand- The RNG.
-
randomizeMask
Randomizes the noise component parameters for a high-level land/sea mask.- Parameters:
rand- The RNG.
-
randomizeEarthLike
Randomizes the noise component parameters to generate an Earth-like planet.- Parameters:
rand- The RNG.
-
randomizeAlien
Randomizes the noise component parameters to generate an alien planet.- Parameters:
rand- The RNG.
-
randomizeDesert
Randomizes the noise component parameters to generate a desert planet.- Parameters:
rand- The RNG.
-
randomizeTropical
Randomizes the noise component parameters to generate a tropical island planet.- Parameters:
rand- The RNG.
-
randomizeSnowPlanet
Randomizes the noise component parameters to generate a Snow planet.- Parameters:
rand- The RNG.
-
randomizeGasGiant
Randomizes the noise component parameters to generate a Gas giant.- Parameters:
rand- The RNG.
-
print
-
dispose
public void dispose()
-