Class MaterialComponent

All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable, IObserver, IComponent

public class MaterialComponent extends NamedComponent implements IObserver
A basic component that contains the info on a material
  • Field Details

    • textureParamsMipMap

      protected static final com.badlogic.gdx.assets.loaders.TextureLoader.TextureParameter textureParamsMipMap
      Default texture parameters
    • textureParams

      protected static final com.badlogic.gdx.assets.loaders.TextureLoader.TextureParameter 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
    • 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
    • aoUnapcked

      public String aoUnapcked
    • diffuseColor

      public float[] diffuseColor
    • specularColor

      public float[] specularColor
    • metallicColor

      public float[] metallicColor
    • emissiveColor

      public float[] emissiveColor
    • roughnessColor

      public float roughnessColor
    • heightScale

      public Float heightScale
    • heightSize

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

      public float[][] heightMap
    • nc

      public NoiseComponent nc
    • 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
    • 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
      initialize in class NamedComponent
    • isFinishedLoading

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

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

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

      public void setGenerated(boolean generated)
    • setBase

      @Deprecated public void setBase(String diffuse)
      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)
    • setEmissive

      public void setEmissive(String emissive)
    • setEmissive

      public void setEmissive(Double emissive)
    • setEmissive

      public void setEmissive(double[] emissive)
    • setRing

      public void setRing(String ring)
    • setRingnormal

      public void setRingnormal(String ringnormal)
    • setHeight

      public void setHeight(String height)
    • setHeightScale

      public void setHeightScale(Double heightScale)
    • setColorIfTexture

      public void setColorIfTexture(Boolean colorIfTexture)
    • setNoise

      public void setNoise(NoiseComponent noise)
    • setBiomelut

      public void setBiomelut(String biomeLookupTex)
    • setBiomehueshift

      public void setBiomehueshift(Double hueShift)
    • setReflection

      @Deprecated public void setReflection(Double metallicColor)
    • 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)
    • 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)
    • setSkybox

      public void setSkybox(String diffuseCubemap)
    • hasHeight

      public boolean hasHeight()
    • disposeTexture

      public void disposeTexture(com.badlogic.gdx.assets.AssetManager manager, Material material, String name, String nameUnpacked, int attributeIndex, 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
      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
      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()
      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