Class NoiseComponent

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

public final class NoiseComponent extends NamedComponent
  • Field Details

    • scale

      public double[] scale
    • octaves

      public int octaves
    • persistence

      public double persistence
    • frequency

      public double frequency
    • lacunarity

      public double lacunarity
    • type

      public NoiseType type
    • seed

      public float seed
    • turbulence

      public boolean turbulence
    • ridge

      public boolean ridge
    • smoothing

      public boolean smoothing
    • baseLevel

      public float baseLevel
      Base level for noise. Strip everything below, then remap or clamp result.
    • latitudeInfluence

      public float latitudeInfluence
      Latitude influence on the temperature. Only for procedural surfaces (no clouds).
    • remap

      public boolean remap
      Remap after base level operation.
    • plainsHeight

      public float plainsHeight
      The height at which plains end, in the [0,1] range.
    • plainsSlope

      public float plainsSlope
      Slope of plains. Lower values produce flatter plains, while higher values produce steeper plains.
    • warpStrength

      public float warpStrength
      Strength of the domain warping.
    • warpFrequency

      public float warpFrequency
      Frequency of the warp noise.
    • genEmissiveMap

      public boolean genEmissiveMap
      Generate 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

      public void setType(String noiseType)
    • 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.
    • setPersistence

      public void setPersistence(Double persistence)
    • setFrequency

      public void setFrequency(Double frequency)
    • setLacunarity

      public void setLacunarity(Double lacunarity)
    • setSeed

      public void setSeed(Long seed)
    • setSeed

      public void setSeed(Double seed)
    • setSmoothing

      public void setSmoothing(Boolean t)
    • setTurbulence

      public void setTurbulence(Boolean t)
    • setRidge

      public void setRidge(Boolean t)
    • setBaseLevel

      public void setBaseLevel(Double value)
    • setRemap

      public void setRemap(Boolean remap)
    • setLatitudeInfluence

      public void setLatitudeInfluence(Double value)
    • setPlainsHeight

      public void setPlainsHeight(Double value)
    • setPlainsSlope

      public void setPlainsSlope(Double value)
    • setWarpStrength

      public void setWarpStrength(Double value)
    • setWarpFrequency

      public void setWarpFrequency(Double value)
    • setGenEmissiveMap

      public void setGenEmissiveMap(Boolean value)
    • copyFrom

      public void copyFrom(NoiseComponent other)
    • randomizeForTerrain

      public void randomizeForTerrain(Random rand)
      Randomizes the noise component for terrain generation.
      Parameters:
      rand - The RNG.
    • randomizeForClouds

      public void randomizeForClouds(Random rand)
      Randomizes the noise component for cloud generation.
      Parameters:
      rand - The RNG.
    • randomizeRockyPlanet

      public void randomizeRockyPlanet(Random rand)
      Randomizes the noise component parameters to generate a rocky planet.
      Parameters:
      rand - The RNG.
    • randomizeMask

      public void randomizeMask(Random rand)
      Randomizes the noise component parameters for a high-level land/sea mask.
      Parameters:
      rand - The RNG.
    • randomizeEarthLike

      public void randomizeEarthLike(Random rand)
      Randomizes the noise component parameters to generate an Earth-like planet.
      Parameters:
      rand - The RNG.
    • randomizeAlien

      public void randomizeAlien(Random rand)
      Randomizes the noise component parameters to generate an alien planet.
      Parameters:
      rand - The RNG.
    • randomizeDesert

      public void randomizeDesert(Random rand)
      Randomizes the noise component parameters to generate a desert planet.
      Parameters:
      rand - The RNG.
    • randomizeTropical

      public void randomizeTropical(Random rand)
      Randomizes the noise component parameters to generate a tropical island planet.
      Parameters:
      rand - The RNG.
    • randomizeSnowPlanet

      public void randomizeSnowPlanet(Random rand)
      Randomizes the noise component parameters to generate a Snow planet.
      Parameters:
      rand - The RNG.
    • randomizeGasGiant

      public void randomizeGasGiant(Random rand)
      Randomizes the noise component parameters to generate a Gas giant.
      Parameters:
      rand - The RNG.
    • print

      public void print(Logger.Log log)
    • dispose

      public void dispose()