Kuesa Runtime

MetallicRoughnessProperties QML Type

Kuesa::MetallicRoughnessProperties hold the properties of a physically based rendering (PBR) material based on the glTF 2.0 material description. More...

Since: Kuesa 1.1
Instantiates: MetallicRoughnessProperties

Properties

Detailed Description

The material properties are defined using a common set of parameter that define how light interacts with it. This allows to use a common description of the material so they are rendered consistently across platforms and 3D software and can be described by an intuitive set of parameters.

The MetallicRoughnessProperties consists of the following properties:

For a particular point of an object, the base color is computed as baseColorFactor*baseColorMap*vertexColor. The vertexColor is the interpolated value of the vertex color property of the mesh to which the material is applied.

Kuesa::MetallicRoughnessProperties also supports alpha blending and alpha cutoff. Alpha blending is used to simulate transparent materials, like a glass, while alpha cutoff is used to discard fragment that have an alpha value below a threshold. This is useful to render grass or trees for example.

Kuesa::MetallicRoughnessProperties supports two texture coordinate sets for each map. To specify the texture coordinate set a map must use, you can set the <map>UsesTexCoord1 property to true or false. If it's false, it will use the 0th coordinate set of the primitive, attached to 'defaultTextureCoordinateAttributeName` attribute. If it's true, it will use the 1st coordinate set of the primitive, attached to 'defaultTextureCoordinate1AttributeName`.

A more complete description of the material can be found in https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#materials

Property Documentation

ambientOcclusionMap : Qt3DRender.AbstractTexture

Specifies a texture to be used for ambient occlusion. The content of the texture is expected to be a single R channel in linear space. This offers a way of combining the metalRoughMap's G and B channels in the same texture as the ambientOcclusionMap.

Note: If this property is nullptr and is set to a non nullptr value or viceverse, it will trigger a recompilation of the shader.


aoUsesTexCoord1 : bool

False if the map must use the 0th texture coordinate set, binded to 'defaultTextureCoordinateName' attribute. True if the map must use the 1st texture coordinate set, binded to 'defaultTextureCoordinate1Name' attribute.


emissiveFactor : color

Specifies an emissive factor to be used for emissive surfaces.


emissiveMap : Qt3DRender.AbstractTexture

Specifies a texture to be used for emissive surfaces. The content of the texture is expected to be in sRGB color space.

Note: If this property is nullptr and is set to a non nullptr value or viceverse, it will trigger a recompilation of the shader.


emissiveUsesTexCoord1 : bool

False if the map must use the 0th texture coordinate set, binded to 'defaultTextureCoordinateName' attribute. True if the map must use the 1st texture coordinate set, binded to 'defaultTextureCoordinate1Name' attribute.


metalRoughMap : Qt3DRender.AbstractTexture

Specifies a texture to be used as metallic and roughness factor. The metallic factor is sampled for the B channel of the texture, while the roughness factor is sampled from the G channel. R and A channel are unused. This offers a way of combining the ambientOcclusionMap's R channel in the same texture as the metalRoughMap. The content of the texture is expected to be in linear RGB color space.

Note: If this property is nullptr and is set to a non nullptr value or viceverse, it will trigger a recompilation of the shader.


metallicFactor : float

Specifies the metallic factor of the material. Set the value between 0.0 and 1.0 to modulate how metallic the material is.


metallicRoughnessUsesTexCoord1 : bool

False if the map must use the 0th texture coordinate set, binded to 'defaultTextureCoordinateName' attribute. True if the map must use the 1st texture coordinate set, binded to 'defaultTextureCoordinate1Name' attribute.


normalMap : Qt3DRender.AbstractTexture

Specifies a normal map for the material. This allows to simulate very detailed surfaces without a huge number of triangles. The content of the texture is expected to be in linear RGB color space.

Note: If this property is nullptr and is set to a non nullptr value or viceverse, it will trigger a recompilation of the shader.


normalScale : float

Specifies a scale for the normal map calculations. A bigger number is used to simulated bigger bumps in the surface


normalUsesTexCoord1 : bool

False if the map must use the 0th texture coordinate set, binded to 'defaultTextureCoordinateName' attribute. True if the map must use the 1st texture coordinate set, binded to 'defaultTextureCoordinate1Name' attribute.


roughnessFactor : float

Specifies the roughness factor of the material. Set the value between 0.0 and 1.0 to modulate how rough the material is.