Class MaterialComponent

java.lang.Object
gaiasky.scene.record.NamedComponent
gaiasky.scene.record.MaterialComponent
All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable, IObserver, IUpdatable<MaterialComponent>, IComponent, IMaterialProvider

public class MaterialComponent extends NamedComponent implements IObserver, IMaterialProvider, IUpdatable<MaterialComponent>
  • Field Details

    • textureParamsMipMap

      protected static final OwnTextureLoader.OwnTextureParameter textureParamsMipMap
      Default texture parameters
    • textureParams

      protected static final OwnTextureLoader.OwnTextureParameter textureParams
      Default texture parameters
    • pfmTextureParams

      protected static final PFMTextureLoader.PFMTextureParameter pfmTextureParams
    • reflectionCubemap

      public static CubemapComponent reflectionCubemap
    • texInitialised

      public boolean texInitialised
    • texLoading

      public boolean texLoading
    • diffuse

      public String diffuse
    • specular

      public String specular
    • normal

      public String normal
    • emissive

      public String emissive
    • ring

      public String ring
    • height

      public String height
    • ringnormal

      public String ringnormal
    • roughness

      public String roughness
    • metallic

      public String metallic
    • ao

      public String ao
    • occlusionMetallicRoughness

      public String occlusionMetallicRoughness
    • diffuseUnpacked

      public String diffuseUnpacked
    • specularUnpacked

      public String specularUnpacked
    • normalUnpacked

      public String normalUnpacked
    • emissiveUnpacked

      public String emissiveUnpacked
    • ringUnpacked

      public String ringUnpacked
    • heightUnpacked

      public String heightUnpacked
    • ringnormalUnpacked

      public String ringnormalUnpacked
    • roughnessUnapcked

      public String roughnessUnapcked
    • metallicUnpacked

      public String metallicUnpacked
    • aoUnpacked

      public String aoUnpacked
    • occlusionMetallicRoughnessUnpacked

      public String occlusionMetallicRoughnessUnpacked
    • diffuseColor

      public float[] diffuseColor
    • specularColor

      public float[] specularColor
    • metallicColor

      public float[] metallicColor
    • emissiveColor

      public float[] emissiveColor
    • diffuseScatteringColor

      public float[] diffuseScatteringColor
    • ringDiffuseScatteringColor

      public float[] ringDiffuseScatteringColor
    • roughnessColor

      public float roughnessColor
    • heightScale

      public Float heightScale
      Height scale in internal units. The mapping value of white in the height map (maximum height value in this body). Black is mapped to 0.
    • heightSize

      public com.badlogic.gdx.math.Vector2 heightSize
    • heightData

      public IHeightData heightData
    • nc

      public NoiseComponent nc
    • diffuseSvt

      public VirtualTextureComponent diffuseSvt
    • specularSvt

      public VirtualTextureComponent specularSvt
    • heightSvt

      public VirtualTextureComponent heightSvt
    • normalSvt

      public VirtualTextureComponent normalSvt
    • emissiveSvt

      public VirtualTextureComponent emissiveSvt
    • roughnessSvt

      public VirtualTextureComponent roughnessSvt
    • metallicSvt

      public VirtualTextureComponent metallicSvt
    • aoSvt

    • svts

      public com.badlogic.gdx.utils.Array<VirtualTextureComponent> svts
    • diffuseCubemap

      public CubemapComponent diffuseCubemap
    • specularCubemap

      public CubemapComponent specularCubemap
    • normalCubemap

      public CubemapComponent normalCubemap
    • emissiveCubemap

      public CubemapComponent emissiveCubemap
    • heightCubemap

      public CubemapComponent heightCubemap
    • roughnessCubemap

      public CubemapComponent roughnessCubemap
    • metallicCubemap

      public CubemapComponent metallicCubemap
    • aoCubemap

      public CubemapComponent aoCubemap
    • aoTexture

      public com.badlogic.gdx.graphics.Texture aoTexture
    • occlusionClouds

      public boolean occlusionClouds
    • biomeLUT

      public String biomeLUT
    • biomeHueShift

      public float biomeHueShift
    • colorIfTexture

      public boolean colorIfTexture
      Add also color even if texture is present
  • Constructor Details

    • MaterialComponent

      public MaterialComponent()
  • Method Details

    • initialize

      public void initialize(String name, com.badlogic.gdx.assets.AssetManager manager)
    • initialize

      public void initialize(String name)
      Specified by:
      initialize in interface IComponent
      Overrides:
      initialize in class NamedComponent
    • isFinishedLoading

      public boolean isFinishedLoading(com.badlogic.gdx.assets.AssetManager manager)
    • hasSVT

      public boolean hasSVT()
    • initMaterial

      public void initMaterial(com.badlogic.gdx.assets.AssetManager manager, IntModelInstance instance, float[] diffuseCol, boolean culling)
    • initMaterial

      public void initMaterial(com.badlogic.gdx.assets.AssetManager manager, Material mat, Material ring, float[] diffuseCol, boolean culling)
    • setGenerated

      public void setGenerated(boolean generated)
    • getMaterial

      public Material getMaterial()
      Specified by:
      getMaterial in interface IMaterialProvider
    • getRingMaterial

      public Material getRingMaterial()
    • setBase

      @Deprecated public void setBase(String diffuse)
      Deprecated.
      use setDiffuse(String) instead
    • setDiffuse

      public void setDiffuse(String diffuse)
    • setSpecular

      public void setSpecular(String specular)
    • setSpecular

      public void setSpecular(Double specular)
    • setSpecular

      public void setSpecular(double[] specular)
    • setNormal

      public void setNormal(String normal)
    • setNight

      @Deprecated public void setNight(String emissive)
      Deprecated.
    • setEmissive

      public void setEmissive(String emissive)
    • setEmissive

      public void setEmissive(Double emissive)
    • setEmissive

      public void setEmissive(double[] emissive)
    • setDiffuseScattering

      public void setDiffuseScattering(Double diffuseScattering)
    • setDiffuseScattering

      public void setDiffuseScattering(double[] diffuseScattering)
    • setRing

      public void setRing(String ring)
    • setRingDiffuse

      public void setRingDiffuse(String ringDiffuse)
    • setRingnormal

      public void setRingnormal(String ringNormal)
    • setRingNormal

      public void setRingNormal(String ringNormal)
    • setRingDiffuseScattering

      public void setRingDiffuseScattering(Double ringDiffuseScattering)
    • setRingDiffuseScattering

      public void setRingDiffuseScattering(double[] ringDiffuseScattering)
    • setHeight

      public void setHeight(String height)
    • setHeightScaleKm

      public void setHeightScaleKm(Double heightScale)
    • setHeightScaleM

      public void setHeightScaleM(Double heightScale)
    • setHeightScale

      public void setHeightScale(Double heightScale)
    • setHeightMapTopKm

      public void setHeightMapTopKm(Double heightMapTopKm)
    • setHeightMapTopM

      public void setHeightMapTopM(Double heightMapTopM)
    • setColorIfTexture

      public void setColorIfTexture(Boolean colorIfTexture)
    • setNoise

      public void setNoise(NoiseComponent noise)
    • setBiomelut

      public void setBiomelut(String biomeLookupTex)
    • setBiomeLUT

      public void setBiomeLUT(String biomeLookupTex)
    • setBiomehueshift

      public void setBiomehueshift(Double hueShift)
    • setBiomeHueShift

      public void setBiomeHueShift(Double hueShift)
    • setReflection

      @Deprecated public void setReflection(Double metallicColor)
      Deprecated.
    • setMetallic

      public void setMetallic(Double metallicColor)
    • setMetallic

      public void setMetallic(String metallic)
    • setReflection

      public void setReflection(double[] metallic)
    • setRoughness

      public void setRoughness(String roughness)
    • setRoughness

      public void setRoughness(Double roughness)
    • setAo

      public void setAo(String ao)
    • setOcclusionMetallicRoughness

      public void setOcclusionMetallicRoughness(String texture)
    • setDiffuseCubemap

      public void setDiffuseCubemap(String cubemap)
    • setNormalCubemap

      public void setNormalCubemap(String cubemap)
    • setSpecularCubemap

      public void setSpecularCubemap(String cubemap)
    • setEmissiveColormap

      public void setEmissiveColormap(String cubemap)
    • setHeightCubemap

      public void setHeightCubemap(String cubemap)
    • setMetallicCubemap

      public void setMetallicCubemap(String cubemap)
    • setRoughnessCubemap

      public void setRoughnessCubemap(String cubemap)
    • setReflectionCubemap

      public void setReflectionCubemap(String reflectionCubemap)
    • setAmbientOcclusionCubemap

      public void setAmbientOcclusionCubemap(String cubemap)
    • setOcclusionClouds

      public void setOcclusionClouds(boolean state)
    • setAmbientOcclusionCubemap

      public void setAmbientOcclusionCubemap(CubemapComponent cubemap)
    • setSkybox

      public void setSkybox(String diffuseCubemap)
    • setDiffuseSVT

      public void setDiffuseSVT(VirtualTextureComponent virtualTextureComponent)
    • setDiffuseSVT

      public void setDiffuseSVT(Map<Object,Object> virtualTexture)
    • setSpecularSVT

      public void setSpecularSVT(VirtualTextureComponent virtualTextureComponent)
    • setSpecularSVT

      public void setSpecularSVT(Map<Object,Object> virtualTexture)
    • setNormalSVT

      public void setNormalSVT(VirtualTextureComponent virtualTextureComponent)
    • setNormalSVT

      public void setNormalSVT(Map<Object,Object> virtualTexture)
    • setHeightSVT

      public void setHeightSVT(VirtualTextureComponent virtualTextureComponent)
    • setHeightSVT

      public void setHeightSVT(Map<Object,Object> virtualTexture)
    • setEmissiveSVT

      public void setEmissiveSVT(VirtualTextureComponent virtualTextureComponent)
    • setEmissiveSVT

      public void setEmissiveSVT(Map<Object,Object> virtualTexture)
    • setMetallicSVT

      public void setMetallicSVT(VirtualTextureComponent virtualTextureComponent)
    • setMetallicSVT

      public void setMetallicSVT(Map<Object,Object> virtualTexture)
    • setRoughnessSVT

      public void setRoughnessSVT(VirtualTextureComponent virtualTextureComponent)
    • setRoughnessSVT

      public void setRoughnessSVT(Map<Object,Object> virtualTexture)
    • setAoSVT

      public void setAoSVT(VirtualTextureComponent virtualTextureComponent)
    • setAoSVT

      public void setAoSVT(Map<Object,Object> virtualTexture)
    • convertToComponent

      public static VirtualTextureComponent convertToComponent(Map<Object,Object> map)
    • hasHeight

      public boolean hasHeight()
    • disposeTexture

      public void disposeTexture(com.badlogic.gdx.assets.AssetManager manager, Material material, String name, String nameUnpacked, int attributeIndex, com.badlogic.gdx.graphics.Texture tex)
    • disposeCubemap

      public void disposeCubemap(com.badlogic.gdx.assets.AssetManager manager, Material mat, int attributeIndex, CubemapComponent cubemap)
    • disposeTextures

      public void disposeTextures(com.badlogic.gdx.assets.AssetManager manager)
      Disposes and unloads all currently loaded textures immediately
      Parameters:
      manager - The asset manager
    • notify

      public void notify(Event event, Object source, Object... data)
      Description copied from interface: IObserver
      Event notification call.
      Specified by:
      notify in interface IObserver
      Parameters:
      event - The event type.
      source - The source object, if any.
      data - The data associated with this event.
    • getTexturesString

      public String getTexturesString()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • copyFrom

      public void copyFrom(MaterialComponent other)
    • randomizeAll

      public void randomizeAll(long seed, double bodySize)
    • print

      public void print(Logger.Log log)
    • dispose

      public void dispose()
      Specified by:
      dispose in interface com.badlogic.gdx.utils.Disposable
    • updateWith

      public void updateWith(MaterialComponent object)
      Specified by:
      updateWith in interface IUpdatable<MaterialComponent>