gz/rendering/base/BaseMaterial.hh
virtual math::Color Diffuse() const override
Get the diffuse color.
Definition: gz/rendering/base/BaseMaterial.hh:558
virtual void SetDepthMaterial(const double far, const double near) override
Configuration for Depth Material.
Definition: gz/rendering/base/BaseMaterial.hh:1028
virtual void SetEmissive(const double _r, const double _g, const double _b, const double _a=1.0) override
Set the emissive color.
Definition: gz/rendering/base/BaseMaterial.hh:435
MaterialType
An enum for the type of material.
Definition: gz/rendering/Material.hh:36
double transparency
Transparent. 1: fully transparent, 0: opaque.
Definition: gz/rendering/base/BaseMaterial.hh:337
virtual std::string LightMap() const override
Get the URI of the light map file.
Definition: gz/rendering/base/BaseMaterial.hh:873
virtual bool HasEnvironmentMap() const override
Determine if this material has a environment map.
Definition: gz/rendering/base/BaseMaterial.hh:810
virtual void ClearMetalnessMap() override
Removes any metalness map mapped to this material.
Definition: gz/rendering/base/BaseMaterial.hh:803
bool TwoSidedEnabled() const
virtual void Reset()
Definition: gz/rendering/base/BaseMaterial.hh:1036
virtual float Roughness() const override
Get the roughness value of this material.
Definition: gz/rendering/base/BaseMaterial.hh:908
virtual double Reflectivity() const override
Get the reflectivity value.
Definition: gz/rendering/base/BaseMaterial.hh:600
STL class.
math::Color ambient
Ambient color.
Definition: gz/rendering/base/BaseMaterial.hh:325
virtual void ClearLightMap() override
Removes any light map mapped to this material.
Definition: gz/rendering/base/BaseMaterial.hh:894
virtual void SetShininess(const double _shininess) override
Set the shininess value.
Definition: gz/rendering/base/BaseMaterial.hh:450
virtual void SetReceiveShadows(const bool _receiveShadows) override
Specify if this material receives shadows.
Definition: gz/rendering/base/BaseMaterial.hh:537
BaseMaterial()
Definition: gz/rendering/base/BaseMaterial.hh:378
std::string RoughnessMap() const
virtual void SetDiffuse(const double _r, const double _g, const double _b, const double _a=1.0) override
Set the diffuse color.
Definition: gz/rendering/base/BaseMaterial.hh:405
float RenderOrder() const
bool lightingEnabled
Flag to indicate if dynamic lighting is enabled.
Definition: gz/rendering/base/BaseMaterial.hh:358
virtual float Metalness() const override
Get the metalness value of this material.
Definition: gz/rendering/base/BaseMaterial.hh:922
std::string NormalMap() const
virtual void SetRenderOrder(const float _renderOrder) override
Set the render order. When polygons are coplanar, you can get problems with 'depth fighting' where th...
Definition: gz/rendering/base/BaseMaterial.hh:544
virtual std::string FragmentShader() const override
Get path to the fragment shader.
Definition: gz/rendering/base/BaseMaterial.hh:677
bool castShadows
Set to true to enable object with this material to cast shadows.
Definition: gz/rendering/base/BaseMaterial.hh:373
bool depthCheckEnabled
Flag to indicate if depth buffer checking is enabled.
Definition: gz/rendering/base/BaseMaterial.hh:361
virtual void SetFragmentShader(const std::string &_path) override
Set the fragment shader.
Definition: gz/rendering/base/BaseMaterial.hh:691
virtual std::string Texture() const override
Get the URI of the texture file.
Definition: gz/rendering/base/BaseMaterial.hh:705
virtual void SetAmbient(const double _r, const double _g, const double _b, const double _a=1.0) override
Set the ambient color.
Definition: gz/rendering/base/BaseMaterial.hh:390
virtual enum ShaderType ShaderType() const override
Get the ShaderType value.
Definition: gz/rendering/base/BaseMaterial.hh:279
virtual void SetDepthWriteEnabled(bool _enabled) override
Specify if depth buffer writing is enabled.
Definition: gz/rendering/base/BaseMaterial.hh:523
virtual void SetDepthCheckEnabled(bool _enabled) override
Specify if depth buffer checking is enabled.
Definition: gz/rendering/base/BaseMaterial.hh:516
std::string LightMap() const
virtual std::string EmissiveMap() const override
Get the URI of the emissive map file.
Definition: gz/rendering/base/BaseMaterial.hh:845
double Shininess() const
virtual void SetVertexShader(const std::string &_path) override
Set the vertex shader.
Definition: gz/rendering/base/BaseMaterial.hh:670
virtual void SetRoughness(const float _roughness) override
Set the roughness value. Only affects material of type MT_PBS.
Definition: gz/rendering/base/BaseMaterial.hh:901
virtual MaterialType Type() const override
Removes any metalness map mapped to this material.
Definition: gz/rendering/base/BaseMaterial.hh:649
bool depthWriteEnabled
Flag to indicate if depth buffer writing is enabled.
Definition: gz/rendering/base/BaseMaterial.hh:364
virtual void SetReflectionEnabled(const bool _enabled) override
Specify if this material has a reflection.
Definition: gz/rendering/base/BaseMaterial.hh:502
virtual std::string VertexShader() const override
Get path to the vertex shader.
Definition: gz/rendering/base/BaseMaterial.hh:656
virtual bool HasMetalnessMap() const override
Determine if this material has a metalness map.
Definition: gz/rendering/base/BaseMaterial.hh:782
Definition: gz/rendering/base/BaseMaterial.hh:38
bool twoSidedEnabled
Enable two sided rendering.
Definition: gz/rendering/base/BaseMaterial.hh:346
virtual double Transparency() const override
Get the transparency value.
Definition: gz/rendering/base/BaseMaterial.hh:586
bool TextureAlphaEnabled() const
std::string TextureImage() const
virtual bool HasEmissiveMap() const override
Determine if this material has an emissive map.
Definition: gz/rendering/base/BaseMaterial.hh:838
virtual MaterialPtr Clone(const std::string &_name="") const override
Clone this material.
Definition: gz/rendering/base/BaseMaterial.hh:929
math::Color specular
Specular color.
Definition: gz/rendering/base/BaseMaterial.hh:331
unsigned int LightMapTexCoordSet() const
virtual void SetEnvironmentMap(const std::string &_metalnessMap) override
Set the material environment map.
Definition: gz/rendering/base/BaseMaterial.hh:824
Pbr * PbrMaterial() const
virtual bool CastShadows() const override
Determine if this material casts shadows.
Definition: gz/rendering/base/BaseMaterial.hh:607
virtual bool HasRoughnessMap() const override
Determine if this material has a roughness map.
Definition: gz/rendering/base/BaseMaterial.hh:754
virtual void SetShaderType(enum ShaderType _type) override
Set the ShaderType value.
Definition: gz/rendering/base/BaseMaterial.hh:272
bool TwoSidedEnabled() const override
Get the enable two sided rendering value.
Definition: gz/rendering/base/BaseMaterial.hh:488
static const common::Pbr kDefaultPbr
Default pbr material properties.
Definition: gz/rendering/base/BaseMaterial.hh:35
math::Color Emissive() const
std::string MetalnessMap() const
virtual void SetCastShadows(const bool _castShadows) override
Specify if this material casts shadows.
Definition: gz/rendering/base/BaseMaterial.hh:530
virtual void SetLightingEnabled(const bool _enabled) override
Specify if lighting affects this material.
Definition: gz/rendering/base/BaseMaterial.hh:509
virtual bool HasTexture() const override
Determine if this material has a texture.
Definition: gz/rendering/base/BaseMaterial.hh:698
bool textureAlphaEnabled
Enable alpha channel based texture transparency.
Definition: gz/rendering/base/BaseMaterial.hh:340
virtual std::string EnvironmentMap() const override
Get the URI of the environment map file.
Definition: gz/rendering/base/BaseMaterial.hh:817
virtual math::Color Ambient() const override
Get the ambient color.
Definition: gz/rendering/base/BaseMaterial.hh:551
virtual void SetMetalnessMap(const std::string &_metalnessMap) override
Set the material metalness map.
Definition: gz/rendering/base/BaseMaterial.hh:796
virtual math::Color Emissive() const override
Get the emissive color.
Definition: gz/rendering/base/BaseMaterial.hh:572
virtual void ClearNormalMap() override
Removes any normal map mapped to this material.
Definition: gz/rendering/base/BaseMaterial.hh:747
double shininess
Shininess factor.
Definition: gz/rendering/base/BaseMaterial.hh:352
virtual ShaderParamsPtr FragmentShaderParams() override
Get params for the fragment shader.
Definition: gz/rendering/base/BaseMaterial.hh:684
virtual void SetAlphaFromTexture(bool _enabled, double _alpha=0.5, bool _twoSided=true) override
Set the material to use the alpha channel from the textures.
Definition: gz/rendering/base/BaseMaterial.hh:464
virtual bool DepthCheckEnabled() const override
Determine if depth buffer checking is enabled.
Definition: gz/rendering/base/BaseMaterial.hh:628
bool reflectionEnabled
Flag to indicate if reflection is enabled.
Definition: gz/rendering/base/BaseMaterial.hh:367
std::string EnvironmentMap() const
bool receiveShadows
True if material receives shadows.
Definition: gz/rendering/base/BaseMaterial.hh:370
virtual bool LightingEnabled() const override
Determine if lighting affects this material.
Definition: gz/rendering/base/BaseMaterial.hh:621
virtual std::string MetalnessMap() const override
Get the URI of the metalness map file.
Definition: gz/rendering/base/BaseMaterial.hh:789
virtual void ClearEmissiveMap() override
Removes any emissive map mapped to this material.
Definition: gz/rendering/base/BaseMaterial.hh:859
@ MT_CLASSIC
Classic shading, i.e. variants of Phong.
Definition: gz/rendering/Material.hh:39
virtual void SetReflectivity(const double _reflectivity) override
Set the reflectivity value.
Definition: gz/rendering/base/BaseMaterial.hh:495
math::Color diffuse
Diffuse color.
Definition: gz/rendering/base/BaseMaterial.hh:328
virtual double Shininess() const override
Get the shininess value.
Definition: gz/rendering/base/BaseMaterial.hh:579
virtual std::string RoughnessMap() const override
Get the URI of the roughness map file.
Definition: gz/rendering/base/BaseMaterial.hh:761
virtual bool ReceiveShadows() const override
Determine if this material receives shadows.
Definition: gz/rendering/base/BaseMaterial.hh:614
double reflectivity
Reflectivity.
Definition: gz/rendering/base/BaseMaterial.hh:355
virtual bool HasLightMap() const override
Determine if this material has a light map.
Definition: gz/rendering/base/BaseMaterial.hh:866
std::string EmissiveMap() const
double Metalness() const
@ ST_PIXEL
Per pixel lighting shader.
Definition: gz/rendering/ShaderType.hh:40
virtual void ClearEnvironmentMap() override
Removes any environment map mapped to this material.
Definition: gz/rendering/base/BaseMaterial.hh:831
double AlphaThreshold() const
virtual void CopyFrom(ConstMaterialPtr _material) override
Copy properties from given Material.
Definition: gz/rendering/base/BaseMaterial.hh:943
double AlphaThreshold() const override
Get the alpha threshold.
Definition: gz/rendering/base/BaseMaterial.hh:481
math::Color Diffuse() const
virtual std::string NormalMap() const override
Get the URI of the normal map file.
Definition: gz/rendering/base/BaseMaterial.hh:733
bool Lighting() const
virtual void SetNormalMap(const std::string &_normalMap) override
Set the material normal map.
Definition: gz/rendering/base/BaseMaterial.hh:740
virtual ShaderParamsPtr VertexShaderParams() override
Get params for the vertex shader.
Definition: gz/rendering/base/BaseMaterial.hh:663
virtual bool ReflectionEnabled() const override
Determine if this material has a reflection.
Definition: gz/rendering/base/BaseMaterial.hh:642
double Roughness() const
virtual void SetSpecular(const double _r, const double _g, const double _b, const double _a=1.0) override
Set the specular color.
Definition: gz/rendering/base/BaseMaterial.hh:420
bool TextureAlphaEnabled() const override
Get the enable alpha from textures.
Definition: gz/rendering/base/BaseMaterial.hh:474
virtual math::Color Specular() const override
Get the specular color.
Definition: gz/rendering/base/BaseMaterial.hh:565
virtual bool DepthWriteEnabled() const override
Determine if depth buffer writing is enabled.
Definition: gz/rendering/base/BaseMaterial.hh:635
virtual void SetMetalness(const float _metalness) override
Set the metalness value. Only affects material of type MT_PBS.
Definition: gz/rendering/base/BaseMaterial.hh:915
ShaderType
Available types of shaders. Note that not all rendering-engines will be able to use each type....
Definition: gz/rendering/ShaderType.hh:34
virtual void SetTexture(const std::string &_texture) override
Set the material texture.
Definition: gz/rendering/base/BaseMaterial.hh:712
virtual float RenderOrder() const override
Get the render order value of this material.
Definition: gz/rendering/base/BaseMaterial.hh:593
virtual void SetTransparency(const double _transparency) override
Set the transparency value.
Definition: gz/rendering/base/BaseMaterial.hh:457
virtual bool HasNormalMap() const override
Determine if this material has a normal map.
Definition: gz/rendering/base/BaseMaterial.hh:726
Represents a surface material of a Geometry.
Definition: gz/rendering/Material.hh:47
double alphaThreshold
Threshold for alpha channel rejection.
Definition: gz/rendering/base/BaseMaterial.hh:343
double renderOrder
Material render order.
Definition: gz/rendering/base/BaseMaterial.hh:349
virtual ~BaseMaterial()
Definition: gz/rendering/base/BaseMaterial.hh:384
math::Color emissive
Emissive color.
Definition: gz/rendering/base/BaseMaterial.hh:334
double Transparency() const
virtual void SetEmissiveMap(const std::string &_emissiveMap) override
Set the material emissive map.
Definition: gz/rendering/base/BaseMaterial.hh:852
virtual void PreRender() override
Prepare this object and any of its children for rendering. This should be called for each object in a...
Definition: gz/rendering/base/BaseMaterial.hh:1021
virtual unsigned int LightMapTexCoordSet() const override
Get the texture coordinate set used by lightmap.
Definition: gz/rendering/base/BaseMaterial.hh:880
virtual void SetLightMap(const std::string &_lightMap, unsigned int _uvSet=0u) override
Set the material light map.
Definition: gz/rendering/base/BaseMaterial.hh:887
virtual void SetRoughnessMap(const std::string &_roughnessMap) override
Set the material roughness map.
Definition: gz/rendering/base/BaseMaterial.hh:768
math::Color Ambient() const
virtual void ClearRoughnessMap() override
Removes any roughness map mapped to this material.
Definition: gz/rendering/base/BaseMaterial.hh:775
math::Color Specular() const
virtual void ClearTexture() override
Removes any texture mapped to this material.
Definition: gz/rendering/base/BaseMaterial.hh:719