updated_at: 2025-02-01 15:51

Materials

이장에서는 자주 사용하는 materials 에 대해 설명드리고자 합니다.

참조

properties

  • color: material 색상, default: 0xffffff
  • emissive: 0xff0000방사성의
  • flatShading: material이 플랫 셰이딩으로 렌더링할지를 정의합니다. 기본값은 false입니다.
  • map: new THREE.TextureLoader().load( def.ring.url );
  • opacity: 0.9
  • shininess: .specular 하이라이트의 광택도. 값이 높을수록 하이라이트가 선명해집니다. 기본값은 30입니다.
  • side: Defines which side of faces will be rendered - front, back or both. Default is THREE.FrontSide. Other options are THREE.BackSide and THREE.DoubleSide.(flat 으로 표시될때 위에서 볼때 나타날 것인가 아래서 볼때 나타날것인가를 제시)
  • specular: 0x666666Specular color of the materia 반사광, Default is a Color set to 0x111111 (very dark grey).
  • transparent: true | false
  • wireframe : face를 나타낼것인가 (default: false);

MeshBasicMaterial

가장 기본이 되지만 shadow 등을 사용할 수 없다.

MeshLambertMaterial

특정한 highlights 없이는 빛나지 않는 표면. 보여지기 위해서는 빛이 필요하다.

new THREE.MeshLambertMaterial({ color: 0xa52523 })
  • color:
  • map: texture

MeshPhongMaterial

빛이 나는 표면, 일반적인 사용에서는 가장 합리적일 것 같다.(내 생각) 참조

MeshStandardMaterial

물리적으로 기준이 되는 material 이다. MeshPhongMaterial 보다 좀더 현실적인 느낌은 있어나 좀더 많은 계산요소가 들어간다. MeshStandardMaterial( {color: 0x333ff3, flatShading: true} );







## PointsMaterial(ParticleBasicMaterial)

PointsMaterial({color: 0xfffafa, size: 0.2});

### ParticleBasicMaterial

const pMaterial = new THREE.ParticleBasicMaterial({ color: 0xfffafa, size: 0.2 }); => const pMaterial = new THREE.PointsMaterial({ color: 0xfffafa, size: 0.2 });

평점을 남겨주세요
평점 : 2.5
총 투표수 : 1

질문 및 답글