Normal Mesh Material (MeshNormalMaterial)

 

A material that maps normal vectors to RGB colors.

Constructor

MeshNormalMaterial( parameters : Object )

parameters-(Optional) The object used to define the appearance of the material, with one or more attributes. Any properties of the material can be passed in from here (including any properties inherited from Material).

Properties

For common attributes, please refer to its base class Material.

.bumpMap : Texture

The texture used to create the bump map. The black and white values ​​map to the perceived depth in relation to the lighting. The bump actually does not affect the geometry of the object, only the lighting. If a normal map is defined, it will be ignored.

.bumpScale : Float

How much impact the bump map will have on the material. The typical range is 0-1. The default value is 1.

.displacementMap : Texture

Displacement maps affect the position of mesh vertices. Unlike other maps that only affect the lighting and shadows of the material, the displaced vertices can cast shadows, block other objects, and act as real geometry. Displacement texture means that all vertices of the grid are mapped to the value of each pixel in the image (white is the highest) and repositioned.

.displacementScale : Float

The degree of influence of the displacement map on the grid (black is no displacement, white is the maximum displacement). If no displacement map is set, this value will not be applied. The default value is 1.

.displacementBias : Float

The offset of the displacement map on the vertices of the mesh. If no displacement map is set, this value will not be applied. The default value is 0.

.fog : Boolean

Whether the material is affected by fog. The default value is false .

.isMeshNormalMaterial : Boolean

Used to check whether this class or derived class is a normal mesh material. The default value is  true .

Because it is usually used for internal optimization, this attribute value should not be changed.

.morphNormals : boolean

Define whether to use morphNormals. Set to true to transfer the morphNormal attribute from Geometry to shader. The default value is false .

.morphTargets : Boolean

Define whether the material uses morphTargets. The default value is false.

.normalMap : Texture

The texture used to create the normal map. The RGB value affects the surface normal of each pixel fragment and changes the way colors are illuminated. The normal map does not change the actual shape of the surface, only the lighting.

.normalMapType : Integer

The type of normal map.

The options are THREE.TangentSpaceNormalMap (default) and THREE.ObjectSpaceNormalMap.

.normalScale : Vector2

The degree of influence of the normal map on the material. The typical range is 0-1. The default value is Vector2 set to (1,1).

.skinning : Boolean

Whether the material uses skinning. The default value is false.

.wireframe : boolean

Render the geometry as a wireframe. The default value is false (that is, the rendering is smooth shading).

.wireframeLinewidth : Float

Control the wire frame width. The default value is 1.

Due to the limitation of OpenGL Core Profile and WebGL renderers on most platforms, no matter how to set this value, the line width is always 1.

Guess you like

Origin blog.csdn.net/liuhao9999/article/details/110875611