MaterialMeshStandardMaterial

物理网格材质(MeshPhysicalMaterial)

MeshStandardMaterial的扩展,能够更好地控制反射率。

请注意,为了获得最佳效果,您在使用此材质时应始终指定环境贴图。

As a result of these complex shading features, MeshPhysicalMaterial has a higher performance cost, per pixel, than other Verge3D materials. Most effects are disabled by default, and add cost as they are enabled. For best results, always specify an environment map when using this material.

例子

materials / variations / physical
materials / physical / clearcoat
materials / physical / reflectivity
materials / physical / sheen
materials / physical / transmission

构造函数(Constructor)

MeshPhysicalMaterial(parameters : Object)

parameters — (可选)用于定义材质外观的对象,具有一个或多个属性。 材质的任何属性都可以从此处传入(包括从Material继承的任何属性)

属性color例外,其可以作为十六进制字符串传递,默认情况下为 0xffffff(白色),内部调用Color.set(color)。

属性(Properties)

共有属性请参见其基类Material

.clearcoat : Float

Represents the thickness of the clear coat layer, from 0.0 to 1.0. Use clear coat related properties to enable multilayer materials that have a thin translucent layer over the base layer. Default is 0.0.

.clearcoatMap : Texture

The red channel of this texture is multiplied against .clearcoat, for per-pixel control over a coating's thickness. Default is null.

.clearcoatNormalMap : Texture

Can be used to enable independent normals for the clear coat layer. Default is null.

.clearcoatNormalScale : Vector2

How much .clearcoatNormalMap affects the clear coat layer, from (0,0) to (1,1). Default is (1,1).

.clearcoatRoughness : Float

Roughness of the clear coat layer, from 0.0 to 1.0. Default is 0.0.

.clearcoatRoughnessMap : Texture

The green channel of this texture is multiplied against .clearcoatRoughness, for per-pixel control over a coating's roughness. Default is null.

.defines : Object

如下形式的对象: { 'STANDARD': '' 'PHYSICAL': '', }; WebGLRenderer使用它来选择shaders。

.ior : Float

Index-of-refraction for non-metallic materials, from 1.0 to 2.333. Default is 1.5.

.reflectivity : Float

Degree of reflectivity, from 0.0 to 1.0. Default is 0.5, which corresponds to an index-of-refraction of 1.5.
这模拟了非金属材质的反射率。当MeshStandardMaterial1.0时,此属性无效。

.sheen : Color

If a color is assigned to this property, the material will use a special sheen BRDF intended for rendering cloth materials such as velvet. The sheen color provides the ability to create two-tone specular materials. null by default.

.transmission : Float

Degree of transmission (or optical transparency), from 0.0 to 1.0. Default is 0.0.
Thin, transparent or semitransparent, plastic or glass materials remain largely reflective even if they are fully transmissive. The transmission property can be used to model these materials.
When transmission is non-zero, opacity should be set to 1.

.transmissionMap : Texture

The red channel of this texture is multiplied against .transmission, for per-pixel control over optical transparency. Default is null.

方法(Methods)

共有方法请参见其基类MaterialMeshStandardMaterial

源码(Source)

src/materials/MeshPhysicalMaterial.js