class PBRMaterial extends PBRBaseMaterial
The Physically based material of BJS.
This offers the main features of a standard PBR material.
For more information, please refer to the documentation :
http://doc.babylonjs.com/extensions/Physically_Based_Rendering
Instantiates a new PBRMaterial instance.
* @param name The material name
Name | Type | Description | |
---|---|---|---|
name | string | The material name | |
scene | Scene | The scene the material will be use in. |
PBRMaterialTransparencyMode: No transparency mode, Alpha channel is not use.
PBRMaterialTransparencyMode: Alpha Test mode, pixel are discarded below a certain threshold defined by the alpha cutoff value.
PBRMaterialTransparencyMode: Pixels are blended (according to the alpha mode) with the already drawn pixels in the current frame buffer.
PBRMaterialTransparencyMode: Pixels are blended (according to the alpha mode) with the already drawn pixels in the current frame buffer.
They are also discarded below the alpha cutoff threshold to improve performances.
Intensity of the direct lights e.g. the four lights available in your scene.
This impacts both the direct diffuse and specular highlights.
Intensity of the emissive part of the material.
This helps controlling the emissive effect without modifying the emissive color.
Intensity of the environment e.g. how much the environment will light the object
either through harmonics for rough material or through the refelction for shiny ones.
This is a special control allowing the reduction of the specular highlights coming from the
four lights of the scene. Those highlights may not be needed in full environment lighting.
Debug Control allowing disabling the bump map on this material.
AKA Diffuse Texture in standard nomenclature.
AKA Occlusion Texture in other nomenclature.
AKA Occlusion Texture Intensity in other nomenclature.
AKA Specular texture in other nomenclature.
Used to switch from specular/glossiness to metallic/roughness workflow.
Specifies the metallic scalar of the metallic/roughness workflow.
Can also be used to scale the metalness values of the metallic texture.
Specifies the roughness scalar of the metallic/roughness workflow.
Can also be used to scale the roughness values of the metallic texture.
Used to enable roughness/glossiness fetch from a separate chanel depending on the current mode.
Gray Scale represents roughness in metallic mode and glossiness in specular mode.
AKA Diffuse Color in other nomenclature.
AKA Specular Color in other nomenclature.
AKA Glossiness in other nomenclature.
source material index of refraction (IOR)' / 'destination material IOR.
Controls if refraction needs to be inverted on Y. This could be usefull for procedural texture.
This parameters will make the material used its opacity to control how much it is refracting aginst not.
Materials half opaque for instance using refraction could benefit from this control.
Specifies that the alpha is coming form the albedo channel alpha channel for alpha blending.
Enforces alpha test in opaque or blend mode in order to improve the performances of some situations.
Defines the alpha limits in alpha test mode.
Specifies that the material will keeps the specular highlights over a transparent surface (only the most limunous ones).
A car glass is a good exemple of that. When sun reflects on it you can not see what is behind.
Specifies if the reflectivity texture contains the glossiness information in its alpha channel.
Specifies if the metallic texture contains the roughness information in its alpha channel.
Specifies if the metallic texture contains the roughness information in its green channel.
Specifies if the metallic texture contains the metallness information in its blue channel.
Specifies if the metallic texture contains the ambient occlusion information in its red channel.
Specifies if the ambient texture contains the ambient occlusion information in its red channel only.
In case the reflectivity map does not contain the microsurface information in its alpha channel,
The material will try to infer what glossiness each pixel should be.
BJS is using an harcoded light falloff based on a manually sets up range.
In PBR, one way to represents the fallof is to use the inverse squared root algorythm.
This parameter can help you switch back to the BJS mode in order to create scenes using both materials.
Specifies that the material will keeps the reflection highlights over a transparent surface (only the most limunous ones).
A car glass is a good exemple of that. When the street lights reflects on it you can not see what is behind.
Allows using the bump map in parallax mode.
Allows using the bump map in parallax occlusion mode.
Controls the scale bias of the parallax mode.
If sets to true, disables all the lights affecting the material.
Force the shader to compute irradiance in the fragment shader in order to take bump in account.
Number of Simultaneous lights allowed on the material.
If sets to true, x component of normal map value will invert (x = 1.0 - x).
If sets to true, y component of normal map value will invert (y = 1.0 - y).
If sets to true and backfaceCulling is false, normals will be flipped on the backside.
A fresnel is applied to the alpha of the model to ensure grazing angles edges are not alpha tested.
And/Or occlude the blended part. (alpha is converted to gamma to compute the fresnel)
A fresnel is applied to the alpha of the model to ensure grazing angles edges are not alpha tested.
And/Or occlude the blended part. (alpha stays linear to compute the fresnel)
A fresnel is applied to the alpha of the model to ensure grazing angles edges are not alpha tested.
And/Or occlude the blended part.
Force normal to face away from face.
This parameters will enable/disable Horizon occlusion to prevent normal maps to look shiny when the normal
makes the reflect vector face the model (under horizon).
This parameters will enable/disable radiance occlusion by preventing the radiance to lit
too much the area relying on ambient texture to define their ambient occlusion.
Gets the image processing configuration used either in this material.
Sets the Default image processing configuration used either in the this material.
* If sets to null, the scene one is in use.
Gets wether the color curves effect is enabled.
Sets wether the color curves effect is enabled.
Gets wether the color grading effect is enabled.
Gets wether the color grading effect is enabled.
Gets wether tonemapping is enabled or not.
Sets wether tonemapping is enabled or not
The camera exposure used on this material.
This property is here and not in the camera to allow controlling exposure without full screen post process.
This corresponds to a photographic exposure.
The camera exposure used on this material.
This property is here and not in the camera to allow controlling exposure without full screen post process.
This corresponds to a photographic exposure.
Gets The camera contrast used on this material.
Sets The camera contrast used on this material.
Gets the Color Grading 2D Lookup Texture.
Sets the Color Grading 2D Lookup Texture.
The color grading curves provide additional color adjustmnent that is applied after any color grading transform (3D LUT).
They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.
These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image;
corresponding to low luminance, medium luminance, and high luminance areas respectively.
The color grading curves provide additional color adjustmnent that is applied after any color grading transform (3D LUT).
They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.
These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image;
corresponding to low luminance, medium luminance, and high luminance areas respectively.
Name | Type | Description | |
---|---|---|---|
texture | BaseTexture |
Name | Type | Description | |
---|---|---|---|
name | string |
Name | Type | Description | |
---|---|---|---|
source | any | ||
scene | Scene | ||
rootUrl | string |