Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Metal Material with MeshStandardMaterial in three.js

From what I know it should be possible to use MeshStandardMaterial to define metal-like-materials in Three.js which should follow a pbr-roughness-metalness-workflow but I cannot find any good examples on how to accomplish that.

I cannot use Phong-Shader, I have to stick to MeshStandardMaterial.

I want to achieve something like this:

like image 359
goetzmoritz Avatar asked Apr 19 '17 10:04

goetzmoritz


1 Answers

Yes, you can use MeshStandardMaterial to represent a metal-like material. Be sure to specify an environment map -- especially for metals.

material = new THREE.MeshStandardMaterial( {

    color: 0xffffff,

    roughness: roughness,
    metalness: metalness,

    roughnessMap: roughnessMap,
    metalnessMap: metalnessMap,

    envMap: envMap, // important -- especially for metals!
    envMapIntensity: envMapIntensity

} );

See the three.js example.

three.js r.84

like image 52
WestLangley Avatar answered Nov 10 '22 07:11

WestLangley