Three.js physical material MESHSTANDATMATMATERIAL and MESHPHYSICALMATERIAL

Home > Sci-Tech

Three.js physical material MESHSTANDATMATMATERIAL and MESHPHYSICALMATERIAL

2022-06-23 12:48:08 12 ℃

MeshstandardMaterial and Meshphysicalmaterial Class is PBR physical material, which can better simulate light calculation. Compared with the highlight grid material Meshphongmaterial rendering effect is more realistic. Similar to the two classes, the physical grid material is an extension, which can better control the reflectivity. Most attributes of PBR physical materials can be directly viewed. PBR physical material is a very important material. If you want to show a product, it is best to choose the material for more realistic rendering effects. If the game is used for a better display effect What are the differences between grid materials and PBR physical materials, you can read the article "Three.js Times and PBR". Before reading this article, it is best to have a certain understanding of physical materials. Pay attention to the use of physical materials. Generally, you need to set up an environmental texture .envmap metal attribute .metalness and rough rough Degree attributes .Roughness In order to better understand how PBR physical materials set up a metal, plastic and other materials, you can view the article

The typical attributes of the highlights of the highlights of the highlights of the highlight color and highlight brightness of the highlight color .shinines Threejs physical material typical attributes were high -glossy grid materials. Roughness attribute metal attributes .metalness represents the degree of material like metal. Non -metal materials, such as wood or stone, use 0.0, use 1.0 in metals, and there is no (usually). Default 0.5.0.0 to 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 to 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 to 1.0. The values ​​between them can be used for rusty metal appearance. If you also provide a rough pattern .metalnessMap , both values ​​are multiplied.

Standard grid material MeshstandardMaterial: Physical-based standard materials, use Metallic-Roughness workflow.

Physical rendering (PBR) has recently become the standard for many 3D applications, such as Unity, Unreal, and 3D Studio Max.

The difference between this method and the old method is that it does not use the approximity value to represent the interaction between light and surface, but use a physical and correct model. Our idea is that it is not to adjust the materials under specific lighting conditions to make it look at it to see it. It is better to get up, but you can create a material, which reacts correctly in all lighting scenarios.

In practice, physical grid material provides more accurate and realistic results than MeshlambertmaterIL or Meshphongmaticial. The cost is higher. The cost is higher.

The roughness of the roughness attribute .Roughness The degree of roughness of the material. 0.0 indicates a smooth mirror reflection, 1.0 indicates a complete manner. The default 0.5. Two values ​​multiplied. Metal stickers and roughness maps .roughnessmap When explaining the ThreeJS material, it will explain the color attribute .color and the color texture corresponding to the color. .map , when it comes to the material of the highlight grid, it will increase the highlights .specular corresponding high -gloss stickers .specularMap , analog learning physical physics Material, the metal diagram of the physical material .metalness corresponds to the metal attributes of the physical material .metalness , the rough graphic map of the physical material .RoughnessMap Corresponding to the roughness of the physical material, the attribute .roughnessmap Mesh all the same material effects, such as metal, such as plastic. There is no need to use metal and roughness. Patching can directly define the roughness and metal attributes. If the part of the surface of a grid model is metal, some areas are plastic, and some areas are fabrics. In this case, the roughness map and metal map are required.

Metal stickers and roughness maps are generally expelled through baking baking through the PBR secondary process. For example, through the Substance Painter software, the metal sticker and roughness maps required by PBR physical materials are exported. can. Metal stickers .metalnessMap The blue channel of texture is used to change the metal of the material.

Roughness map .RoUGHNESSMAP Green channels of texture to change the roughness of the material

The physical grid material and other grid materials have some of the same attributes, which can be learned in analogy. For specific information, you can refer to the relevant introduction of the ThreeJS documentation, such as the material luminous color attributes .emissive , the luminous sticker attributes .emissiveMap , environmental sticker attributes .envmap , environmental sticker coefficient .envmapintensity , light shadow sticker attribute . LightMap , French line map attributes . NormalMap In most 3D projects, the physical material of the grid model generally requires 3D art to provide color stickers MAP , and the method line map normalMap < /code>, metal sticker ROUGHNESSMAP , roughness map metalnessMap four stickers. Different projects can be universal. As for other stickers depending on the situation, glowing needs, such as glowing, glowing, glowing, light glowing needs, such as glowing needs, glowing light, glowing, such The texture EMISSIVEMAP , if there is a power supply light such as a power light, at this time, the art is generally required to provide the light -emitting sticker EmissiveMap .

The following code is the physical material of a grid model through the code.