Package gaiasky.scene.record
Class NoiseComponent
java.lang.Object
gaiasky.scene.record.NamedComponent
gaiasky.scene.record.NoiseComponent
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable
,IComponent
-
Field Summary
Modifier and TypeFieldDescriptiondouble
com.badlogic.gdx.graphics.glutils.FrameBuffer
com.badlogic.gdx.graphics.glutils.FrameBuffer
com.badlogic.gdx.graphics.glutils.FrameBuffer
double
boolean
double
int
int
double
double
double[]
boolean
double[]
float
float
boolean
Fields inherited from class gaiasky.scene.record.NamedComponent
name
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
copyFrom
(NoiseComponent other) void
dispose()
com.badlogic.gdx.graphics.glutils.FrameBuffer
generateBiome
(int N, int M) Generates the biome, which is a set of two textures in a frame buffer.com.badlogic.gdx.graphics.glutils.FrameBuffer
generateNoise
(int N, int M, int channels, int targets, float[] color) com.badlogic.gdx.graphics.glutils.FrameBuffer
generateSurface
(int N, int M, String biomeLut, float biomeHueShift, float biomeSaturation, boolean generateNormalMap) Generates the surface textures with this noise component.void
print
(Logger.Log log) void
randomizeAll
(Random rand) void
randomizeAll
(Random rand, boolean clouds) void
randomizeEarthLike
(Random rand) void
randomizeGasGiant
(Random rand) void
randomizeRockyPlanet
(Random rand) void
randomizeSnowPlanet
(Random rand) void
setAmplitude
(Double amplitude) void
setFractaltype
(String fractalType) void
setFractalType
(String ignoredFractalType) void
setFrequency
(Double frequency) void
setLacunarity
(Double lacunarity) void
setNumTerraces
(Long numTerraces) void
setOctaves
(Long octaves) Sets the number of octaves.void
setPersistence
(Double persistence) void
void
setRange
(double[] range) void
void
setScale
(double[] noiseScale) void
void
void
void
setTerracesExp
(Double terracesExp) void
setTerraceSmoothness
(Double terracesExp) void
void
Methods inherited from class gaiasky.scene.record.NamedComponent
createModelParameters, gaussian, gaussian, gaussian, initialize
-
Field Details
-
scale
public double[] scale -
power
public double power -
octaves
public int octaves -
amplitude
public double amplitude -
persistence
public double persistence -
frequency
public double frequency -
lacunarity
public double lacunarity -
range
public double[] range -
type
-
seed
public float seed -
turbulence
public boolean turbulence -
ridge
public boolean ridge -
numTerraces
public int numTerraces -
terracesExp
public float terracesExp -
genEmissiveMap
public boolean genEmissiveMap -
fbNoise
public com.badlogic.gdx.graphics.glutils.FrameBuffer fbNoise -
fbBiome
public com.badlogic.gdx.graphics.glutils.FrameBuffer fbBiome -
fbSurface
public com.badlogic.gdx.graphics.glutils.FrameBuffer fbSurface
-
-
Constructor Details
-
NoiseComponent
public NoiseComponent()
-
-
Method Details
-
generateNoise
public com.badlogic.gdx.graphics.glutils.FrameBuffer generateNoise(int N, int M, int channels, int targets, float[] color) -
generateBiome
public com.badlogic.gdx.graphics.glutils.FrameBuffer generateBiome(int N, int M) Generates the biome, which is a set of two textures in a frame buffer. The first render target in the frame buffer is the elevation, the second is the moisture, and the third the emission.- Parameters:
N
- The width in pixels.M
- The height in pixels.- Returns:
- The biome frame buffer, with two render targets.
-
generateSurface
public com.badlogic.gdx.graphics.glutils.FrameBuffer generateSurface(int N, int M, String biomeLut, float biomeHueShift, float biomeSaturation, boolean generateNormalMap) Generates the surface textures with this noise component. The main render target contains the diffuse texture, the second render target contains the specular texture, and the third render target optionally contains the normal texture.
Note that for this function to succeed,
generateBiome(int, int)
must have been called beforehand, andfbBiome
must be available.- Parameters:
N
- The width in pixels.M
- The height in pixels.biomeLut
- The biome look up table (LUT) path.biomeHueShift
- The LUT hue shift as an angle in degrees.biomeSaturation
- The LUT saturation value.generateNormalMap
- Whether to generate a normal map.- Returns:
- The frame buffer with all the render targets.
-
setType
-
setFractalType
-
setFractaltype
-
setScale
-
setScale
public void setScale(double[] noiseScale) -
setOctaves
Sets the number of octaves.- Parameters:
octaves
- The octaves.
-
setAmplitude
-
setPersistence
-
setFrequency
-
setLacunarity
-
setPower
-
setNumTerraces
-
setTerracesExp
-
setTerraceSmoothness
-
setRange
public void setRange(double[] range) -
setSeed
-
setSeed
-
setTurbulence
-
setRidge
-
copyFrom
-
randomizeAll
-
randomizeAll
-
randomizeRockyPlanet
-
randomizeEarthLike
-
randomizeSnowPlanet
-
randomizeGasGiant
-
print
-
dispose
public void dispose()
-