Class NoiseComponent

java.lang.Object
gaiasky.scene.record.NamedComponent
gaiasky.scene.record.NoiseComponent
All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable, IComponent

public class NoiseComponent extends NamedComponent
  • 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

      public NoiseFilter.NoiseType 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, and fbBiome 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

      public void setType(String noiseType)
    • setFractalType

      public void setFractalType(String ignoredFractalType)
    • setFractaltype

      public void setFractaltype(String fractalType)
    • setScale

      public void setScale(Double scale)
    • setScale

      public void setScale(double[] noiseScale)
    • setOctaves

      public void setOctaves(Long octaves)
      Sets the number of octaves.
      Parameters:
      octaves - The octaves.
    • setAmplitude

      public void setAmplitude(Double amplitude)
    • setPersistence

      public void setPersistence(Double persistence)
    • setFrequency

      public void setFrequency(Double frequency)
    • setLacunarity

      public void setLacunarity(Double lacunarity)
    • setPower

      public void setPower(Double power)
    • setNumTerraces

      public void setNumTerraces(Long numTerraces)
    • setTerracesExp

      public void setTerracesExp(Double terracesExp)
    • setTerraceSmoothness

      public void setTerraceSmoothness(Double terracesExp)
    • setRange

      public void setRange(double[] range)
    • setSeed

      public void setSeed(Long seed)
    • setSeed

      public void setSeed(Double seed)
    • setTurbulence

      public void setTurbulence(Boolean t)
    • setRidge

      public void setRidge(Boolean t)
    • copyFrom

      public void copyFrom(NoiseComponent other)
    • randomizeAll

      public void randomizeAll(Random rand)
    • randomizeAll

      public void randomizeAll(Random rand, boolean clouds)
    • randomizeRockyPlanet

      public void randomizeRockyPlanet(Random rand)
    • randomizeEarthLike

      public void randomizeEarthLike(Random rand)
    • randomizeSnowPlanet

      public void randomizeSnowPlanet(Random rand)
    • randomizeGasGiant

      public void randomizeGasGiant(Random rand)
    • print

      public void print(Logger.Log log)
    • dispose

      public void dispose()